Tech Stack:
- Python
- C++
- MySQL
- Tkinter
- OpenCV
- SecuGen SDK
- Minutiae-Based Matching
Auth2X is a dual-mode biometric authentication system that supports:
- Face recognition (via OpenCV-based facial encoding)
- Fingerprint matching (via SecuGen Hamster Plus and custom minutiae comparison)
It supports encrypted storage of biometric data using Fernet AES encryption and integrates with a Tkinter GUI for both registration and authentication.
- π Fingerprint & Face Authentication
- π Encrypted Biometric Data Storage
- 𧬠Minutiae Extraction and Matching (No third-party matcher)
- ποΈ User info + biometric data stored in MySQL
- π₯οΈ C++ Executable for Fingerprint Capture using SecuGen SDK
- π§ͺ Match Ratio-based fingerprint comparison with logs
This project uses a minutiae-based fingerprint matching pipeline that works as follows:
- Captured
.datimage files (260x300) are loaded as raw binary - Preprocessing includes binarization, skeletonization, and noise filtering
- Minutiae points (ridge endings & bifurcations) are extracted from the fingerprint skeleton
- Matching is performed by comparing geometrical proximity (Euclidean distance < 10 pixels) and type similarity
- Match ratio is calculated based on overlapping features
- If the match ratio > 0.65, authentication is accepted
All extracted templates are Fernet-encrypted before being stored in the database.
numpyβ Image array manipulationmysql-connector-pythonβ Database connectioncryptography.fernetβ AES encryption of biometric templatesscikit-imageβ Image skeletonization and preprocessingtkinterβ GUI interface for user interactionopencv-pythonβ Face capture and recognitionsv-ttkβ Dark theme styling for Tkinter GUI
Auth2X/
βββ gui/
β βββ home_gui.py
β βββ login_gui.py
β βββ register_gui.py
β βββ result_gui.py
βββ face_authentication/
β βββ face_auth.py
βββ Face_registration/
β βββ face_registeration.py
βββ fingerprint/
β βββ capture/
β βββ config/
β β βββ config.json
β β βββ db_config.json
β β βββ secret.key
β βββ store_template.py
β βββ match_template.py
β βββ match_utils.py
β βββ fingerprints/- Python 3.10+
- MySQL Server
- Visual Studio 2019+
- SecuGen SDK (FDx Pro SDK)
- Python dependencies:
pip install mysql-connector-python cryptography opencv-python-headless numpy scikit-image sv-ttk pillowCREATE DATABASE auth2x;
USE auth2x;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) NOT NULL UNIQUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE biometric_data (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
biometric_type ENUM('face', 'fingerprint') NOT NULL,
data BLOB NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id)
);{
"encrypt_fingerprint": true
}{
"host": "localhost",
"user": "root",
"password": "yourpassword",
"database": "auth2x"
}from cryptography.fernet import Fernet
with open("secret.key", "wb") as f:
f.write(Fernet.generate_key())- Use Visual Studio to build
CaptureFingerprint.cpp - Link with
sgfplib.lib - Place all required DLLs next to the EXE
- set your fingerprints directory path in sln
- Output:
CaptureFingerprint.exeinx64/Debug/
python gui/home_gui.py- Capture fingerprint via SecuGen SDK
- Store image as
.dat - Extract minutiae from thinned skeleton
- Encrypt (if enabled in
config.json) - Save in MySQL
biometric_datatable
- Capture new fingerprint
- Extract minutiae
- Fetch and decrypt stored template
- Compare using:
- Minutiae type match (ending/bifurcation)
- Euclidean distance < 10 px
- Match if ratio > 0.65
- Terminal logs:
Matches: 24, Ratio: 0.75
π€ Fingerprint Contributors:
- Capture live webcam image using OpenCV
- Detect face using
face_recognitionlibrary - Extract 128-dimension face encoding
- Encrypt the encoding with Fernet
- Store securely in MySQL
- Fetch encrypted encoding from DB
- Decrypt using Fernet key
- Compare live webcam face with stored encoding using
compare_faces() - Authenticate if match returns True
πΌοΈ Uses real-time webcam view with prompt to press s for scan.
π€ Face Recognition Contributors:
- Fingerprint
.datstorage:username.datandusername_live.dat
- Logs printed from matcher:
Matches: X, Ratio: 0.YYY
- Face module logs:
- Decryption failures
- Encoding mismatches
Q: Low match ratio?
A: Re-align finger, check capture quality, avoid moisture and blur.
Q: Face not detected?
A: Use good lighting, keep background simple, position face fully in frame.
- Fingerprint: Ramlah's LinkedIn, Talal's LinkedIn
- Face: Ayaan's LinkedIn, Umar's LinkedIn