Practical overview
When it fits
Use FaceLib when a Python workflow needs one or more of its documented face-analysis functions, with webcam examples for live input and lower-level methods for processing images.
Who it is for
- Python developers adding face-analysis functions to image-processing applications.
- Users exploring face detection and recognition workflows through the repository's example notebook.
- Developers who need webcam wrappers or lower-level access to detection and recognition results.
Documented uses
- Detect faces and retrieve bounding boxes, confidence scores, and landmarks.
- Align detected faces for downstream analysis.
- Estimate age and gender or return facial-expression probabilities.
- Compare detected faces against a locally organized facebank.
Requirements & limits
The repository is public and MIT licensed. Its README documents installation from Git with pip.
- The documented detector is RetinaFace, with ResNet50 and MobileNet backbone options; MobileNet is the default.
- The README identifies ShufflenetFull as the default age-and-gender model and DenseNet121 as the default expression model.
- Expression recognition expects face inputs sized 224 by 224.
- Recognition requires preparing or updating a facebank; the README shows adding identities from a folder or webcam.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare a facebank for recognition
Organize person images in the folder structure used by FaceLib's recognition documentation.
Before you start
- Face images for each person to be represented in the facebank.
Steps
Create the
Insightface/models/data/facebank/directory.Create a subfolder for each person.
Place that person's images in their corresponding subfolder.
Use the documented
add_from_folderoradd_from_webcammethod to add a person, then follow the recognition example to load or update the facebank.
Expected outcome
Person images are organized in the facebank structure used by the documented recognition workflow.
Guide limitations
- The README does not specify image-quality requirements or explain how recognition thresholds should be chosen.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 19 November 2026
- Original website title
- sajjjadayobi/FaceLib · Official homepage title · retained in its source language

