https://github.com/jsmolka/tensor-ocr
Optical character recognition using Tensorflow.
https://github.com/jsmolka/tensor-ocr
keras ocr python tensorflow
Last synced: about 1 year ago
JSON representation
Optical character recognition using Tensorflow.
- Host: GitHub
- URL: https://github.com/jsmolka/tensor-ocr
- Owner: jsmolka
- License: mit
- Created: 2018-10-03T16:09:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T15:32:04.000Z (over 7 years ago)
- Last Synced: 2025-03-20T17:05:42.475Z (over 1 year ago)
- Topics: keras, ocr, python, tensorflow
- Language: Python
- Homepage:
- Size: 596 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tensor-ocr
Optical character recognition using Tensorflow.
## Setup
1. Install Python 3.6 or lower (Tensorflow does not support newer versions).
2. Clone or download the repository.
3. Install the requirements using ```pip install -r requirements.txt```.
4. Download a pretrained model from the [release page](https://github.com/jsmolka/tensor-ocr/releases) if you do not want to train the model yourself.
5. Extract the archive and move the `model.json` and `weights.h5` files into the `data` directory.
## Training
If you want to train a model yourself you need to download the [IAM dataset](http://www.fki.inf.unibe.ch/databases/iam-handwriting-database/iam-handwriting-database). After that you need to convert the dataset and train the model using the commands from the section below.
## Commands
| Command | Action |
| ------------------------------ | ---------------------------------------------------------------- |
| ```python app.pyw``` | Starts the GUI application. |
| ```python main.py --analyse``` | Analyses the IAM dataset. |
| ```python main.py --convert``` | Converts the IAM dataset into the desired format. |
| ```python main.py --rotate``` | Rotates the converted IAM dataset to create more training data. |
| ```python main.py --train``` | Trains the model using the converted IAM dataset. |
| ```python main.py --test``` | Tests the trained model. |