Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.
| Date | Stars |
|---|---|
| 2026-07-24 | 1086 |
| 2026-07-25 | 1086 |
| 2026-07-28 | 1086 |
| 2026-07-30 | 1086 |
| 2026-08-06 | 1086 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Attention-based OCR Visual attention-based OCR model for image recognition with additional tools for creating TFRecords datasets and exporting the trained model with weights as a [SavedModel](https://www.tensorflow.org/api_docs/python/tf/saved_model) or a frozen graph. ## Acknowledgements This project is based on a model by [Qi Guo](http://qiguo.ml) and [Yuntian Deng](https://github.com/da03). You can find the original model in the [da03/Attention-OCR](https://github.com/da03/Attention-OCR) repository. ## The model Authors: [Qi Guo](http://qiguo.ml) and [Yuntian Deng](https://github.com/da03). The model first runs a sliding CNN on the image (images are resized to height 32 while preserving aspect ratio). Then an LSTM is stacked on top of the CNN. Finally, an attention model is used as a decoder for producing the final outputs.  ## Installation ``` pip install aocr ``` Note: Tensorflow and Numpy will be installed as dependencies. Additional dependencies are `PIL`/`Pillow`, `distance`, and `six`. Note #2: this project works with Tensorflow 1.x. Upgrade to Tensorflow 2 is planned, but if you want to help, please feel free to create a PR. ## Usage ### Create a dataset To build a TFRecords dataset, you need a collection of images and an annotation file with their respective labels. ``` aocr dataset ./datasets/annotations-training.txt ./datasets/training.tfrecords aocr dataset ./datasets/annotations-testing.txt ./datasets/testing.tfrecords ``` Annotations are simple text files containing the image paths (either absolute or relative to your working dir) and their corresponding labels: ``` datasets/images/hello.jpg hello datasets/images/world.jpg world ``` ### Train ``` aocr train ./datasets/training.tfrecords ``` A new model will be created, and the training will start. Note that it takes quite a long time to reach convergence, since we are training the CNN and attention model simultaneously. The `--steps-per-checkpoint` parameter determines how often the model checkpoints will be saved (the default output dir is `checkpoints/`). **Important:** there is a lot of available training options. See the CLI help or the `parameters` section of this README. ### Test and visualize ``` aocr test ./datasets/testing.tfrecords ``` Additionally, you can visualize the attention results during testing (saved to `out/` by default): ``` aocr test --visualize ./datasets/testing.tfrecords ``` Example output images in `results/correct`: Image 0 (j/j):  Image 1 (u/u):  Image 2 (n/n):  Image 3 (g/g):  Image 4 (l/l):  Image 5 (e/e):  ### Export After the model is trained and a checkpoint is available, it can be exported as either a frozen graph or a SavedModel. ```bash # SavedModel (default): aocr export ./exported-model # Frozen graph: aocr export --format=frozengraph ./exported-model ``` Load weights from the latest checkpoints and export the model into the `./exported-model` directory. **Note**: During training, it is possible to pass parameters describing the dimensions of the input images (`--max-width`, `--max-height`, etc.). If you used them during training, make sure to also pass them to the `export` command. Otherwise the exported model will not work properly when serving (next section). ### Serving Exported SavedModel can be served a
Excerpt of 7,883 characters
Read on GitHub132
18
13
6
4
2
2
2
2
1
1
1
1
1
1
1
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:18aa6f299f550ebb, topic:ocr, name:ocr, readme:ocr
matched fp:18aa6f299f550ebb, topic:tensorflow