Visit ComfyUI Online for ready-to-use ComfyUI environment
Facial detection and analysis node with customizable bounding boxes for AI artists using InsightFace model.
InsightFaceBBOXDetect is a powerful node designed to detect and analyze faces within an image using the InsightFace model. This node leverages advanced facial recognition technology to identify faces and draw bounding boxes around them, making it an essential tool for AI artists who need to process and analyze facial features in their artwork. The node can sort detected faces based on various criteria such as position and size, and it offers options to customize the appearance of the bounding boxes, including shape and color. By providing detailed facial detection and customization options, InsightFaceBBOXDetect enhances the ability to manipulate and understand facial data in creative projects.
The image parameter is the input image in which faces will be detected. This image should be provided in a format compatible with the node, typically as a tensor or PIL image. The quality and resolution of the input image can significantly impact the accuracy of face detection.
The shape parameter determines the shape of the bounding box drawn around detected faces. Options include 'rectangle' and 'circle'. Choosing the appropriate shape can help in better visualizing the detected faces according to the artistic needs.
The shape_color parameter specifies the color of the bounding box. This should be provided in a hex color code format (e.g., '#FF0000' for red). The color choice can enhance the visibility of the bounding boxes against different backgrounds.
The show_num parameter is a boolean that indicates whether to display numbers on the bounding boxes. When set to True, each detected face will be numbered, which can help in identifying and referencing specific faces in the image.
The num_color parameter defines the color of the numbers displayed on the bounding boxes. This should be provided in a hex color code format. Choosing a contrasting color to the shape_color ensures that the numbers are easily readable.
The num_pos parameter specifies the position of the numbers on the bounding boxes. Options include 'left-top', 'right-top', 'left-bottom', and 'right-bottom'. This allows for flexible placement of numbers to avoid overlapping with important facial features.
The num_sort parameter determines the sorting order of the detected faces. Options include 'reactor', 'left-right', 'right-left', 'top-bottom', 'bottom-top', 'small-large', and 'large-small'. Sorting can help in organizing the faces in a logical order for further processing or analysis.
The INSIGHTFACE parameter allows you to provide a pre-initialized InsightFace model. If not provided, the node will initialize its own model. This parameter is useful for reusing an existing model and saving initialization time.
The image_with_bbox parameter is the output image with bounding boxes drawn around the detected faces. This image is returned in a format suitable for further processing or display, typically as a tensor or PIL image.
The bbox_json parameter provides the bounding box coordinates in JSON format. This output is useful for programmatically accessing the bounding box data for each detected face, enabling further analysis or manipulation.
The num_faces parameter indicates the total number of faces detected in the input image. This count can be useful for understanding the extent of face detection and for validating the results.
The model parameter returns the InsightFace model used for detection. This can be useful for debugging or for reusing the model in subsequent operations without reinitializing it.
© Copyright 2024 RunComfy. All Rights Reserved.