Inkspector is a deep learning project that detects forged handwritten signatures using a Siamese Convolutional Neural Network (Siamese CNN). By comparing a test signature against a known genuine sample, the model learns to distinguish subtle differences between authentic and forged signatures.
Forgery detection is a critical problem in banking, legal, and academic sectors. Traditional visual inspection methods are subjective and error-prone. Inkspector leverages deep learning to automate and improve the accuracy of signature verification.
Instead of treating signature classification as a binary task (real vs forged), Inkspector uses a pairwise comparison approach: it determines whether two signatures come from the same person.
- Siamese Neural Network using shared CNN branches
- Each branch processes an input signature image and learns deep feature representations
- The model uses L1 distance to compare the features of a test signature and a known genuine sample
- Final prediction: same (genuine) or different (forged)
The dataset used is Handwritten Signatures | Genuine and Forged from Kaggle.
- 150 genuine + 150 forged signatures (300 total)
- Format: Grayscale
.png
images
Dataset Structure:
genuine/
: 5 samples each from 30 individualsforged/
: 5 forged samples for the same 30 individuals
File Naming Convention: NFI-XXXYYZZZ
XXX
: ID of the person who performed the signatureYY
: Sample numberZZZ
: ID of the person the signature claims to represent
Examples:
NFI-00602023
: Person 006 forged a signature of person 023 → forgedNFI-02103021
: Person 021 signed their own signature → genuine
- Training Accuracy: 99.46%
- Validation Accuracy: 97.14%
- Custom confusion heatmaps and model visualization included
Inkspector/
├── sample_Signature/
│ ├── genuine/
│ └── forged/
├── dasv.ipynb # Main notebook
├── Signature Forgery Detection.pptx
├── requirements.txt
└── README.md
- Clone this repo
git clone https://github.com/jessechumo/inkspector.git
cd inkspector
- Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # For Linux/macOS
venv\Scripts\activate # For Windows
- Install dependencies
pip install -r requirements.txt
- Run the notebook
jupyter notebook dasv.ipynb
- Siamese architecture for pairwise signature verification
- Heatmap visualizations to evaluate model behavior
- Plot of network architecture using Matplotlib
- Clean preprocessing with padding, normalization, and resizing
- Compatible across Linux (CPU) and Windows (GPU)
- Expand dataset with real-world samples
- Add data augmentation for robustness
- Experiment with deeper or hybrid models
- Deploy as a web app for real-time signature verification
- Dataset: Divyansh Rai on Kaggle