VerSign: Easy Signature Verification in Python

Overview

VerSign: Easy Signature Verification in Python

versign is a small Python package which can be used to perform verification of offline signatures.

It assumes no prior knowledge of any machine learning tools or machine learning itself, and therefore can be used by ML experts and anyone else who wants to quickly integrate this functionality into their project.

Getting Started

Installation

This package requires python 3. Installation can be done with pip:

pip install versign

You might also need to manually install the following dependencies:

pip install git+git://github.com/luizgh/visdom_logger#egg=visdom_logger
pip install git+https://github.com/luizgh/sigver.git

Installation inside a virtual environment is recommended.

Download Trained Models

Before you can get started with, there is one more step you need to complete. versign comes with some pre-trained models which give it its magic.

Download the compressed models here, and extract them to models/ directory in your project root. Your project directory should look something like this:

_ $PROJECT_ROOT
 |__ models/
 |   |__ signet.pth
 |   |__ versign_segment.pkl
 |__ ...

Organise Your Dataset

This model treats signature verification as a single-class learning problem where only positive samples (i.e. genuine signatures) are available during training. This is because, in real-world situations where we want to enrol users into a signature verification system for verifying their signatures later, we don't have any forgeries available unless we specifically obtain them. Which is not practical. However, both genuine and forged signatures can be present during testing.

Write Your First Program with VerSign

import os
from versign import VerSign


# Load training data
train_data # folder containing training data (only genuine samples)
x_train = [os.path.join(train_data, f) for f in sorted(os.listdir(train_data))]

# Load test data and labels
test_data # folder containing test data
x_test = [os.path.join(test_data, f) for f in sorted(os.listdir(test_data))]

# Train a writer-dependent model from training data
v = VerSign('models/signet.pth', (150, 220))
v.fit(x_train)

# Predict labels of test data
y_pred = v.predict(x_test)

For a more complete example and additional features such as measuring test accuracy if groundtruth is known, see example.py.

You might also like...
Application for easy configuration of swap file and swappiness priority in slackware and others linux distributions.

Swap File Program created with the objective of assisting in the configuration of swap file in Distributions such as Slackware. Required packages: pyt

Regression Metrics Calculation Made easy

Regression Metrics Mean Absolute Error Mean Square Error Root Mean Square Error Root Mean Square Logarithmic Error Root Mean Square Logarithmic Error

✨ Voici un code en Python par moi, et en français qui permet d'exécuter du Javascript en Python.
✨ Voici un code en Python par moi, et en français qui permet d'exécuter du Javascript en Python.

JavaScript In Python ❗ Voici un code en Python par moi, et en français qui permet d'exécuter du Javascript en Python. 🔮 Une vidéo pour vous expliquer

Simple python module to get the information regarding battery in python.
Simple python module to get the information regarding battery in python.

Battery Stats A python3 module created for easily reading the current parameters of Battery in realtime. It reads battery stats from /sys/class/power_

ticktock is a minimalist library to view Python time performance of Python code.

ticktock is a minimalist library to view Python time performance of Python code.

Python @deprecat decorator to deprecate old python classes, functions or methods.

deprecat Decorator Python @deprecat decorator to deprecate old python classes, functions or methods. Installation pip install deprecat Usage To use th

A python package containing all the basic functions and classes for python. From simple addition to advanced file encryption.
A python package containing all the basic functions and classes for python. From simple addition to advanced file encryption.

A python package containing all the basic functions and classes for python. From simple addition to advanced file encryption.

Find dependent python scripts of a python script in a project directory.

Find dependent python scripts of a python script in a project directory.

A functional standard library for Python.

Toolz A set of utility functions for iterators, functions, and dictionaries. See the PyToolz documentation at https://toolz.readthedocs.io LICENSE New

Comments
  • Source Code of model files

    Source Code of model files

    Hi, this is an amazing project. Just wanna ask is it possible to get predictions in the range of 0 to 1 instead of a definite 0 or 1 or simply is it possible for me to get the source code of the model files

    Thank You

    opened by YScheung 1
  • how to get the dataset used in `example.py`

    how to get the dataset used in `example.py`

    Can i get the data set used in the example.py file please!!!!

    ../../authentica/sources/db/datasets/Signatures/CustomDataset/' this folder structure like any zip file or a drive link as in like models

    Amazing work bro !!

    opened by homimickey 1
  • Example of train and test data

    Example of train and test data

    Hi @saifkhichi96,

    Could you add a sample train and test dataset with the example.py for reference? The project looks interesting, would want to try it on my own dataset, but its a bit confusing as it doesn't mention the format in which the data is expected.

    Thanks, Monica

    opened by mon28 3
  • Scikit learn module SKlearn.Tree.Tree Deprecated, any workarounds?

    Scikit learn module SKlearn.Tree.Tree Deprecated, any workarounds?

    I have been trying to run the code with the latest scikit learn but to no avail as they have deprecated certain functions, could you help me get the code updated to work with current modules? (No module named Sklearn.tree.tree)

    opened by Aur0raN 1
Releases(v.0.0.2)
Owner
Muhammad Saif Ullah Khan
Mobile developer and ML engineer.
Muhammad Saif Ullah Khan
A simple and easy to use Spam Bot made in Python!

This is a simple spam bot made in python. You can use to to spam anyone with anything on any platform.

null 7 Sep 8, 2022
Stubmaker is an easy-to-use tool for generating python stubs.

Stubmaker is an easy-to-use tool for generating python stubs. Requirements Stubmaker is to be run under Python 3.7.4+ No side effects during

Toloka 24 Aug 28, 2022
A simple and easy to use collection of random python functions.

A simple and easy to use collection of random python functions.

Diwan Mohamed Faheer 1 Nov 17, 2021
A utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.

Mixed development source packages on top of stable constraints using pip mxdev [mɪks dɛv] is a utility that makes it easy to work with Python projects

BlueDynamics Alliance 6 Jun 8, 2022
Shypan, a simple, easy to use, full-featured library written in Python.

Shypan, a simple, easy to use, full-featured library written in Python.

ShypanLib 4 Dec 8, 2021
🍰 ConnectMP - An easy and efficient way to share data between Processes in Python.

ConnectMP - Taking Multi-Process Data Sharing to the moon ?? Contribute · Community · Documentation ?? Introduction : ?? ConnectMP is the easiest and

Aiden Ellis 1 Dec 24, 2021
Local backup made easy, with Python and shutil

KTBackup BETA Local backup made easy, with Python and shutil Features One-command backup and restore Minimalistic (only using stdlib) Convenient direc

kelptaken 1 Dec 27, 2021
A collection of common regular expressions bundled with an easy to use interface.

CommonRegex Find all times, dates, links, phone numbers, emails, ip addresses, prices, hex colors, and credit card numbers in a string. We did the har

Madison May 1.5k Dec 31, 2022
Easy compression and extraction for any compression or archival format.

Tzar: Tar, Zip, Anything Really Easy compression and extraction for any compression or archival format. Usage/Examples tzar compress large-dir compres

DanielVZ 37 Nov 2, 2022
Search, generate & deliver Msfvenom payloads in an quick and easy way

Goal Search, generate & deliver payloads in an quick and easy way Be as simple as possible BUT with all msfvenom payloads. Ever lost time searching th

null 2 Mar 3, 2022