Giter Club home page Giter Club logo

cheque_detection's Introduction

tagging the images of bank cheque

Tagging the images which have the bank cheque. The output has a tag of cheque or non-cheque, and a confidence score between 0 and 1.

Input Output
{
  'tag': 'cheque', 
  'score': 0.7404399
}
{
  'tag': 'non_cheque', 
  'score': 0.7928494
}
{
  'tag': 'non_cheque', 
  'score': 1.0
}

Installation

to install the cheque tagger model, you need Python 3.7.7. Then you can download the code and pre-trained models as follows

git clone https://github.com/yanliang12/cheque_detection.git

cd cheque_detection

pip3 install -r requirements.txt

wget https://github.com/fchollet/deep-learning-models/releases/download/v0.4/xception_weights_tf_dim_ordering_tf_kernels_notop.h5

download the pretrain model of cheque detection from the following url

https://drive.google.com/file/d/1bvmDMn9h9CULtYp56Ql9UiyGZnMdzxiE/view?usp=sharing

Using

Test with a positive case

to use the model to tag the image, download the an image of cheque by

wget https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Sample_cheque.jpeg/1200px-Sample_cheque.jpeg

you can check how the image looks like

then run the test code

from  cheque_tagging import cheque_tagging

cheque_tagging("1200px-Sample_cheque.jpeg")

you will see

{'score': 0.7404399, 'tag': 'cheque'}

Test with a negative case

as a negative example, you can downloand a non-cheque image, say, my lovely campus photo, by

wget https://www.ilwindia.com/wp-content/uploads/2019/08/Heriot-Watt-University-Dubai-1.jpg

which looks like

and then run the code to do the tagging

cheque_tagging("Heriot-Watt-University-Dubai-1.jpg")

and you get the followig result because there is no cheque in the image

{'score': 1.0, 'tag': 'non_cheque'}

Training of the model

I trained this model from a data set of 536 cheque images and 38996 non-cheque images. This data set is collected by myself. The training is conducted over a GPU of Ali Cloud. The epoch number is 20, and the accuracy over the training set is 0.9984.

If you need access to my training data set, or want to know more about the training details, please contact me by [email protected]

I am actively looking for data science/AI related job. If you have such oppertunity, thank you so much for contact me. I am ready for interview any time.

cheque_detection's People

Contributors

gaoyuanliang avatar yanliang12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cheque_detection's Issues

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.