ComfyUI  >  Nodes  >  ComfyUI's ControlNet Auxiliary Preprocessors >  MediaPipe Face Mesh

ComfyUI Node: MediaPipe Face Mesh

Class Name

MediaPipe-FaceMeshPreprocessor

Category
ControlNet Preprocessors/Faces and Poses Estimators
Author
Fannovel16 (Account age: 3127 days)
Extension
ComfyUI's ControlNet Auxiliary Preproces...
Latest Updated
6/18/2024
Github Stars
1.6K

How to Install ComfyUI's ControlNet Auxiliary Preprocessors

Install this extension via the ComfyUI Manager by searching for  ComfyUI's ControlNet Auxiliary Preprocessors
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI's ControlNet Auxiliary Preprocessors 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 Cloud 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

MediaPipe Face Mesh Description

Detect and analyze facial landmarks, generate detailed mesh representation for face-related applications.

MediaPipe Face Mesh:

The MediaPipe Face Mesh node is designed to detect and analyze facial landmarks within an image, providing a detailed mesh representation of the face. This node leverages the powerful MediaPipe library to identify and map facial features, which can be particularly useful for applications in augmented reality, facial recognition, and animation. By processing the input image, it can detect multiple faces and generate a mesh that outlines key facial landmarks, enhancing the ability to create more realistic and interactive digital art. The node is highly configurable, allowing you to adjust parameters such as the number of faces to detect and the confidence threshold for detection, ensuring flexibility and precision in various use cases.

MediaPipe Face Mesh Input Parameters:

max_faces

This parameter specifies the maximum number of faces that the node will attempt to detect in the input image. It allows you to control the computational load and focus on a specific number of faces. The value can range from 1 to 50, with a default setting of 10. Adjusting this parameter can help optimize performance based on the expected number of faces in your images.

min_confidence

This parameter sets the minimum confidence threshold for face detection. It determines how certain the model must be before it considers a detected face as valid. The value ranges from 0.01 to 1.0, with a default of 0.5. A higher confidence threshold means the model will be more selective, potentially reducing false positives but also possibly missing some faces. Conversely, a lower threshold increases sensitivity but may include more false positives.

MediaPipe Face Mesh Output Parameters:

IMAGE

The output of this node is an image with the detected facial landmarks overlaid. This processed image highlights the key points and connections that form the facial mesh, providing a visual representation of the detected faces and their features. This output can be used for further processing or directly in applications that require facial landmark data.

MediaPipe Face Mesh Usage Tips:

  • To optimize performance for images with a known number of faces, set the max_faces parameter to a value close to the expected number of faces.
  • Adjust the min_confidence parameter based on the quality and lighting conditions of your images. For well-lit and clear images, a higher confidence threshold can reduce false positives.

MediaPipe Face Mesh Common Errors and Solutions:

ImportError: No module named 'mediapipe'

  • Explanation: This error occurs when the MediaPipe library is not installed on your system.
  • Solution: Ensure that the dependencies are installed by running the install_deps function, which installs MediaPipe and upgrades protobuf if necessary.

ValueError: Invalid value for max_faces

  • Explanation: This error happens if the max_faces parameter is set outside the allowed range of 1 to 50.
  • Solution: Adjust the max_faces parameter to a value within the valid range.

ValueError: Invalid value for min_confidence

  • Explanation: This error occurs if the min_confidence parameter is set outside the allowed range of 0.01 to 1.0.
  • Solution: Set the min_confidence parameter to a value within the valid range.

MediaPipe Face Mesh Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI's ControlNet Auxiliary Preprocessors
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.