Skip to content

Commit

Permalink
Merge pull request #278 from rkcosmos/master
Browse files Browse the repository at this point in the history
v1.1.10
  • Loading branch information
rkcosmos authored Oct 12, 2020
2 parents 514864a + 6078fc0 commit 960f65f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 63 deletions.
66 changes: 8 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
Ready-to-use OCR with 70+ languages supported including Chinese, Japanese, Korean and Thai.

## What's new?
- 12 October 2020 - Version 1.1.10
- Faster `beamsearch` decoder (thanks @amitbcp)
- Better code structure (thanks @susmith98)
- New language supports for Haryanvi(bgc), Sanskrit(sa) (Devanagari Script) and Manipuri(mni) (Bengari Script)
- 31 August 2020 - Version 1.1.9
- Add `detect` and `recognize` method for performing text detection and recognition separately
- 23 August 2020 - Version 1.1.8
- 20 new language supports for Bengali, Assamese, Abaza, Adyghe, Kabardian, Avar,
Dargwa, Ingush, Chechen, Lak, Lezgian, Tabassaran, Bihari, Maithili, Angika,
Bhojpuri, Magahi, Nagpuri, Newari, Goan Konkani
- Support RGBA input format
- Add `min_size` argument for `readtext`: for filtering out small text box

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

## What's coming next?
Expand Down Expand Up @@ -191,55 +190,6 @@ Lastly, please understand that my priority will have to go to popular language o

See [List of languages in development](https://github.com/JaidedAI/EasyOCR/issues/91)

## API Documentation

#### `Reader` class
> Base class for EasyOCR
>
> **Parameters**
> * **lang_list** (list) - list of language code you want to recognize, for example ['ch_sim','en']. List of supported language code is [here](https://www.jaided.ai/easyocr).
> * **gpu** (bool, string, default = True)
> * **model_storage_directory** (string, default = None)
> * **download_enabled** (bool, default = True)
>
> **Attribute**
> * **lang_char** - Show all available characters in current model
#### `readtext` method
> Main method for Reader object. There are 4 groups of parameter: General,
Contrast, Text Detection and Bounding Box Merging.
>
> **Parameters 1: General**
> * **image** (string, numpy array, byte) - Input image
> * **decoder** (string, default = 'greedy') - options are 'greedy', 'beamsearch' and 'wordbeamsearch'.
> * **beamWidth** (int, default = 5) - How many beam to keep when decoder = 'beamsearch' or 'wordbeamsearch'
> * **batch_size** (int, default = 1) - batch_size>1 will make EasyOCR faster but use more memory
> * **workers** (int, default = 0) - Number thread used in of dataloader
> * **allowlist** (string) - Force EasyOCR to recognize only subset of characters. Useful for specific problem (E.g. license plate, etc.)
> * **blocklist** (string) - Block subset of character. This argument will be ignored if allowlist is given.
> * **detail** (int, default = 1) - Set this to 0 for simple output
> * **paragraph** (bool, default = False) - Combine result into paragraph
>
> **Parameters 2: Contrast**
> * **contrast_ths** (float, default = 0.1) - Text box with contrast lower than this value will be passed into model 2 times. First is with original image and second with contrast adjusted to 'adjust_contrast' value. The one with more confident level will be returned as a result.
> * **adjust_contrast** (float, default = 0.5) - target contrast level for low contrast text box
>
> **Parameters 3: Text Detection (from CRAFT)**
> * **text_threshold** (float, default = 0.7) - Text confidence threshold
> * **low_text** (float, default = 0.4) - Text low-bound score
> * **link_threshold** (float, default = 0.4) - Link confidence threshold
> * **canvas_size** (int, default = 2560) - Maximum image size. Image bigger than this value will be resized down.
> * **mag_ratio** (float, default = 1) - Image magnification ratio
>
> **Parameters 4: Bounding Box Merging**
>
> This set of parameter controls when adjacent bounding boxes merge with each other. Every parameters except 'slope_ths' is in the unit of box height.
>
> ![width_ths](examples/width_ths.png)
> * **slope_ths** (float, default = 0.1) - Maximum slope (delta y/delta x) to considered merging. Low value means tiled boxes will not be merged.
> * **ycenter_ths** (float, default = 0.5) - Maximum shift in y direction. Boxes with different level should not be merged.
> * **height_ths** (float, default = 0.5) - Maximum different in box height. Boxes with very different text size should not be merged.
> * **width_ths** (float, default = 0.5) - Maximum horizontal distance to merge boxes.
> * **add_margin** (float, default = 0.1) - Extend bounding boxes in all direction by certain value. This is important for language with complex script (E.g. Thai).
>
> **Return** (list)
## Business Inquiries

For Enterprise Support, [Jaided AI](https://www.jaided.ai/) offers full service for custom OCR/AI systems from building, maintenance and deployment. Click [here](https://www.jaided.ai/contact) to contact us.
2 changes: 1 addition & 1 deletion easyocr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .easyocr import Reader

__version__ = '1.1.9'
__version__ = '1.1.10'
5 changes: 3 additions & 2 deletions easyocr/easyocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@
'nl','no','oc','pl','pt','ro','rs_latin','sk','sl','sq',\
'sv','sw','tl','tr','uz','vi']
arabic_lang_list = ['ar','fa','ug','ur']
bengali_lang_list = ['bn','as']
bengali_lang_list = ['bn','as','mni']
cyrillic_lang_list = ['ru','rs_cyrillic','be','bg','uk','mn','abq','ady','kbd',\
'ava','dar','inh','che','lbe','lez','tab']
devanagari_lang_list = ['hi','mr','ne','bh','mai','ang','bho','mah','sck','new','gom']
devanagari_lang_list = ['hi','mr','ne','bh','mai','ang','bho','mah','sck','new',\
'gom','sa','bgc']

all_lang_list = latin_lang_list + arabic_lang_list+ cyrillic_lang_list + devanagari_lang_list + bengali_lang_list + ['th','ch_sim','ch_tra','ja','ko','ta']
imgH = 64
Expand Down
5 changes: 4 additions & 1 deletion releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

- 12 October 2020 - Version 1.1.10
- Faster beamsearch decoder (thanks @amitbcp)
- Better code structure (thanks @susmith98)
- New language supports for Haryanvi, Sanskrit (Devanagari Script) and Manipuri (Bengari script)
- 31 August 2020 - Version 1.1.9
- Add `detect` and `recognize` method for performing text detection and recognition separately
- 23 August 2020 - Version 1.1.8
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def readme():
name='easyocr',
packages=['easyocr'],
include_package_data=True,
version='1.1.9',
version='1.1.10',
install_requires=requirements,
entry_points={"console_scripts": ["easyocr= easyocr.cli:main"]},
license='Apache License 2.0',
Expand Down

0 comments on commit 960f65f

Please sign in to comment.