Skip to content

Commit f41e44f

Browse files
committed
v1.4
1 parent 89ec92f commit f41e44f

File tree

5 files changed

+52
-12
lines changed

5 files changed

+52
-12
lines changed

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ Ready-to-use OCR with 80+ [supported languages](https://www.jaided.ai/easyocr) a
1111
[Try Demo on our website](https://www.jaided.ai/easyocr)
1212

1313
## What's new
14+
- 29 June 2021 - Version 1.4
15+
- [Instruction](https://github.com/JaidedAI/EasyOCR/blob/master/custom_model.md) on training/using custom recognition model
16+
- Example [dataset](https://www.jaided.ai/easyocr/modelhub) for model training
17+
- Batched image inference for GPU (thanks [@SamSamhuns](https://github.com/SamSamhuns), see [PR](https://github.com/JaidedAI/EasyOCR/pull/458))
18+
- Vertical text support (thanks [@interactivetech](https://github.com/interactivetech)). This is for rotated text, not to be confused with vertical Chinese or Japanese text. (see [PR](https://github.com/JaidedAI/EasyOCR/pull/450))
19+
- Output in dictionary format (thanks [@A2va](https://github.com/A2va), see [PR](https://github.com/JaidedAI/EasyOCR/pull/441))
1420
- 30 May 2021 - Version 1.3.2
15-
- Faster greedy decoder (thanks [@samayala22](https://github.com/samayala22))
21+
- Faster greedy decoder (thanks [@samayala22](https://github.com/samayala22))
1622
- Fix bug when text box's aspect ratio is disproportional (thanks [iQuartic](https://iquartic.com/) for bug report)
1723
- 20 April 2021 - Version 1.3.1
1824
- Add support for PIL image (thanks [@prays](https://github.com/prays))
@@ -28,8 +34,7 @@ Ready-to-use OCR with 80+ [supported languages](https://www.jaided.ai/easyocr) a
2834
- [Read all released notes](https://github.com/JaidedAI/EasyOCR/blob/master/releasenotes.md)
2935

3036
## What's coming next
31-
- Custom models
32-
- [New language support](https://github.com/JaidedAI/EasyOCR/issues/91)
37+
- Handwritten text support
3338

3439
## Examples
3540

@@ -113,15 +118,14 @@ For more information, read [tutorial](https://www.jaided.ai/easyocr/tutorial) an
113118
$ easyocr -l ch_sim en -f chinese.jpg --detail=1 --gpu=True
114119
```
115120

121+
## Train/use your own model
122+
123+
[read here](https://www.jaided.ai/custom_model.md)
124+
116125
## Implementation Roadmap
117126

118-
1. Language packs: Expand support to more languages. We are aiming to cover > 80-90% of world's population. Also improve existing languages.
119-
2. Better documentation and api
120-
3. Language model for better decoding
121-
4. Handwritten support: The key is using GAN to generate realistic handwritten dataset.
122-
5. Faster processing time: model pruning (lite version) / quantization / export to other platforms (ONNX?)
123-
6. Open Dataset and model training pipeline
124-
7. Restructure code to support swappable detection and recognition algorithm.
127+
- Handwritten support
128+
- Restructure code to support swappable detection and recognition algorithm.
125129
The api should be as easy as
126130
``` python
127131
reader = easyocr.Reader(['en'], detection='DB', recognition = 'Transformer')

custom_model.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Custom model
2+
3+
## How to train your custom model
4+
5+
There are 2 options to train your own recognition model.
6+
7+
**1. Open-source approach**
8+
9+
For the open-source approach, you can use your own data or generate your own dataset. To generate your own data, we recommend using
10+
[TextRecognitionDataGenerator](https://github.com/Belval/TextRecognitionDataGenerator). We provide an example of dataset [here](https://jaided.ai/easyocr/modelhub/).
11+
After you have a dataset, you can train your own model by following this repository
12+
[deep-text-recognition-benchmark](https://github.com/clovaai/deep-text-recognition-benchmark).
13+
The network needs to be fully convolutional in order to predict flexible text length. Our current network is 'None-VGG-BiLSTM-CTC'.
14+
Once you got your trained model (.pth file), you need 2 additional files describing recognition network architecture and model configuration.
15+
The example is provided in `custom_example.zip` file [here](https://jaided.ai/easyocr/modelhub/).
16+
17+
Please do not create an issue about data generation and model training in this repository. If you have any question regarding data generation and model training, please ask in the respective repositories.
18+
19+
**2. Web-based approach**
20+
21+
Jaided AI provides a web-based (paid) service for training your own model [here](https://jaided.ai/). You can train your model on the cloud and export it for local deployment. All 3 files are downloadable once model is trained on cloud.
22+
23+
## How to use your custom model
24+
25+
To use your own recognition model, you need 3 files either from open-source approach or web-based approach. These three files have to share the same name (for example, yourmodel.pth, yourmodel.yaml, yourmodel.py) and you will call your model by this name in EasyOCR api.
26+
27+
We provide [custom_example.zip](https://jaided.ai/easyocr/modelhub/)
28+
as an example. Please download, extract and place `custom_example.py`, `custom_example.yaml` in user_network_directory (default = `~/.EasyOCR/user_network`) and place `custom_example.pth` in model directory (default = `~/.EasyOCR/model`)
29+
Once you place all 3 files in the right place. You can use `custom_example` by
30+
specifying `recog_network` like this `reader = easyocr.Reader(['en'], recog_network = 'custom_example')`.

easyocr/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .easyocr import Reader
22

3-
__version__ = '1.3.2'
3+
__version__ = '1.4'

releasenotes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
- 29 June 2021 - Version 1.4
2+
- [Instruction](https://github.com/JaidedAI/EasyOCR/blob/master/custom_model.md) on training/using custom recognition model
3+
- [Example dataset](https://www.jaided.ai/easyocr/modelhub)
4+
- Batched image inference for GPU (thanks [@SamSamhuns](https://github.com/SamSamhuns), see [PR](https://github.com/JaidedAI/EasyOCR/pull/458))
5+
- Vertical text support (thanks [@interactivetech](https://github.com/interactivetech)). This is for rotated text, not to be confused with vertical Chinese or Japanese text. (see [PR](https://github.com/JaidedAI/EasyOCR/pull/450))
6+
- Output in dictionary format (thanks [@A2va](https://github.com/A2va), see [PR](https://github.com/JaidedAI/EasyOCR/pull/441))
17
- 30 May 2021 - Version 1.3.2
28
- Faster greedy decoder (thanks [@samayala22](https://github.com/samayala22))
39
- Fix bug when text box's aspect ratio is disproportional (thanks [iQuartic](https://iquartic.com/) for bug report)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def readme():
1717
name='easyocr',
1818
packages=['easyocr'],
1919
include_package_data=True,
20-
version='1.3.2',
20+
version='1.4',
2121
install_requires=requirements,
2222
entry_points={"console_scripts": ["easyocr= easyocr.cli:main"]},
2323
license='Apache License 2.0',

0 commit comments

Comments
 (0)