Nodes/comfyui_cv/CV YuNet Face Detect
ComfyUI Node

CV YuNet Face Detect

Detects faces with the YuNet CNN (cv2.FaceDetectorYN). Place the .onnx model in ComfyUI/models/onnx (e.g. face_detection_yunet_2023mar.onnx). Outputs bounding boxes, the 5 facial landmarks per face as points, the per-face confidence and the face count. Data only - visualize the bboxes with the core 'Draw BBoxes' node and the landmarks with 'CV Draw Points'. Zero faces is a valid result (empty outputs).

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV YuNet Face Detect
  • image
  • bboxes
  • landmarks
  • scores
  • face_count
model
conf_threshold0.90
nms_threshold0.30
top_k5000
Categoryimage/CV/dnn

Inputs (5)

NameTypeDefaultDescription
imageNPARRAY,IMAGEInput image. An IMAGE batch is processed frame by frame; an NPARRAY is treated as a single frame (gray/BGR/BGRA, any dtype). The landmark and score outputs are concatenated across frames. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
modelCOMBOYuNet .onnx model file from ComfyUI/models/onnx.
conf_thresholdFLOAT0.900–1Minimum confidence to keep a face. Lower detects more (and more false positives).
nms_thresholdFLOAT0.300–1Non-maximum suppression IoU: boxes overlapping by more than this are merged.
top_kINT50001–20000Keep at most this many boxes before NMS.

Outputs (4)

NameTypeDescription
bboxesBOUNDING_BOXOne {x, y, width, height, score} dict per face - feed the core 'Draw BBoxes' node or 'Image Crop'. A batch nests one list per frame.
landmarksNPARRAY(N, 2) float32 point array: the 5 landmarks of every face, in order right eye, left eye, nose, right/left mouth corner. Feed 'CV Draw Points'. Empty (0, 2) when no faces.
scoresNPARRAY(N,) float32 confidence per face, same order as bboxes.
face_countINTTotal number of faces detected across the batch.