ComfyUI > Nodes > a-person-mask-generator > A Person Face Landmark Mask Generator

ComfyUI Node: A Person Face Landmark Mask Generator

Class Name

APersonFaceLandmarkMaskGenerator

Category
A Person Mask Generator - David Bielejeski
Author
djbielejeski (Account age: 4285days)
Extension
a-person-mask-generator
Latest Updated
2024-06-15
Github Stars
0.23K

How to Install a-person-mask-generator

Install this extension via the ComfyUI Manager by searching for a-person-mask-generator
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter a-person-mask-generator in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

A Person Face Landmark Mask Generator Description

Generate precise facial landmark masks using MediaPipe Face Mesh for isolating facial features in artwork.

A Person Face Landmark Mask Generator:

The APersonFaceLandmarkMaskGenerator is a specialized node designed to generate precise facial landmark masks from images. Utilizing the powerful MediaPipe Face Mesh solution, this node identifies and processes facial landmarks to create masks for various facial features such as the face oval, eyebrows, eyes, pupils, and lips. This functionality is particularly beneficial for AI artists who need to isolate or highlight specific facial regions in their artwork. By providing detailed and accurate masks, the node enhances the ability to manipulate and edit facial features with high precision, making it an essential tool for advanced image processing and creative projects.

A Person Face Landmark Mask Generator Input Parameters:

images

This parameter accepts the input images that you want to process. The images should be in a format compatible with the node's processing capabilities, typically as tensors or arrays. The quality and resolution of the input images can significantly impact the accuracy of the generated masks.

face

A boolean parameter that, when set to True, instructs the node to generate a mask for the face oval. This mask outlines the general shape of the face, excluding other facial features. Default value is False.

left_eyebrow

A boolean parameter that, when set to True, instructs the node to generate a mask for the left eyebrow. This mask isolates the left eyebrow region. Default value is False.

right_eyebrow

A boolean parameter that, when set to True, instructs the node to generate a mask for the right eyebrow. This mask isolates the right eyebrow region. Default value is False.

left_eye

A boolean parameter that, when set to True, instructs the node to generate a mask for the left eye. This mask isolates the left eye region. Default value is False.

right_eye

A boolean parameter that, when set to True, instructs the node to generate a mask for the right eye. This mask isolates the right eye region. Default value is False.

left_pupil

A boolean parameter that, when set to True, instructs the node to generate a mask for the left pupil. This mask isolates the left pupil region. Default value is False.

right_pupil

A boolean parameter that, when set to True, instructs the node to generate a mask for the right pupil. This mask isolates the right pupil region. Default value is False.

lips

A boolean parameter that, when set to True, instructs the node to generate a mask for the lips. This mask isolates the lip region. Default value is False.

number_of_faces

An integer parameter that specifies the maximum number of faces to detect in the input images. This allows the node to handle images with multiple faces. The default value is typically 1, but it can be adjusted based on the specific requirements of your project.

confidence

A float parameter that sets the minimum detection confidence threshold for the face mesh model. This value ranges from 0.0 to 1.0, with higher values indicating stricter confidence requirements for detecting facial landmarks. The default value is usually around 0.5.

A Person Face Landmark Mask Generator Output Parameters:

masks

The output is a tensor containing the generated masks for the specified facial features. Each mask is a binary image where the detected regions are highlighted. These masks can be used for further image processing tasks, such as segmentation, editing, or applying effects to specific facial regions.

A Person Face Landmark Mask Generator Usage Tips:

  • Ensure that the input images are of high quality and resolution to improve the accuracy of the facial landmark detection.
  • Adjust the confidence parameter to balance between detection accuracy and the inclusion of more facial landmarks.
  • Use the number_of_faces parameter to handle images with multiple faces, ensuring that all desired faces are processed.
  • Experiment with different combinations of facial feature parameters (e.g., face, left_eye, lips) to generate masks for specific regions of interest.

A Person Face Landmark Mask Generator Common Errors and Solutions:

"No faces detected in the image"

  • Explanation: The node was unable to detect any faces in the input image, possibly due to low image quality or an inappropriate confidence threshold.
  • Solution: Ensure the input image is clear and well-lit. Try lowering the confidence parameter to allow the model to detect faces with lower confidence.

"Invalid image format"

  • Explanation: The input image is not in a format that the node can process.
  • Solution: Convert the image to a compatible format, such as a tensor or array, before passing it to the node.

"IndexError: list index out of range"

  • Explanation: This error occurs when the node tries to access facial landmarks that do not exist, possibly due to incorrect number_of_faces or poor detection.
  • Solution: Verify that the number_of_faces parameter is set correctly and that the input image contains detectable faces. Adjust the confidence parameter if necessary.

A Person Face Landmark Mask Generator Related Nodes

Go back to the extension to check out more related nodes.
a-person-mask-generator
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.