#100100th of 105 in ML frameworks and libraries
face-alignment
Python library that detects 2D and 3D facial landmarks with the FAN network
- Stars
- 7.5k
- License
- BSD-3-Clause
- Last commit
- Apr 2026
- Last release
- Apr 2026
- Language
- Python
7,475 on 1 Apr 20267,546 on 21 Oct 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
PyTorch-based Python package that returns 2D or 3D facial landmarks for images or whole directories, using the FAN face alignment network. Face detection is pluggable: SFD by default, with BlazeFace, YuNet, RetinaFace, SCRFD or precomputed boxes as alternatives. It runs on CPU, CUDA or Apple MPS and compiles the landmark network with torch.compile by default.
Who it is for: Python developers needing facial landmark detection in computer vision pipelines
Strengths
- Installs with pip; same API for 2D and 3D landmarks
- Six detector options, with per-detector CPU/MPS timings in the README
- Runs on CPU, CUDA or Apple MPS; bfloat16 and batch size configurable
- Can load precomputed bounding boxes, useful for evaluation
Weaknesses
- README recommends the Lua version for numerical evaluation, since it matches the paper's models
- Default SFD detector is slow on CPU (138.8 ms on Apple M2)
- First run with torch.compile takes about 25 seconds
- dlib detector is deprecated; SCRFD needs the extra onnxruntime package
What it needs
- GPU optional
- Docker
- Needs PyTorch >=2.0, Python 3.9+, onnxruntime (optional, for SCRFD)
- Models: FAN 2D landmarks, FAN 3D landmarks, SFD, BlazeFace, YuNet
Also in ML frameworks and libraries
See all 105| Rank | Project | Score |
|---|---|---|
| 1 | transformersPython library defining open models for text, vision, audio and multimodal tasks | 94 out of 100 |
| 2 | pytorchPython tensor library with GPU support and tape-based autograd for deep learning | 94 out of 100 |
| 3 | ultralyticsPython library and CLI for training and running YOLO vision models | 93 out of 100 |
| #4 | pytorch-image-modelsPyTorch library of image models, pretrained weights and reference training scripts | 92 out of 100 |
| #5 | supervisionPython toolkit for loading, annotating and counting computer vision detections | 91 out of 100 |