This repository is to create tflite models for the available ocr models.
Note: Currently Keras OCR doesn't support Integer Quantization as of now and already reported to TFLite team.
├── colabs
├── KERAS_OCR_TFLITE.ipynb --> Code for Convert Keras OCR model to TFLite and doing inference.
├── captcha_ocr_tflite.ipynb --> Code to Convert Keras Captcha OCR to TFLite and code to do inference.
├── captcha_ocr_inference.ipynb --> Inference code for captcha OCR.
├── ENDTOEND_OCR_TFLITE.ipynb --> End to End OCR with CRAFT,EAST as text detector and KERAS OCR as Recognition Engine.
├── models
├── ocr_dr.tflite --> Captcha OCR TFLite model.
├── keras_ocr_dr.tflite --> Keras OCR Dynamic Range Quantized TFLite Model
├── keras_ocr_float16.tflite --> Keras OCR Float16 Quantized TFLite Model
├── images
Contains sample input images used for inference.
├── data
Contains representative dataset used while converting to TFLite using Integer Quantization.
KERAS OCR
All the above benchmarks are w.r.t Redmi K20 Pro
You can find this repo for converting CRAFT models to TFLite and using them for inference. For more details please find these blogs on Text Detectors.
- Converting CRAFT to TFLite: A Guide to PyTorch-TFLite Conversion
- A Battle of Text Detectors for Mobile Deployments: CRAFT vs. EAST
Feel free to suggest any other models through issues or contribute through Pull Requests.