afis
AFIS toolkit for fingerprint minutiae extraction, matching, and quality assessment.
Install
pip install afis
# or
uv add afis
From source (includes the optional native NBIS library):
make install # uv sync + make native
Quickstart
from afis import NbisExtractor, MindtctExtractor, SafisExtractor, LeaderExtractor, compute_nfiq2
nbis = NbisExtractor()
a = nbis.extract_minutiae("finger_a.png")
b = nbis.extract_minutiae("finger_b.png")
print(nbis.match(a, b))
# Mix extractor / matcher
proc = NbisExtractor(extractor="gabor", matcher="mcc")
t = proc.extract_minutiae("finger_a.png")
leader = LeaderExtractor()
lt = leader.extract_minutiae("finger_a.png")
q = compute_nfiq2(image) # NFIQ2-style 0–100
print(q.score)
Extractors
| Name | Kind |
|---|---|
nbis_mindtct |
Native NBIS MINDTCT / LFS V2 |
mindtct |
Pure-Python MINDTCT |
safis |
SourceAFIS minutiae path |
gabor |
Gabor enhance + crossing-number |
stft |
STFT enhance + crossing-number |
leader |
LEADER ONNX |
Matchers
| Name | Kind |
|---|---|
nbis_bozorth3 |
Native Bozorth3 |
bozorth3 |
Pure-Python Bozorth3 |
safis |
SourceAFIS edge crawl |
mcc |
Minutia Cylinder-Code |
geometric |
Rigid geometric |
Quality (NFIQ2)
compute_nfiq2(image) returns a 0–100 score (ISO/IEC 29794-4 / NFIQ 2 style).
Benchmark (FVC2004)
FVC B-set protocol on DB1–4_B (10×8 images/DB): genuine = all same-finger impression pairs; impostor = first impressions across fingers. Metrics are macro-averaged over the four DBs.
uv run python examples/benchmark.py \
--root /path/to/fingerprint_datasets \
--workers 10
Subset / custom combos:
uv run python examples/benchmark.py \
--dbs DB1_B DB3_B --max-fingers 8 --max-imps 4 \
--extractors nbis_mindtct leader \
--matchers nbis_bozorth3 mcc geometric \
--workers 8
Results (FVC2004 DB1–4_B, full)
| Extractor | Matcher | EER % | FMR100 % | verify ms | extract ms | match ms |
|---|---|---|---|---|---|---|
| leader | geometric | 6.78 | 13.48 | 1175.9 | 1167.0 | 8.91 |
| nbis_mindtct | nbis_bozorth3 | 10.10 | 25.45 | 35.6 | 20.9 | 14.75 |
| leader | nbis_bozorth3 | 11.82 | 17.59 | 1170.3 | 1167.0 | 3.31 |
| leader | mcc | 14.03 | 24.91 | 1169.4 | 1167.0 | 2.41 |
| nbis_mindtct | mcc | 15.52 | 26.79 | 25.7 | 20.9 | 4.83 |
| nbis_mindtct | geometric | 21.34 | 46.70 | 31.9 | 20.9 | 11.08 |
Presets
| Preset | Extractor | Matcher | EER % | verify ms |
|---|---|---|---|---|
| fast | nbis_mindtct | mcc | 15.52 | 25.7 |
| balanced | leader | nbis_bozorth3 | 11.82 | 1170.3 |
| deep | leader | geometric | 6.78 | 1175.9 |
verify_ms ≈ mean extract + mean match (1:1 verify proxy).
CLI
afis extract finger.png finger.xyt
afis extract finger.png out.xyt --extractor mindtct
afis extract finger.png out.xyt --extractor leader
afis match a.xyt b.xyt --method bozorth3 --height 480
afis match a.xyt b.xyt --method mcc
afis quality finger.png
Develop
make install
make test
make build
References
- NIST NBIS — MINDTCT / LFS V2 / Bozorth3. NIST Biometric Image Software
- NFIQ 2 / ISO/IEC 29794-4 — usnistgov/NFIQ2
- SourceAFIS — algorithm
- MCC — Cappelli, Ferrara & Maltoni (2010). IEEE TPAMI. https://doi.org/10.1109/TPAMI.2010.52
- LEADER — pyfing
- Gabor enhancement — Hong, Wan & Jain (1998). IEEE TPAMI
- ISO/IEC 19794-2 — Finger minutiae data interchange
- FVC / FVC-onGoing — Verification benchmarks (EER, FMR, FNMR)
License
MIT. Copyright (c) 2026 Ashok Pant.
Metadata
Release files for afis 1.2.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 | |
|---|---|---|---|---|
| afis-1.2.1.tar.gz | 4.9 MB | With provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| afis-1.2.1-py3-none-manylinux_2_38_x86_64.whl | Python 3 | none | Linux glibc 2.38+ x86-64 | Details |
| afis-1.2.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 13.6 MB
Release files / afis-1.2.1.tar.gz
| Download URL | afis-1.2.1.tar.gz |
|---|---|
| Size | 4.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7c9cc4e38772537556de9d90fca6527b7f65b725c21f6414e3c93642b65d797
|
|
BLAKE2b-256 checksum How to use checksums |
636344daeb1941cc1680cd37bfd5fa2394c7757806e822d2dfcdbef5c2d7a407
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 28, 2026.
Transparency logRelease files / afis-1.2.1-py3-none-manylinux_2_38_x86_64.whl
| Download URL | afis-1.2.1-py3-none-manylinux_2_38_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Linux glibc 2.38+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
7512e39906a876bd6497d7b3da446bc8ff56da9e0aad1e52b9b58ad5b1371e52
|
|
BLAKE2b-256 checksum How to use checksums |
87949e6fbcce347887b9b4f54c680199f3109f62500abc54b0b1a84b340bbbd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 28, 2026.
Transparency logRelease files / afis-1.2.1-py3-none-macosx_11_0_arm64.whl
| Download URL | afis-1.2.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
be15f1c602fbb68799378bd92babe67232079799c52406ec9a4d14741c099ec1
|
|
BLAKE2b-256 checksum How to use checksums |
287fa1b2830bc9fae9572493146807680d35845ab5332a3d9fa2e54c1124524c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 28, 2026.
Transparency logSecurity for afis 1.2.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 3 files in this release have been uploaded with provenance metadata.
Attestation for afis-1.2.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 Jul 28, 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.