Skip to content

COLVERTYETY/bookish-octo-happiness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optical Character Recognition with onnx web

This is a simple demo of how to perform OCR on the client side using ONNX web.

try it out !!

demo

Algorithm Overview:

  1. train a small CNN with PyTorch on the EMNIST dataset.

  2. Find optimal threshold for class confidence using AUC-ROC with FASHIONMNIST as negative class.

  3. quantize the trained model to 8-bit integer.

  4. convert the trained model to ONNX format.

  5. load the ONNX model in a web browser and perform inference on the client side:

    1. Binarize the image.
    2. perform clustering via flood fill algorithm.
    3. extract the bounding boxes of the clusters.
    4. resize and perform inference on the bounding boxes.
    5. compare prediction with confidence threshold.
    6. profit.

model performance:

confusion matrix

About

Deploying a simple Neural Network for Optical Character Recognition with onnx web.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published