The problem
Signatures remain the most widely used biometric on paper — bank cheques, legal documents and exam forms all depend on a human deciding whether two signatures match. That manual check is slow, inconsistent and easy to fool with a practiced forgery. Offline signature verification automates it: given a reference signature and a questioned one, the system outputs a similarity score and an accept/reject decision. This project implements that with a Siamese neural network — twin weight-shared CNNs that learn a 128-dimensional embedding where genuine pairs sit close together and forgeries sit far apart. Training uses the CEDAR dataset's genuine signatures and real skilled forgeries, and evaluation is writer-disjoint, so the model is tested on writers it has never seen. A pair-comparison web demo makes the whole pipeline tangible: pick two signatures, watch the preprocessing, and see the similarity score and decision update live.
This is a built-to-order software project: the training notebook, trained Siamese model, web demo and the complete viva kit (report, PPT, Q&A) are prepared fresh for you.
The Problem
Every bank branch, registrar office and university exam cell still verifies signatures by eye. A clerk compares the signature on a cheque or answer sheet against a specimen on file and makes a judgement call in seconds. The problem is threefold: humans are inconsistent (the same clerk decides differently when tired or rushed), unscalable (thousands of documents a day cannot each get careful attention), and vulnerable (a skilled forgery that copies the overall shape often passes a quick glance). Rule-based image comparison fails because no two genuine signatures are pixel-identical — natural variation in slant, size and stroke order defeats template matching. What is needed is a learned notion of "same writer": a model that tolerates natural variation while still catching imitations. Siamese networks solve exactly this by learning an embedding space from genuine/forgery pairs, and the CEDAR dataset provides the crucial ingredient — real skilled forgeries, not synthetic ones — so the model trains against the actual attack it must stop.
2,640 signatures from 55 writers: 24 genuine and 24 skilled forgeries each, 300 dpi grayscale.
Follow the working sequence
How it works
- The CEDAR dataset's 2,640 signatures (55 writers, each with 24 genuine signatures and 24 skilled forgeries, scanned at 300 dpi grayscale) are split writer-disjoint: 40 writers for training, 15 held out for testing.
- Every image passes through the same preprocessing: grayscale conversion, Otsu binarization, tight bounding-box crop around the ink, resize to 128×128 and normalization.
- Training pairs are mined each epoch: genuine–genuine pairs labeled similar and genuine–forgery pairs labeled dissimilar, balanced within every batch.
- The twin CNNs encode each image to a 128-dimensional embedding; contrastive loss with margin 1.0 pulls similar pairs together and pushes dissimilar pairs apart. Training runs for approximately 40 epochs (design target), keeping the checkpoint with the best validation EER.
- On the 15 unseen writers, pair distances are scored across thresholds to plot FAR/FRR curves; the equal error rate is read off and the operating threshold is fixed at that point.
- The exported model and threshold ship in the web demo: two signatures in, preprocessing, embeddings, cosine distance, similarity score and an accept/reject decision out.
- The report documents the architecture, training curves, the FAR/FRR trade-off, ROC curve and a per-writer error breakdown for the viva.
Tech stack:
- Python 3, PyTorch
- OpenCV, scikit-image (preprocessing)
- NumPy, Matplotlib, scikit-learn (metrics)
- Jupyter Notebook (training & evaluation)
- CEDAR signature dataset (University at Buffalo)
- HTML5 + JavaScript (pair-comparison demo)
- Contrastive loss with cosine-distance scoring
Dataset & model details
- Dataset: CEDAR offline signature dataset — 55 writers, each contributing 24 genuine signatures and 24 skilled forgeries, for 1,320 genuine + 1,320 forgery images total; 300 dpi grayscale scans; released by the Center of Excellence for Document Analysis and Recognition (CEDAR), University at Buffalo. Classes are per-writer genuine vs forgery; the split is writer-disjoint (40 train / 15 test writers).
- Task: Offline (static-image) signature verification — a 1:1 matching problem. Input = a pair of 128×128 grayscale signature images (reference + questioned); output = a similarity score in [0, 1] and an accept/reject decision at the EER operating threshold.
- Model: Siamese CNN with twin weight-shared branches: four convolution–pooling blocks followed by dense layers producing a 128-dimensional L2-normalized embedding; trained with contrastive loss (margin 1.0); decision by cosine distance against the validation-tuned threshold.
- Metrics: Equal error rate (EER), false acceptance rate (FAR), false rejection rate (FRR), ROC-AUC on the 15 unseen writers. Design target: EER under 10% on unseen writers. No accuracy is claimed as measured until the training run is executed for the order; the report documents the actual achieved figures.
| Parameter | Value |
|---|---|
| Input format | 128 × 128 grayscale signature image, normalized (design choice) |
| Dataset | CEDAR: 55 writers, 24 genuine + 24 skilled forgeries per writer |
| Model | Siamese CNN, twin weight-shared branches, 128-d embedding |
| Loss | Contrastive loss, margin 1.0 (design target) |
| Decision rule | Cosine distance vs threshold tuned at validation EER |
| Equal error rate | Under 10% on unseen writers (design target, not a measured claim) |
| Training time | Approximately 2–4 hours on a single GPU (expected) |
| Inference | Approximately 25 ms per pair on CPU (expected) |
| Demo | Single-file web app, runs offline after download |
Project features
- [Siamese CNN architecture] Twin weight-shared convolutional branches encode each signature into a 128-dimensional L2-normalized embedding; the network is designed for this project with documented layer choices, not copied from a tutorial.
- [Contrastive-loss training] Genuine pairs are pulled together and genuine–forgery pairs pushed apart with a margin of 1.0, so the embedding space directly encodes writer similarity.
- [Writer-disjoint evaluation] 40 writers train the model and 15 completely unseen writers test it — the reported EER measures generalization to new people, which is the only honest way to evaluate verification.
- [Pair-comparison web demo] Select or upload a reference and a questioned signature; the app shows preprocessing stages, the similarity score, and the accept/reject decision at an adjustable threshold.
- [Threshold and error analysis] FAR/FRR curves across thresholds, the equal error rate operating point and an ROC curve, all generated for the report from the held-out writers.
- [Full preprocessing pipeline] Grayscale conversion, Otsu binarization, tight ink bounding-box crop and 128×128 normalization — identical at training and demo time, so there is no train/serve skew.
- [Complete training notebook] Dataset loading, pair mining, model definition, the training loop and evaluation in one reproducible Jupyter notebook with interpretation notes.
What is included
- Complete training & evaluation Jupyter notebook (pair mining, contrastive training, EER analysis)
- Trained Siamese model weights with the preprocessing pipeline
- Pair-comparison web demo with adjustable decision threshold
- FAR/FRR curves, ROC curve and per-writer error breakdown plots
- Project report PDF (background, Siamese theory, architecture rationale, methodology, results)
- PPT presentation for final review
- Viva Q&A preparation document (Siamese networks, contrastive loss, EER, writer-disjoint evaluation)
Limitations & prerequisites
- Offline verification only — it works from static scans and cannot use pen dynamics (speed, pressure, stroke order) that online systems rely on; practiced forgeries mimicking overall shape are the hardest case.
- CEDAR's 55 writers were collected in one lab context; performance on other populations, scripts or writing instruments is dataset-dependent and not guaranteed.
- The under-10% EER is a design target for the training run, stated honestly — the report documents the actually measured EER after training.
- Preprocessing assumes roughly upright, complete scans; heavily rotated, cropped or very low-resolution images degrade the embedding.
- Genuine signatures drift over years; the model has no online-learning update and would need retraining to track long-term drift.
- This is an academic prototype, not a certified forensic or banking-grade verification system — it must not be presented as legal evidence of forgery.
Frequently Asked Questions
Which dataset is used and why?
CEDAR from the University at Buffalo — 55 writers with 24 genuine signatures and 24 skilled forgeries each. It is the standard public benchmark for this task precisely because the forgeries are real human imitations rather than synthetic distortions, so the model trains against the attack it must actually stop.
How does the Siamese network decide genuine vs forgery?
Two identical CNN branches convert each signature into a 128-dimensional embedding. Contrastive loss trains the network so same-writer pairs land close together and forgery pairs land far apart. At inference the cosine distance between the two embeddings is compared against a threshold fixed at the equal error rate point.
Is the accuracy guaranteed?
No accuracy is invented or guaranteed. The design target is an equal error rate under 10% on writers the model has never seen; the training run for your order produces the actual measured EER, FAR/FRR curves and ROC curve, and those real figures go into the report.
Can I verify my own signature with it?
The demo accepts your own uploads, and because evaluation is writer-disjoint the model is designed to generalize to unseen writers. Enrolling a personal reference set with multiple samples per writer is available as a customization.
Does it work with a phone photo or a live camera?
The demo accepts uploaded images, and reasonable phone photos of signatures work after the built-in preprocessing. Direct camera capture inside the demo and batch verification of document sets are realistic customizations.
Is this project suitable for a final-year project?
Yes — for Computer Science, IT and AI/ML programs. It demonstrates metric learning, Siamese architecture design, contrastive-loss training, honest writer-disjoint evaluation and a working deployment demo, all strong viva material. Suitable for B.E./B.Tech final-year projects in Computer Science, IT and AI & Machine Learning.
Components & software requirements
- Python 3, PyTorch
- OpenCV, scikit-image (preprocessing)
- NumPy, Matplotlib, scikit-learn (metrics)
- Jupyter Notebook (training & evaluation)
- CEDAR signature dataset (University at Buffalo)
- HTML5 + JavaScript (pair-comparison demo)
- Contrastive loss with cosine-distance scoring
Dataset & model details
- Dataset: CEDAR offline signature dataset — 55 writers, each contributing 24 genuine signatures and 24 skilled forgeries, for 1,320 genuine + 1,320 forgery images total; 300 dpi grayscale scans; released by the Center of Excellence for Document Analysis and Recognition (CEDAR), University at Buffalo. Classes are per-writer genuine vs forgery; the split is writer-disjoint (40 train / 15 test writers).
- Task: Offline (static-image) signature verification — a 1:1 matching problem. Input = a pair of 128×128 grayscale signature images (reference + questioned); output = a similarity score in [0, 1] and an accept/reject decision at the EER operating threshold.
- Model: Siamese CNN with twin weight-shared branches: four convolution–pooling blocks followed by dense layers producing a 128-dimensional L2-normalized embedding; trained with contrastive loss (margin 1.0); decision by cosine distance against the validation-tuned threshold.
- Metrics: Equal error rate (EER), false acceptance rate (FAR), false rejection rate (FRR), ROC-AUC on the 15 unseen writers. Design target: EER under 10% on unseen writers. No accuracy is claimed as measured until the training run is executed for the order; the report documents the actual achieved figures.
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and email — the synopsis PDF downloads immediately. We may send occasional project updates; no spam, unsubscribe anytime.