Visit ComfyUI Online for ready-to-use ComfyUI environment
FaceDetectorNode identifies and analyzes faces in images, providing bounding boxes, landmarks, and scores.
The FaceDetectorNode is a powerful tool designed to identify and analyze faces within an image. Its primary purpose is to detect faces using various models and provide detailed information about each detected face, such as bounding boxes, landmarks, and confidence scores. This node is particularly beneficial for AI artists and developers who need to incorporate facial recognition capabilities into their projects. By leveraging advanced detection models, the FaceDetectorNode can efficiently process images to identify faces, even in complex scenes. It offers flexibility in selecting specific faces based on different criteria, such as position or reference images, making it a versatile component for applications that require precise face detection and analysis.
The image parameter is a tensor representing the input image in which faces are to be detected. It is crucial for the node's operation as it provides the visual data that the detection models will analyze. The image should be formatted correctly to ensure accurate detection results. There are no specific minimum or maximum values, but the image should be a valid tensor format compatible with the node's processing capabilities.
The face_detector_model parameter specifies the model to be used for face detection. Different models may have varying strengths and weaknesses, such as speed or accuracy, and this parameter allows you to choose the most suitable one for your needs. Options include models like yoloface_8n, yunet_2023_mar, scrfd, and retinaface. Selecting the appropriate model can significantly impact the detection performance and results.
The face_selector_mode parameter determines how faces are selected from the detected results. It offers modes such as one, many, and reference, allowing you to choose a single face, all detected faces, or faces matching a reference image, respectively. This parameter is essential for tailoring the node's output to specific requirements, such as focusing on a particular face in a group.
The face_position parameter is used when the face_selector_mode is set to one. It specifies the index of the face to be selected from the detected faces. This parameter is important for applications where a specific face needs to be isolated from a group, and it should be within the range of detected faces.
The sort_order parameter defines the order in which detected faces are sorted. This can influence which faces are prioritized or selected, especially when using modes that involve choosing a single face. Options might include sorting by size or detection confidence, impacting the node's output based on the chosen criteria.
The score_threshold parameter sets the minimum confidence score required for a face to be considered detected. It helps filter out low-confidence detections, ensuring that only reliable results are included in the output. Adjusting this threshold can balance between sensitivity and precision, depending on the application's needs.
The reference_image parameter is an optional tensor used when the face_selector_mode is set to reference. It provides a reference face to match against detected faces, allowing for more targeted selection. This parameter is useful for applications that require identifying specific individuals within an image.
The reference_face_distance parameter defines the maximum allowable distance for a face to be considered a match with the reference face. It is used in conjunction with the reference_image to fine-tune the matching process, ensuring that only closely resembling faces are selected. The default value is 0.6, but it can be adjusted to increase or decrease the strictness of the matching criteria.
The faces output parameter is a list of dictionaries, each containing detailed information about a detected face. This includes the bounding box, landmarks, confidence score, and optionally, embeddings and distances. This output is crucial for understanding the characteristics and positions of detected faces within the image.
The image output parameter returns the processed image tensor, which may be used for further analysis or visualization. It ensures that the original input image is available alongside the detection results for comprehensive processing.
The num_faces output parameter indicates the number of faces detected and selected based on the input criteria. This provides a quick overview of the detection results, helping to assess the node's performance and the image's complexity.
face_detector_model options to find the best balance between speed and accuracy for your specific application.score_threshold parameter to filter out low-confidence detections, especially in images with complex backgrounds or low-quality faces.reference mode, provide a clear and well-defined reference image to improve the accuracy of face matching.<error_message>score_threshold or an unsuitable detection model.score_threshold to allow for more detections or try a different face detection model that might be better suited for the image content.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.