Giter VIP home page Giter VIP logo

credit-card-number-detection's Introduction

Credit card number detection

Detect Credit card number using Mask RCNN and make task easier for OCR to retrieve number from the card

The idea is to change traditional card based transaction using computer vision, Consider if we have a credit card device uses camera (computer vision) instead of swiping, So there is no need of physical card, even we can reduce the usage of plastic cards.

Preparing the dataset

I downloaded some credit card images with variable size from https://www.moneyhero.com.hk/api/credit-card/v2/cards/all?lang=en&pageSize=1000 REST Service 1000 samples for train and test

Demo ScreenShot 1

ScreenShot_1

Then i used free Image Polygonal Annotation tool for creating annotation over the image like create a box marker around the card number on credit card image.

Demo ScreenShot 2

Tool LabelMe

ScreenShot_3 ScreenShot_2

finally run labelme2coco.py file to convert all the Image annotation json to COCO like dataset with mask image

1. Installation

Download Anaconda

Linux Mac Windows
64-bit 64-bit (bash installer) 64-bit (bash installer) 64-bit (exe installer)
32-bit 32-bit (bash installer) 32-bit (exe installer)

Install Anaconda on your machine. Detailed instructions:

2. Create and Activate the Environment

Please go though this doc before you creating an environment. After that create a environment using following command

conda create --name deep-learning

Then activate the environment using following command

activate deep-learning

Git and version control

These instructions also assume you have git installed for working with Github from a terminal window, but if you do not, you can download that first with the command:

conda install git

Now, you can create a local version of the project

  1. Clone the repository, and navigate to the downloaded folder. This may take a minute or two to clone due to the included image data.
git clone https://github.com/koushik-elite/Face-Generation.git
cd TV-Script-Generation
  1. Install PyTorch and torchvision; this should install the latest version of PyTorch.

    • Linux or Mac:
    conda install pytorch torchvision -c pytorch 
    
    • Windows:
    conda install pytorch -c pytorch
    pip install torchvision
    
  2. Install a few required pip packages, which are specified in the requirements text file (including OpenCV).

pip install -r requirements.txt

Training

Creating image dataset and training process is available in training-code.py file

python training-code.py

Prediction

predict mask image for single credit card image is available in predict.py file

python predict.py

Sample Output Image

ScreenShot_4

credit-card-number-detection's People

Contributors

koushik-elite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

190031932

credit-card-number-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.