Visit ComfyUI Online for ready-to-use ComfyUI environment
Analyze facial attributes (gender, race, emotion, age) using DeepFace library for AI artists to enhance creative outputs.
The DeepfaceAnalyzeFaceAttributes node is designed to analyze facial attributes from an image using the DeepFace library. This node can detect and provide detailed information about the gender, race, emotion, and age of the largest face in the image. It is particularly useful for AI artists who want to incorporate facial attribute analysis into their projects, enabling them to create more personalized and context-aware artworks. By leveraging advanced facial recognition and analysis techniques, this node helps you gain insights into the demographic and emotional characteristics of the subjects in your images, enhancing the depth and relevance of your creative outputs.
This parameter represents the input image that will be analyzed. The image should be in a format compatible with the DeepFace library, such as a tensor or numpy array. The node will convert the image to a numpy array if necessary.
This parameter specifies the backend to be used for face detection. Available options include "opencv", "ssd", "dlib", "mtcnn", "retinaface", "mediapipe", "yolov8", "yunet", and "fastmtcnn". The default value is "yolov8". The choice of backend can impact the accuracy and speed of face detection.
This boolean parameter determines whether the node should analyze the gender of the detected face. The default value is True. If set to False, gender analysis will be skipped.
This boolean parameter determines whether the node should analyze the race of the detected face. The default value is True. If set to False, race analysis will be skipped.
This boolean parameter determines whether the node should analyze the emotion of the detected face. The default value is True. If set to False, emotion analysis will be skipped.
This boolean parameter determines whether the node should analyze the age of the detected face. The default value is True. If set to False, age analysis will be skipped.
This boolean parameter indicates whether the input image is a standard single face image. The default value is False. If set to True, the node will assume that the image contains only one face and will not enforce detection.
This output parameter provides the gender of the detected face. The value will be "M" for male, "F" for female, or an empty string if gender analysis is not performed or the gender cannot be determined.
This output parameter provides the race of the detected face. Possible values include "indian", "asian", "latino hispanic", "black", "middle eastern", and "white". If race analysis is not performed or the race cannot be determined, the value will be an empty string.
This output parameter provides the dominant emotion of the detected face. Possible values include "sad", "angry", "surprise", "fear", "happy", "disgust", and "neutral". If emotion analysis is not performed or the emotion cannot be determined, the value will be an empty string.
This output parameter provides the age of the detected face as a string. If age analysis is not performed or the age cannot be determined, the value will be "0".
This output parameter provides a JSON string containing detailed information about the detected face, including the region, confidence, and other attributes. This can be useful for further analysis or debugging.
© Copyright 2024 RunComfy. All Rights Reserved.