Skip to content

Object Detection Based Credit Card OCR Model and Inference

License

Notifications You must be signed in to change notification settings

dxaen/pytorch-creditcard-ocr

Repository files navigation

Running OCR inference

System Requirements

This code was tested with Ubuntu(20.04.3 LTS) with Python 3.8.10, MacOSX Sonoma 14.2.1 with Python 3.9.16

Setup Virtual environment and install requirements

python3 -m venv env
source env/bin/activate
pip3 install -r requirements

To run the demo with a predefined video input, use the following

Check out the test_videos directory for sample videos.

python3 run_ocr_demo.py --video_file ./test_videos/amex.mp4
Samples

American Express

Quick Read

To run the demo on the frames from your webcam, use the following

Place your card infront of the webcam.

python3 run_ocr_demo.py

American Express

Scan Amex Card

VISA Gift Card

Scan VISA Card

For more information on the project

Read the full paper Doing good by fighting fraud: Ethical anti-fraud systems for mobile payments

Acknowledgement

We would like to thank Max deGroot for ssd.ptorch and Hao for pytorch-ssd and Joseph Redmon for YOLO and Darknet. We borrow from these projects.

About

Object Detection Based Credit Card OCR Model and Inference

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages