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).
CV YuNet Face Detect
- image
- bboxes
- landmarks
- scores
- face_count
◄model▾►
◄conf_threshold0.90►
◄nms_threshold0.30►
◄top_k5000►
Categoryimage/CV/dnn
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY,IMAGE | Input 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. | |
| model | COMBO | YuNet .onnx model file from ComfyUI/models/onnx. | |
| conf_threshold | FLOAT | 0.900–1 | Minimum confidence to keep a face. Lower detects more (and more false positives). |
| nms_threshold | FLOAT | 0.300–1 | Non-maximum suppression IoU: boxes overlapping by more than this are merged. |
| top_k | INT | 50001–20000 | Keep at most this many boxes before NMS. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| bboxes | BOUNDING_BOX | One {x, y, width, height, score} dict per face - feed the core 'Draw BBoxes' node or 'Image Crop'. A batch nests one list per frame. |
| landmarks | NPARRAY | (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. |
| scores | NPARRAY | (N,) float32 confidence per face, same order as bboxes. |
| face_count | INT | Total number of faces detected across the batch. |