Skip to content

gulcihanglmz/signature-verification-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SuperGlue Signature Recognition System

Python PyTorch

AI-powered signature verification system achieving 98.1% accuracy with state-of-the-art SuperGlue technology.

Confusion Matrix Analysis - Signature Recognition System

Our advanced confusion matrix analysis provides detailed insights into system performance with 98.1% accuracy:

Signature Recognition System Confusion Matrix
Signature Recognition System confusion matrix with 1.9% error rate

Key Insights from Confusion Matrix:

  • True Negatives (450): Rejection of different signatures
  • True Positives (115): Acceptance of authentic signatures
  • False Positives (2): Minimal false acceptances
  • False Negatives (9): Low false rejections

πŸ“ˆ Threshold Optimization Analysis v2.0

Comprehensive threshold analysis revealing 0.30 as optimal threshold for maximum accuracy:

Threshold Optimization v2.0
Advanced threshold optimization showing peak performance at 0.30 threshold with 98.1% accuracy

πŸ“ˆ Results Examples

Screenshot 2025-07-31 141354 Screenshot 2025-07-31 141849 Screenshot 2025-07-31 142033

πŸ“ˆ Performance Metrics

Metric Value
Overall Accuracy 98.1%
Precision 98.3%
Recall 92.7%
F1-Score 95.4%
False Positive Rate
False Negative Rate

πŸš€ Quick Start

Prerequisites

Python 3.9+
PyTorch
OpenCV
NumPy

Installation

git clone https://github.com/gulcihanglmz/superglue-signature-verification.git
cd superglue-signature-verification
pip install -r requirements.txt

Basic Usage

from match_signatures import verify_signature

# Verify signature pair
result = verify_signature("reference.jpg", "test.jpg")
print(f"Match confidence: {result['confidence']:.3f}")
print(f"Verification: {'VALID' if result['is_match'] else 'INVALID'}")

πŸ“ Project Structure

β”œβ”€β”€ models/                # Neural network models
β”‚   β”œβ”€β”€ superglue.py       # SuperGlue implementation
β”‚   β”œβ”€β”€ superpoint.py      # SuperPoint keypoint detector
β”‚   └── weights/           # Pre-trained model weights
β”œβ”€β”€ match_signatures.py    # Main verification logic
β”œβ”€β”€ confusion_matrix_analysis_v2.py  # Performance analysis
β”œβ”€β”€ Report.md            
└── requirements.txt      

πŸ“Š Visual Analysis

The system includes comprehensive analysis tools:

  • Confusion Matrix: Detailed performance breakdown
  • Threshold Optimization: Fine-tuned for best results
  • Visual Matching: Keypoint visualization and matching display
  • Performance Metrics: Professional reporting and analytics

Detailed Performance Metrics

CLASSIFICATION MATRIX:
                 Predicted
                 Different | Same
Actual Different    450   |   2    (99.6% specificity)
Actual Same           9   |  115   (92.7% sensitivity)

οΏ½ Sample Verification Results

# Example verification output
{
    "signature_pair": "user_123_sample_01.jpg vs user_123_sample_02.jpg",
    "match_confidence": 0.847,
    "predicted_same": true,
    "ground_truth_same": true,
    "verification_result": "AUTHENTIC",
    "processing_time": "0.68 seconds",
    "keypoints_detected": [187, 203],
    "keypoints_matched": 94,
    "match_ratio": 0.847,
    "security_level": "HIGH CONFIDENCE"
}

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

Star ⭐ this repository if you found it helpful!

References

A Python toolkit for pairwise signature matching using SuperPoint + SuperGlue.
It generates a JSON of match predictions for all signature pairs in your dataset, then visualizes results for inspection.

  • SuperGlue Pretrained Network (Matching backbone): https://github.com/magicleap/SuperGluePretrainedNetwork

  • SuperPoint & SuperGlue papers for algorithmic details:

    • DeTone, Malisiewicz & Rabinovich, β€œSuperPoint: Self-Supervised Interest Point Detection and Description”, ECCV 2018.
    • Sarlin et al., β€œSuperGlue: Learning Feature Matching with Graph Neural Networks”, CVPR 2020.

About

πŸ“‰AI-powered signature verification system using SuperGlue technology

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published