Skip to content

This repo researches and develops the AI algorithm for the OCR task. A demo project was developed to read recognize the credit card numbers.

Notifications You must be signed in to change notification settings

rxng8/public-ocr-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Public repository for optimizing OCR credit card reading problem with traditional methods and deep neural network methods.

Author: Alex Nguyen (Viet Dung Nguyen)

Demo

         

Algorithm List:

  1. Legacy <To be edited>
  2. CRNN <To be edited>
  3. SSD <To be edited>
  4. Efficientdet <To be edited>
  5. Faster-RCNN: The algorithm was developed from scratch here
  6. YOLO: The algorithm was developed from scratch here

Prerequisite:

  • Anaconda and related environment knowledge.
  • VS Code (All files in this repo is programmed according to VS Code's jupyter notebook cell, # %%)
  • A lot of work command-line interface, beware!
  • Window Operating System: All the environment files are exported using a Window machine, so it will use some Window's sepcific library that Mac and Linux does not have! But if you choose not to use those environment files, then use whichever operating system you like!

Dataset:

Labeling Tool

Note

  1. How to use conda environment files:
    • Edit the name field in the first line as you want.
    • Edit the prefix field in the last line according to this semantic: <path-to-your-conda-envs-folder>/<name-of-the-environment>. For example, path to your conda environment folder is: C:\Users\nguyv\.conda\envs, and your environment name is ocr, then the prefix's value should be: C:\Users\nguyv\.conda\envs\ocr
    • Create and activate the conda environment from the environment file, for example, environment.yml, with name, for example, ocr:
      conda env create -f environment.yml
      conda activate ocr
      

Keyword:

  1. Research from Duobango's solution.
    • gaussian blur (to get rid of the low level edge) ->'Sobel edge detector'...
    • 'Scharr edge detector'
    • 'Prewitt edge detector'
    • 'Canny edge detector'
    • 'Hough standard (STD)'
    • 'Kernel-based Hough transform (KHT)'
    • 'Standard Histogram of oriented gradients (S-HOG)'
    • 'Brute force matcher'
    • 'PLSL (Parallel Light Speed Labeling)'
    • 'LMSER (Linear Time Maximally Stable Extremal Regions)'

Tensorflow Object detection API and Export TFLITE and TFJS.

And also infer and test!

  1. Navigate to Tensorflow\workspace\training_demo\README.md NOTE: Only ssd or center_net models are supported in tflite model conversion for tf object_detection library. (tf version: 2.5.0) (tf object detection version: 0.1)

  2. Navigate to tflite\README.md

  3. Stats:

  • Tensorflow models:
    • centernet_mobilenet (train success, have not inferred)
    • centernet_resnet101 (successfully inferred)
    • efficientdet_d7 (train failed)
    • my_ssd_resnet50_v1_fpn (successfully inferred)
    • ssd_mobilenet (failure inference)
    • ssd_mobilenet_v2_fpnlite (training)
  1. Infer on mobile: follow this docs: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_on_mobile_tf2.md

  2. IMPORTANT: Tflite convert only support ssd now, according to https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_on_mobile_tf2.md

Other ways on EfficientDet:

https://www.tensorflow.org/lite/tutorials/model_maker_object_detection

About

This repo researches and develops the AI algorithm for the OCR task. A demo project was developed to read recognize the credit card numbers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published