manyfaced
manyfaced is a Rust port of the face pipeline of dlib. It
is packaged for Python as one abi3 wheel for each platform. It reads the original dlib .dat
models and gives the same results as dlib.
The name comes from the Many-Faced God in A Song of Ice and Fire by George R. R. Martin. The temple of this god keeps a hall of faces.
Why this project exists
I maintain dlib-bin, a binary distribution of dlib. dlib is a very capable library, but it is difficult to build:
- The official dlib release on PyPI is a source distribution.
pip install dlibcompiles it with CMake and a C++ compiler. This takes a long time. - The build frequently fails on Windows, on new Python versions, on arm64 and on musl.
- dlib-bin solves the build problem, but it needs one build for each Python version and platform. The dlib bindings do not support abi3.
Many users cannot compile dlib on each CI run. I think that most users need only a small part of dlib: face detection, face landmarks and a descriptor to compare faces. I have no official data for this. One indication is the download count in October 2026 (pypistats): approximately 93k for face_recognition, which wraps that pipeline, and 172k for dlib.
manyfaced is a port of that subset. It is not a fork of dlib and it does not compete with dlib. The algorithms and the models are the work and the intellectual property of the dlib authors. dlib stays the reference. I am not an expert in these algorithms. Claude Code generated 100% of the code. It used the dlib source code as the specification and the dlib outputs as the test oracle.
Ported features
| Feature | dlib | manyfaced | Result compared with dlib |
|---|---|---|---|
| HOG frontal face detector | get_frontal_face_detector, fhog_object_detector |
FhogDetector |
bit-exact |
| Facial landmarks, 5 and 68 points | shape_predictor |
ShapePredictor |
identical |
| Aligned face chips | get_face_chip(s), get_face_chip_details, extract_image_chip(s) |
face_chip(s), face_chip_details, extract_chip(s) |
bit-exact |
| 128-D face descriptors (ResNet) | face_recognition_model_v1 |
FaceRecognizer |
L2 ≤ 1e-6 |
| Face clustering | chinese_whispers_clustering, chinese_whispers |
same names | identical labels |
These dlib features are not ported:
- The CNN (MMOD) face detector and the correlation tracker.
- All training, the SVMs and the other machine learning tools.
- Optimization (
find_min_global), the GUI and most of the image processing tools.
Most of these tools are useful in C++, where dlib is a toolkit with no dependencies. In Python, other libraries supply them: scikit-learn, PyTorch, OpenCV, Optuna and the standard library. Most Python users install dlib for face detection and recognition. For this reason, manyfaced ports only that part.
Installation
pip install manyfaced
manyfaced is not on PyPI at this time. To build it from the source code, refer to docs/development.md.
Wheels are available for these platforms:
- Linux: manylinux 2.28 and musllinux 1.2, x86_64 and aarch64.
- macOS: arm64.
- Windows: x64 and arm64.
Requirements:
- CPython 3.11 or later, numpy and Pillow.
- On x86_64, an x86-64-v3 CPU (AVX2 and FMA: Intel 2013 or later, AMD Zen 2017 or later).
- On Windows on Arm, a native arm64 Python. An x64 Python gets the x64 wheel and runs it in emulation.
The wheels contain the 5-point landmark model and the face recognition ResNet. The wheels do not contain the 68-point model, because it is 100 MB and its training data does not permit commercial use. For more data, refer to docs/models.md.
Usage
import manyfaced
faces = manyfaced.find_faces("photo.jpg") # list[manyfaced.Face]: rect, landmarks, descriptor
labels = manyfaced.chinese_whispers_clustering([f.descriptor for f in faces], 0.5)
find_faces accepts a numpy array, the path of an image file (str or os.PathLike) or a
Pillow image. For a path or a Pillow image, find_faces applies the EXIF orientation, so that
phone photos come out upright. The first call makes the bundled models with
the default options, and the next calls use them again.
To control each step, use the models directly:
import numpy as np
from PIL import Image
import manyfaced
image = np.asarray(Image.open("photo.jpg").convert("RGB")) # uint8 HxWx3 or HxW
detector = manyfaced.FhogDetector()
predictor = manyfaced.ShapePredictor() # bundled 5-point model
recognizer = manyfaced.FaceRecognizer() # bundled ResNet
faces = detector(image, upsample=1) # list[manyfaced.Rect]
landmarks = [predictor(image, face) for face in faces] # (5, 2) int64 arrays
descriptors = recognizer.embed_many(image, landmarks) # (N, 128) float64
labels = manyfaced.chinese_whispers_clustering(descriptors, 0.5)
- For the full API, refer to docs/api.md.
- To keep the dlib API in existing code, use
manyfaced.compat.dlib. - To run face_recognition code on manyfaced, call
manyfaced.compat.install().
For the two compatibility layers, refer to docs/compat.md.
Parity and performance
The tests compare manyfaced with dlib 20.0.1 on the dlib example images and on edge cases. For the results, refer to docs/parity.md.
On one thread, the time of each operation is 0.5× to 1.1× the dlib time on macOS arm64. On Linux aarch64 it is 0.1× to 1.4× the dlib time. The full pipeline (detection, landmarks and descriptor) takes 0.85× the dlib time on macOS arm64 and 0.27× to 0.38× on Linux aarch64. These values do not include the model load times. There are no measurements on native x86_64 at this time. For the full data, refer to docs/performance.md.
manyfaced releases the GIL in each step, and many threads can use the same models. On a Mac with 15 cores and 15 Python threads, the full pipeline does 142 images/s. dlib does 52 images/s, because its bindings release the GIL only in the detector.
License
manyfaced is available under the MIT license or the Apache-2.0 license, as you choose (LICENSE-MIT, LICENSE-APACHE). It contains code ported from dlib and the weights of the dlib frontal face detector. These are under the Boost Software License 1.0 (THIRD_PARTY_NOTICES). For the model licenses, refer to docs/models.md.
Metadata
Release files for manyfaced 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| manyfaced-0.1.1.tar.gz | 27.8 MB | With provenance | Details for manyfaced-0.1.1.tar.gz |
Built distributions (wheels)
Total release size: 225.7 MB
Release files / manyfaced-0.1.1.tar.gz
| Download URL | manyfaced-0.1.1.tar.gz |
|---|---|
| Size | 27.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47d98c3eaef4c5c22e3c3837a2ab1af6714658c98ea67406f0efce0c8df9483d
|
|
BLAKE2b-256 checksum How to use checksums |
43226fb1cc9c2468e202f1983e0b45565556797f070d2c2f9aab37b77886beb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / manyfaced-0.1.1-cp311-abi3-win_arm64.whl
| Download URL | manyfaced-0.1.1-cp311-abi3-win_arm64.whl |
|---|---|
| Size | 28.1 MB |
| Tags | CPython 3.11 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
276785925d12105e4be46a97d69bfaa8630d5d06bdb3fcd50016e87627666d8d
|
|
BLAKE2b-256 checksum How to use checksums |
ae0c30c5bf0ef7abe89303dee89737af6aac909f3567810db68587dfaf25a0e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / manyfaced-0.1.1-cp311-abi3-win_amd64.whl
| Download URL | manyfaced-0.1.1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 28.2 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2a7bca0be22be75a1faaecb42a13ac696a18268e0598f13d414d1492537641a3
|
|
BLAKE2b-256 checksum How to use checksums |
59d67197c2b7f490fea2848ca4ccc31e3370ea382475a027fdf69c05b94796f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / manyfaced-0.1.1-cp311-abi3-musllinux_1_2_x86_64.whl
| Download URL | manyfaced-0.1.1-cp311-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 28.5 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9a4b7efcb1a1b8aab908503b9aae0a168aae2954828e14c0623e7a2693f287cd
|
|
BLAKE2b-256 checksum How to use checksums |
96731cbc94e7a279437fe9cc0534bb1d8a8fcd0887aa6578c9e6be19d6ed6688
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / manyfaced-0.1.1-cp311-abi3-musllinux_1_2_aarch64.whl
| Download URL | manyfaced-0.1.1-cp311-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 28.4 MB |
| Tags | CPython 3.11 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0958d91e831e30f7d214ffb9d127d8a4f4ac57c7f7708c9829815a6d1966a91a
|
|
BLAKE2b-256 checksum How to use checksums |
1f40c0ca5fa04eac74f031aa3c2693a36219fa8b4e9054b853085dad4fff3052
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / manyfaced-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | manyfaced-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 28.3 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
5257507a19a0bc47eb6d95c99b2ac8be139cec8bfa3a918e600d0e9fbf06bd2d
|
|
BLAKE2b-256 checksum How to use checksums |
b67697e954fd7157c015deb9caf9bd3deb0cfff59c8ccebc1c2914e0ef55f83a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / manyfaced-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | manyfaced-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 28.2 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0e2d66160fe5bdde24e82483f21a7fe44d180b57e2f527eec7f17997dd166421
|
|
BLAKE2b-256 checksum How to use checksums |
324a45424b4069dfc0025b1b3064b2447777866d5f86e7053e436da3afccfd93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / manyfaced-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | manyfaced-0.1.1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 28.2 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
fda4c5ff6f07c22268781713e339d26b88fa23d90a26c0e58f008c6f0673832d
|
|
BLAKE2b-256 checksum How to use checksums |
4073dcd2ec08efaad2780f3ec44f515118c25887d615d0517f67929ce9f093ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logSecurity for manyfaced 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 8 files in this release have been uploaded with provenance metadata.
Attestation for manyfaced-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.