face-alignment
Detector 2D or 3D face landmarks from Python
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, permissive BSD licensing, zero known vulnerabilities, and strong community adoption (7536 stars). It's the right choice if you need accurate 2D/3D facial landmark detection with flexible face detector options and GPU support. Install it if facial geometry extraction is core to your application.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9+, PyTorch >=2.0, and CUDA-enabled GPU recommended for performance; first run compiles the landmark network (~25s).
- Low friction install via pip with a pure-Python wheel.
- Active maintenance with recent commits and 7536 GitHub stars.
License · maintenance · safety
BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for most projects.
last release 2026-04-06 (130 days) · last repo commit 2026-04-06 · 7,536 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 191,129 downloads/mo, #9,889 on PyPI
Alternatives
Verify before relying
pip install face-alignment
import face_alignment
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)
preds = fa.get_landmarks(input_image)- Whether pre-trained model weights are downloaded automatically on first use and their total size.
- Memory requirements for processing images on CPU versus GPU.
- Accuracy metrics or benchmark comparisons against other face alignment libraries.
What it is and what it does
face-alignment is a Python library that detects facial landmarks—specific points on a face like eyes, nose, and mouth corners—in both 2D and 3D coordinates. It wraps a state-of-the-art deep learning model (FAN) and runs on PyTorch, supporting multiple face detection backends (SFD, BlazeFace, YuNet, RetinaFace, SCRFD) with different speed-accuracy tradeoffs. You instantiate a FaceAlignment object with your chosen landmark type and face detector, then call get_landmarks() on images or directories.
The library is designed for computer vision pipelines that need precise facial geometry—facial expression analysis, face morphing, 3D face reconstruction, or face verification systems. It handles GPU/CPU device selection, batch processing, and optional torch.compile optimization. Runtime dependencies include torch, numpy, scipy, scikit-image, opencv-python, tqdm, numba, and packaging, all standard data-science and vision libraries.
Use it for
- Extract facial landmarks from photos for 3D face reconstruction or morphing applications.
- Detect 2D face keypoints for facial expression recognition or emotion analysis pipelines.
- Batch process entire image directories to generate landmark datasets for model training.
- Integrate into face verification systems that need precise landmark alignment before comparison.
- Run inference on GPU-accelerated hardware for real-time facial analysis in production systems.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, permissive BSD licensing, zero known vulnerabilities, and strong community adoption (7536 stars). It's the right choice if you need accurate 2D/3D facial landmark detection with flexible face detector options and GPU support. Install it if facial geometry extraction is core to your application.
Install
face-alignment on PyPI
Before you install
Low friction install via pip with a pure-Python wheel. Active maintenance with recent commits and 7536 GitHub stars. Requires PyTorch (>=2.0) and eight runtime dependencies including torch, numpy, scipy, scikit-image, and opencv-python, all widely available.
Requires Python 3.9+, PyTorch >=2.0, and CUDA-enabled GPU recommended for performance; first run compiles the landmark network (~25s).
License in practice
BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install face-alignment
import face_alignment
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)
preds = fa.get_landmarks(input_image)
Verify before relying
- Whether pre-trained model weights are downloaded automatically on first use and their total size.
- Memory requirements for processing images on CPU versus GPU.
- Accuracy metrics or benchmark comparisons against other face alignment libraries.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagestorchnumpyscipyscikit-imageopencv-pythontqdmnumbapackaging |
| Maintenance | Actively maintained 130 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 191,129 / month, #9,889 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9 |
Evidence: face_alignment-1.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “facial landmark detection”
- face-alignmentDetects 2D and 3D facial landmarks from images using deep learning,…
- mtcnnDetects faces and facial landmarks (eyes, nose, mouth) in images…
- face-recognitionDetects, locates, and identifies faces in images using deep learning,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also facexlib · mtcnn · retina-face · face-recognition · controlnet-aux · retinaface-py · smplx · insightface · deepface · face_recognition_models