yakhyo/face-parsing
Real-time face parsing and facial semantic segmentation with BiSeNet - PyTorch training, ONNX export, pretrained weights.
What it solves
This project provides a precise way to perform "face parsing," which is the process of automatically identifying and segmenting specific facial features—such as eyes, nose, mouth, and skin—within an image. This technology is essential for applications like digital makeup, augmented reality (AR) filters, facial recognition, and emotion detection.
How it works
It uses a "Bilateral Segmentation Network" (BiSeNet) architecture. The model takes a face image as input and produces a detailed mask that maps each pixel to a specific facial component. You can choose between two backbone architectures, ResNet18 or ResNet34, depending on your needs for speed or precision. The repository includes tools to train your own models, run inference on images, and export the models to the ONNX format for use in other software environments.
Who it’s for
This tool is designed for developers and researchers working on computer vision projects who need a reliable, pre-trained, or customizable model for facial feature extraction. It is particularly useful for those building AR applications or automated image editing tools.
Highlights
- Highly accurate segmentation of facial landmarks and components.
- Supports both ResNet18 and ResNet34 backbone architectures.
- Includes full pipelines for training, inference, and ONNX model conversion.
- Pre-trained weights are available for immediate use.
- Proven reliability, as it is utilized by major open-source projects like facefusion.
Related
- Project
- Project
- Project
- Project