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.
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
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.
Tool LabelMe
finally run labelme2coco.py file to convert all the Image annotation json to COCO like dataset with mask image
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:
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
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
- 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
-
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
-
Install a few required pip packages, which are specified in the requirements text file (including OpenCV).
pip install -r requirements.txt
Creating image dataset and training process is available in training-code.py file
python training-code.py
predict mask image for single credit card image is available in predict.py file
python predict.py