A project implementing fingerprint matching using Siamese Neural Networks (SNNs) for efficient and accurate pattern recognition.
This repository explores advanced biometric authentication through SNNs, leveraging similarity-based distance approach for real-time fingerprint analysis.
- Efficient: Utilizes lightweight CNN subnets to capture features and calculate the similarity using L2 distance metrics.
- Accurate: Achieves high matching precision on standard datasets.
- Scalable: Modular design for integration into larger biometric systems.
- Clone the repo
git clone https://github.com/OmGhag/FingerPrintMatchingSNN.git
- Create a Python virtual environment (Python 3.8+ required)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
Key libraries include: NumPy, Keras, Tensorflow, OpenCV (for image processing).
pip install -r requirements.txt
To get started quickly, follow these steps in order:
- Run the data preparation script to set up the dataset:
python data.py
- Open and run all cells in
preprocess.ipynbto preprocess the fingerprint data (e.g., minutiae extraction and feature engineering). - Finally, open and run all cells in
train.ipynbto train the SNN model on the preprocessed data.
Run the script to load and organize the fingerprint dataset:
python data.pyThis handles downloading or loading sample data into the appropriate directories.
Use the Jupyter notebook for data cleaning and feature extraction:
- Launch Jupyter:
jupyter notebook preprocess.ipynb - Execute all cells sequentially. This includes steps like image enhancement, minutiae detection using OpenCV, and normalization for SNN input.
Train the SNN using the dedicated notebook:
- Launch Jupyter:
jupyter notebook train.ipynb - Execute all cells. This covers model architecture setup (Leaky Integrate-and-Fire neurons with STDP), training loop, and evaluation.
- Minutiae Extraction: Ridge endings and bifurcations detected via OpenCV.
- SNN Architecture: Dual CNN Subnet architecture making it lightweight and scalable.
- Evaluation Metrics: .
After training, saved models can be used for inference in custom scripts.