Skip to content

HappyPotatoHead/Signature-Verification-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Issues project_license LinkedIn


Logo

Signature Verification Model

Because my eyes hurt
Explore the docs »

View Demo · Report Bug

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

This project aimed to develop a model to automate the verification of handwritten signatures. The challenge was to accurately compare scanned or captured signatures against known samples, even with variations in style and quality. By utilising a model, the process of verifying valid signatures can be significantly shorter and less tedious.

Back To Top

Built With

  • Python
  • PyTorch
  • NumPy
  • Matplotlib

Back To Top

Getting Started

Prerequisites

Install the libraries listed in requirements.txt. The version of PyTorch used can be found in the notebook

pip install -r requirements.txt

Installation

Just clone the repository and you are good to go!

git clone https://github.com/HappyPotatoHead/Signature-Verification-Model.git

Change git remote url to avoid accidental pushes to base project

git remote set-url origin HappyPotatoHead/Signature-Verification-Model
git remote -v # confirm the changes

Back To Top

Usage

Using the notebook is rather straightforward - I have arranged and ordered the cells in a logical order, so I will mainly cover the parts that you can play around with and what you should look out for.

Check out The Garden to learn more!

I have provided a sample model. If you would like to skip fine-tuning, you can run the configuration dictionaries and the classes and start executing from Model Evaluation onwards. Have fun!

To access the signature images: Click me!

Image preprocessing

The processing_images folder contains the file necessary to fetch, load, and process the signature images; however, a naming function has yet to be implemented.

For the fine-tuning of model to work, the images' names should be as follows:

<original/forgeries>_<signer's id>_<image's index>

Model

Configurable Code

Modify the Configurations section to control the fine-tuning of the model.

Notebook Setup and Configurations

build_feature_extraction_model() and build_batch_triplet_loss are used to define the model and the triplet loss function.

Model builder alt text

Proceed to Define Transforms section to define transformers.

Transformers' definition

K-Fold Cross Validation

By default, my definition of k-fold cross validation does not make checkpoints.

K-Fold does not make checkpoints by default

Evaluation

To evaluate the model on a dataset, the dataset has to be an instance of TestingSignatureDataset due to the difference in design between TrainingSignatureDataset and TestingSignatureDataset. So, you cannot reuse the training dataset instantiated with TrainingSignatureDataset.

Back To Top

Roadmap

  • [] Hyperparameter tuning automation with Ray Tune

See the open issues for a full list of proposed features (and known issues).

Back To Top

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Back To Top

Top contributors:

contrib.rocks image

License

Distributed under the project_license. See LICENSE.txt for more information.

Back To Top

Contact

Jimmy Ding - jimmydingjk@gmail.com

Project Link: Signature-Verification-Model

Back To Top