Visit ComfyUI Online for ready-to-use ComfyUI environment
Convert MediaPipe FaceMesh facial landmarks to SEGS for AI artists to enhance generative art with detailed facial segmentation.
The MediaPipeFaceMeshToSEGS
node is designed to convert facial landmarks detected by MediaPipe FaceMesh into SEGS (Segmented Elements for Generative Systems). This node is particularly useful for AI artists who want to leverage facial segmentation in their creative projects. By transforming facial features such as the eyes, mouth, and eyebrows into segmented elements, this node allows for more precise and detailed manipulation of facial components in generative art. The primary goal of this node is to facilitate the extraction and segmentation of facial features, enabling more refined and targeted artistic effects.
The image
parameter represents the input image that contains the face to be processed. This image is analyzed by the MediaPipe FaceMesh to detect facial landmarks and features. The quality and resolution of the input image can significantly impact the accuracy of the facial segmentation.
The crop_factor
parameter determines the amount of cropping applied around the detected facial features. A higher crop factor will result in a tighter crop around the face, while a lower crop factor will include more of the surrounding area. This parameter helps in focusing on the facial features more precisely. The default value is typically set to balance between focus and context.
The bbox_fill
parameter specifies the fill value for the bounding box around the detected facial features. This value is used to fill the area outside the bounding box when cropping the image. It ensures that the cropped image has a consistent background, which can be important for further processing.
The crop_min_size
parameter sets the minimum size for the cropped image. This ensures that the cropped image is not too small, which could lead to loss of important facial details. The minimum size is defined in pixels and helps maintain a certain level of detail in the segmented output.
The drop_size
parameter defines the size threshold below which detected facial features are ignored. This helps in filtering out very small and potentially irrelevant features that might be detected by the MediaPipe FaceMesh. The drop size is specified in pixels.
The dilation
parameter controls the amount of dilation applied to the segmented masks of the facial features. Dilation can help in expanding the segmented areas, making the features more prominent. This parameter is useful for enhancing the visibility of the segmented elements.
The face
parameter is a boolean flag that indicates whether the entire face should be included in the segmentation. If set to True
, the entire face will be segmented as a single element. This is useful for applications where the whole face needs to be manipulated or analyzed.
The mouth
parameter is a boolean flag that indicates whether the mouth should be included in the segmentation. If set to True
, the mouth will be segmented as a separate element. This allows for specific manipulation of the mouth area in generative art.
The left_eyebrow
parameter is a boolean flag that indicates whether the left eyebrow should be included in the segmentation. If set to True
, the left eyebrow will be segmented as a separate element, enabling detailed manipulation of the eyebrow.
The left_eye
parameter is a boolean flag that indicates whether the left eye should be included in the segmentation. If set to True
, the left eye will be segmented as a separate element, allowing for specific artistic effects on the eye.
The left_pupil
parameter is a boolean flag that indicates whether the left pupil should be included in the segmentation. If set to True
, the left pupil will be segmented as a separate element, enabling precise control over the pupil area.
The right_eyebrow
parameter is a boolean flag that indicates whether the right eyebrow should be included in the segmentation. If set to True
, the right eyebrow will be segmented as a separate element, allowing for detailed manipulation of the eyebrow.
The right_eye
parameter is a boolean flag that indicates whether the right eye should be included in the segmentation. If set to True
, the right eye will be segmented as a separate element, enabling specific artistic effects on the eye.
The right_pupil
parameter is a boolean flag that indicates whether the right pupil should be included in the segmentation. If set to True
, the right pupil will be segmented as a separate element, allowing for precise control over the pupil area.
The SEGS
output parameter represents the segmented elements extracted from the input image. These elements include the face, mouth, eyebrows, eyes, and pupils, depending on the input parameters. Each segmented element is provided as a separate mask, allowing for detailed and targeted manipulation in generative art projects. The SEGS output is essential for creating refined and precise artistic effects based on facial features.
crop_factor
to focus more closely on the facial features if needed.dilation
parameter to enhance the visibility of the segmented elements.crop_factor
and dilation
are set to reasonable values.© Copyright 2024 RunComfy. All Rights Reserved.