Skip to content

Commit 557bd92

Browse files
committed
Merge probability branch.
2 parents 0e57493 + c4f3cd7 commit 557bd92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+935308
-203
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM pytorch/pytorch
1+
FROM docker.io/pytorch/pytorch
22

33
# if you forked EasyOCR, you can pass in your own GitHub username to use your fork
44
# i.e. gh_username=myname

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ include README.md
44
include easyocr/model/*
55
include easyocr/character/*
66
include easyocr/dict/*
7+
include easyocr/scripts/compile_dbnet_dcn.py
8+
recursive-include easyocr/DBNet *

README.md

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,8 @@ Integrated into [Huggingface Spaces 🤗](https://huggingface.co/spaces) using [
1414

1515

1616
## What's new
17-
- 2 June 2022 - Version 1.5.0
18-
- Add trainer for CRAFT detection model (thanks[@gmuffiness](https://github.com/gmuffiness), see [PR](https://github.com/JaidedAI/EasyOCR/pull/739))
19-
- 9 April 2022 - Version 1.4.2
20-
- Update dependencies (opencv and pillow issues)
21-
- 11 September 2021 - Version 1.4.1
22-
- Add trainer folder
23-
- Add `readtextlang` method (thanks[@arkya-art](https://github.com/arkya-art), see [PR](https://github.com/JaidedAI/EasyOCR/pull/525))
24-
- Extend `rotation_info` argument to support all possible angles (thanks[abde0103](https://github.com/abde0103), see [PR](https://github.com/JaidedAI/EasyOCR/pull/515))
25-
- 29 June 2021 - Version 1.4
26-
- [Instructions](https://github.com/JaidedAI/EasyOCR/blob/master/custom_model.md) on training/using custom recognition models
27-
- Example [dataset](https://www.jaided.ai/easyocr/modelhub) for model training
28-
- Batched image inference for GPUs (thanks [@SamSamhuns](https://github.com/SamSamhuns), see [PR](https://github.com/JaidedAI/EasyOCR/pull/458))
29-
- 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))
30-
- Output in dictionary format (thanks [@A2va](https://github.com/A2va), see [PR](https://github.com/JaidedAI/EasyOCR/pull/441))
31-
- 30 May 2021 - Version 1.3.2
32-
- Faster greedy decoder (thanks [@samayala22](https://github.com/samayala22))
33-
- Fix bug when a text box's aspect ratio is disproportional (thanks [iQuartic](https://iquartic.com/) for bug report)
34-
- 20 April 2021 - Version 1.3.1
35-
- Add support for PIL image (thanks [@prays](https://github.com/prays))
36-
- Add Tajik language (tjk)
37-
- Update argument setting for command line
38-
- Add `x_ths` and `y_ths` to control merging behavior when `paragraph=True`
39-
- 21 March 2021 - Version 1.3
40-
- Second-generation models: multiple times smaller size, multiple times faster inference, additional characters and comparable accuracy to the first generation models.
41-
EasyOCR will choose the latest model by default but you can also specify which model to use by passing `recog_network` argument when creating a `Reader` instance.
42-
For example, `reader = easyocr.Reader(['en','fr'], recog_network='latin_g1')` will use the 1st generation Latin model
43-
- List of all models: [Model hub](https://www.jaided.ai/easyocr/modelhub)
17+
- 24 September 2024 - Version 1.7.2
18+
- Fix several compatibilities
4419

4520
- [Read all release notes](https://github.com/JaidedAI/EasyOCR/blob/master/releasenotes.md)
4621

@@ -145,7 +120,7 @@ The api should be as easy as
145120
``` python
146121
reader = easyocr.Reader(['en'], detection='DB', recognition = 'Transformer')
147122
```
148-
The idea is to be able to plug-in any state-of-the-art model into EasyOCR. There are a lot of geniuses trying to make better detection/recognition models, but we are not trying to be geniuses here. We just want to make their works quickly accessible to the public ... for free. (well, we believe most geniuses want their work to create a positive impact as fast/big as possible) The pipeline should be something like the below diagram. Grey slots are placeholders for changeable light blue modules.
123+
The idea is to be able to plug in any state-of-the-art model into EasyOCR. There are a lot of geniuses trying to make better detection/recognition models, but we are not trying to be geniuses here. We just want to make their works quickly accessible to the public ... for free. (well, we believe most geniuses want their work to create a positive impact as fast/big as possible) The pipeline should be something like the below diagram. Grey slots are placeholders for changeable light blue modules.
149124

150125
![plan](examples/easyocr_framework.jpeg)
151126

custom_model.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
# Custom model
1+
# Custom recognition models
22

33
## How to train your custom model
44

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
5+
You can use your own data or generate your own dataset. To generate your own data, we recommend using
106
[TextRecognitionDataGenerator](https://github.com/Belval/TextRecognitionDataGenerator). We provide an example of a dataset [here](https://jaided.ai/easyocr/modelhub/).
117
After you have a dataset, you can train your own model by following this repository
128
[deep-text-recognition-benchmark](https://github.com/clovaai/deep-text-recognition-benchmark).
@@ -18,13 +14,9 @@ Please do not create an issue about data generation and model training in this r
1814

1915
Note: We also provide our version of a training script [here](https://github.com/JaidedAI/EasyOCR/tree/master/trainer). It is a modified version from [deep-text-recognition-benchmark](https://github.com/clovaai/deep-text-recognition-benchmark).
2016

21-
**2. Web-based approach**
22-
23-
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 the model has finished training.
24-
2517
## How to use your custom model
2618

27-
To use your own recognition model, you need the three files from the open-source or web-based approach above. These three files have to share the same name (i.e. `yourmodel.pth`, `yourmodel.yaml`, `yourmodel.py`) that you will then use to call your model with in the EasyOCR API.
19+
To use your own recognition model, you need the three files as explained above. These three files have to share the same name (i.e. `yourmodel.pth`, `yourmodel.yaml`, `yourmodel.py`) that you will then use to call your model with EasyOCR API.
2820

2921
We provide [custom_example.zip](https://jaided.ai/easyocr/modelhub/)
3022
as an example. Please download, extract and place `custom_example.py`, `custom_example.yaml` in the `user_network_directory` (default = `~/.EasyOCR/user_network`) and place `custom_example.pth` in model directory (default = `~/.EasyOCR/model`)

0 commit comments

Comments
 (0)