Skip to content

Thewhitewolfsasi/OCR_SOLUTION

Repository files navigation

Metal Stamping Character Recognition System

Problem Statement

In small-scale industries, the conventional practice of assigning serial numbers to manufactured parts by physically punching them poses challenges in efficient data retrieval. To overcome this, there is a critical need to leverage Optical Character Recognition (OCR) technology for automating the process of serial number extraction from part images. The existing manual methods are not only time-consuming but also susceptible to errors, especially under adverse environmental conditions.

Installation

Download the Project as zip file

  cd OCR_SOLUTION
  pip install -r requirement.txt

Text Detection

  • Download the trained models
Model name Used datasets Languages Purpose Model Link
General SynthText, IC13, IC17 Eng + MLT For general purpose Click
IC15 SynthText, IC15 Eng For IC15 only Click
LinkRefiner CTW1500 - Used with the General Model Click
  • Run with pretrained model
python test.py --trained_model=[weightfile] --test_folder=[folder path to test images] --char True

The result image and score maps will be saved to ./result by default.

Arguments

  • --trained_model: pretrained model
  • --text_threshold: text confidence threshold
  • --low_text: text low-bound score
  • --link_threshold: link confidence threshold
  • --cuda: use cuda for inference (default:True)
  • --canvas_size: max image size for inference
  • --mag_ratio: image magnification ratio
  • --poly: enable polygon type result
  • --show_time: show processing time
  • --test_folder: folder path to input images
  • --refine: use link refiner for sentense-level dataset
  • --refiner_model: pretrained refiner model
  • --char: Character level split (default:False). If True, means Each character is got identified used for Model Deployment

Text Recognition Dataset

  • Download the Datasets
Used datasets Dataset Link
DATASET Click
EMNIST Click
NIST Click
SVHN Click
Custom Dataset Cannot disclose Internship Dataset

Text Detection Results

  • Bounding Box of the Image

image

  • Region Score shows Heatmap of the probability of a pixel being at the center of a character

image

  • Affinity Score shows Heatmap of the probability of the space between adjacent characters

image

Text Recognition Results

  • Recognised Text shows above the bounding box

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published