ComfyUI > Nodes > ComfyUI Deepface > Deepface Extract Faces

ComfyUI Node: Deepface Extract Faces

Class Name

DeepfaceExtractFaces

Category
deepface
Author
jordoh (Account age: 5658days)
Extension
ComfyUI Deepface
Latest Updated
2026-02-01
Github Stars
0.04K

How to Install ComfyUI Deepface

Install this extension via the ComfyUI Manager by searching for ComfyUI Deepface
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Deepface 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Deepface Extract Faces Description

Extracts faces from images using DeepFace for facial recognition and preprocessing tasks.

Deepface Extract Faces:

The DeepfaceExtractFaces node is designed to efficiently extract faces from images using advanced facial recognition technology. This node leverages the capabilities of the DeepFace library to identify and isolate faces within a given image, making it an invaluable tool for AI artists and developers working with facial data. By focusing on face extraction, this node allows you to preprocess images for further analysis or manipulation, such as emotion detection, age estimation, or identity verification. The primary goal of this node is to streamline the process of face detection and extraction, providing a reliable and automated solution that enhances the workflow of projects involving facial recognition and analysis.

Deepface Extract Faces Input Parameters:

images

This parameter represents the collection of images from which faces will be extracted. The images should be provided in a format compatible with the DeepFace library, typically as tensors or arrays. The quality and resolution of the images can impact the accuracy of face detection, so it is advisable to use clear and well-lit images for optimal results.

target_face_size

This parameter specifies the desired size of the extracted face images. It is defined as a tuple representing the width and height in pixels. The target face size ensures that all extracted faces are resized to a consistent dimension, which can be crucial for subsequent processing steps. The default value is typically set to a standard size, but it can be adjusted based on specific project requirements.

detector_backend

This parameter determines the backend technology used for face detection. Options include "opencv", "ssd", "dlib", "mtcnn", "retinaface", "mediapipe", "yolov8", "yunet", and "fastmtcnn". Each backend has its strengths and weaknesses, with some offering faster processing times and others providing higher accuracy. The default backend is often set to "retinaface" due to its balance of speed and precision, but you can choose the one that best fits your needs.

enforce_detection

This boolean parameter dictates whether the node should enforce the detection of faces in the images. When set to True, the node will raise an error if no faces are detected, ensuring that only images with detectable faces are processed. This can be useful for maintaining data integrity in applications where face presence is mandatory. The default setting is typically False, allowing the node to proceed even if no faces are found.

Deepface Extract Faces Output Parameters:

output_images

This parameter contains the extracted face images as a tensor. Each face detected in the input images is isolated and resized according to the specified target face size, then returned as part of this output. The output images can be used for further analysis or manipulation, serving as a foundation for tasks such as facial recognition, emotion analysis, or identity verification.

Deepface Extract Faces Usage Tips:

  • Ensure that input images are of high quality and well-lit to improve face detection accuracy.
  • Experiment with different detector backends to find the best balance between speed and accuracy for your specific use case.
  • Adjust the target face size to match the requirements of subsequent processing steps, ensuring consistency across all extracted faces.

Deepface Extract Faces Common Errors and Solutions:

No faces detected

  • Explanation: This error occurs when the node is unable to detect any faces in the provided images.
  • Solution: Verify that the input images are clear and contain visible faces. Consider using a different detector backend or adjusting the image quality.

ValueError during face extraction

  • Explanation: This error may arise if there is an issue with the face extraction process, possibly due to incompatible image formats or incorrect parameter settings.
  • Solution: Ensure that the input images are in the correct format and that all parameters are set appropriately. If the problem persists, try using a different detector backend or adjusting the target face size.

Deepface Extract Faces Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Deepface
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.