Coder Social home page Coder Social logo

henriqueca / offlinesignatureverification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aftaab99/offlinesignatureverification

0.0 1.0 0.0 381 KB

Writer independent offline signature verification using convolutional siamese networks

License: MIT License

Python 17.29% HTML 8.55% Jupyter Notebook 74.16%

offlinesignatureverification's Introduction

Offline Writer Independent signature verification

Setting up locally

Download the dependencies(for conda users)

conda env create -f projenv.yml

They can be installed using pip via

pip install -r requirements.txt

Then download the pretrained model and dataset

python DownloadData.py

After setting the environment and downloading the pretrained model, start the web server using

python main.py

Models used

Used a Convolutional Siamese network along with the Constrastive loss function. I chose Euclidian distance as the distance metric for comparing the output feature vectors.

Accuracy

The model acheived an accuracy of 78.34% on the CEDAR signature dataset(test set size was around 4100 samples). Deviations of 1-2% are possible as accuracy depends on the threshold. The threshold for the siamese network was computed by taking the average of True positive rate and True negative rate using ROC.

Preprocessing

Images were converted to grayscale, inverted and scaled down to 0 or up to 255 depending on whether the pixel value was below or above 50. Image tensor sizes of 225x155 were fed into the model. Images were grouped in pairs of genuine and forged images, where the label was 1 if both were genuine and of the same writer and 0 otherwise. 13500 image pairs of each label where chosen, 15% of which were used for testing.

Original image

Original image

Preprocessed image

Preprocessed image

Dataset

The CEDAR signature dataset is one of the benchmark datasets for signature verification. It consists of 24 genuine and forged signatures each from 55 different signers.

Dataset link

References

  1. SigNet: Convolutional Siamese Network for Writer Independent Offline SignatureVerification

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.