Skip to content

Commit

Permalink
version 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rkcosmos committed Nov 17, 2020
1 parent c7fb302 commit 0071d11
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
Ready-to-use OCR with 70+ languages supported including Chinese, Japanese, Korean and Thai.

## What's new
- 17 November 2020 - Version 1.2
- New language supports for Telugu and Kannada. These are experimental lite recognition models. Their file sizes are only around 7% of other models and they are ~6x faster at inference with CPU.
- 12 October 2020 - Version 1.1.10
- Faster `beamsearch` decoder (thanks @amitbcp)
- Better code structure (thanks @susmith98)
Expand Down Expand Up @@ -99,15 +101,20 @@ Result:
Model weight for chosen language will be automatically downloaded or you can
download it manually from the following links and put it in '~/.EasyOCR/model' folder

- [text detection model (CRAFT)](https://drive.google.com/file/d/1tdItXPoFFeKBtkxb9HBYdBGo-SyMg1m0/view?usp=sharing)
- [latin model](https://drive.google.com/file/d/1M7Lj3OtUsaoppD4ZKudjepzCMsXKlxp3/view?usp=sharing)
- [chinese (traditional) model](https://drive.google.com/file/d/1xWyQC9NIZHNtgz57yofgj2N91rpwBrjh/view?usp=sharing)
- [chinese (simplified) model](https://drive.google.com/file/d/1-jN_R1M4tdlWunRnD5T_Yqb7Io5nNJoR/view?usp=sharing)
- [japanese model](https://drive.google.com/file/d/1ftAeVI6W8HvpLL1EwrQdvuLss23vYqPu/view?usp=sharing)
- [korean model](https://drive.google.com/file/d/1UBKX7dHybcwKK_i2fYx_CXaL1hrTzQ6y/view?usp=sharing)
- [thai model](https://drive.google.com/file/d/14BEuxcfmS0qWi3m9RsxwcUsjavM3rFMa/view?usp=sharing)
- [devanagari model](https://drive.google.com/file/d/1uCiMuBl8H8GAwapEjYUVYYdoOivyGzel/view?usp=sharing)
- [cyrillic model](https://drive.google.com/file/d/1SBmKXV5dpN5Cekacqk3ms1xq3dGbDuu1/view?usp=sharing)
- [text detection model (CRAFT)](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/craft_mlt_25k.zip)
- [latin model](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/latin.zip)
- [chinese (traditional) model](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/chinese.zip)
- [chinese (simplified) model](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/chinese_sim.zip)
- [japanese model](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/japanese.zip)
- [korean model](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/korean.zip)
- [thai model](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/thai.zip)
- [devanagari model](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/devanagari.zip)
- [cyrillic model](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/cyrillic.zip)
- [arabic model](https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/arabic.zip)
- [tamil model](https://github.com/JaidedAI/EasyOCR/releases/download/v1.1.7/tamil.zip)
- [bengali model](https://github.com/JaidedAI/EasyOCR/releases/download/v1.1.8/bengali.zip)
- [telugu model](https://github.com/JaidedAI/EasyOCR/releases/download/v1.1.11/telugu.zip)
- [kannada model](https://github.com/JaidedAI/EasyOCR/releases/download/v1.1.11/kannada.zip)

In case you do not have GPU or your GPU has low memory, you can run it in CPU mode by adding gpu = False

Expand Down
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.10'
__version__ = '1.2'
3 changes: 2 additions & 1 deletion easyocr/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
'th_char' : 'กขคฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรลวศษสหฬอฮฤ' +'เแโใไะา'+ special_c + 'ํฺ'+'ฯๆ',
'th_number' : '0123456789๑๒๓๔๕๖๗๘๙',
'te_char': 'ఁంఃఅఆఇఈఉఊఋఌఎఏఐఒఓఔకఖగఘఙచఛజఝఞటఠడఢణతథదధనపఫబభమయరఱలళవశషసహాిీుూృౄెేైొోౌ్ౠౡౢౣ',
'kn_char': 'ಂಃಅಆಇಈಉಊಋಎಏಐಒಓಔಕಖಗಘಙಚಛಜಝಞಟಠಡಢಣತಥದಧನಪಫಬಭಮಯರಲಳವಶಷಸಹಾಿೀುೂೃೆೇೈೊೋೌ್೦೧೨೩೪೫೬೭೮೯',
}

# first element is url path, second is file size
Expand All @@ -66,5 +67,5 @@
'tamil.pth': ('https://github.com/JaidedAI/EasyOCR/releases/download/v1.1.7/tamil.zip', '4b93972fdacdcdabe6d57097025d4dc2'),
'bengali.pth': ('https://github.com/JaidedAI/EasyOCR/releases/download/v1.1.8/bengali.zip', 'cea9e897e2c0576b62cbb1554997ce1c'),
'telugu.pth': ('https://github.com/JaidedAI/EasyOCR/releases/download/v1.1.11/telugu.zip', 'f7576012a3abe593950c47bfa1bd8ddc'),
'kannada.pth': ('https://github.com/JaidedAI/EasyOCR/releases/download/v1.1.11/kannada.zip', ''),
'kannada.pth': ('https://github.com/JaidedAI/EasyOCR/releases/download/v1.1.11/kannada.zip', 'c240c97e4adb8773b53b3b3dec728627'),
}
6 changes: 6 additions & 0 deletions easyocr/easyocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ def __init__(self, lang_list, gpu=True, model_storage_directory=None,
self.setModelLanguage('tamil', lang_list, ['ta','en'], '["ta","en"]')
elif 'te' in lang_list:
self.setModelLanguage('telugu', lang_list, ['te','en'], '["te","en"]')
elif 'kn' in lang_list:
self.setModelLanguage('kannada', lang_list, ['kn','en'], '["kn","en"]')
elif set(lang_list) & set(bengali_lang_list):
self.setModelLanguage('bengali', lang_list, bengali_lang_list+['en'], '["bn","as","en"]')
elif set(lang_list) & set(arabic_lang_list):
Expand Down Expand Up @@ -177,6 +179,10 @@ def __init__(self, lang_list, gpu=True, model_storage_directory=None,
self.character = number + symbol + characters['en_char'] + characters['te_char']
model_file = 'telugu.pth'
recog_network = 'lite'
elif self.model_lang == 'kannada':
self.character = number + symbol + characters['en_char'] + characters['kn_char']
model_file = 'kannada.pth'
recog_network = 'lite'
elif self.model_lang == 'thai':
separator_list = {
'th': ['\xa2', '\xa3'],
Expand Down
2 changes: 2 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- 17 November 2020 - Version 1.2
- New language supports for Telugu and Kannada. These are experimental lite recognition models. Their file sizes are only around 7% of other models and they are ~6x faster at inference with CPU.
- 12 October 2020 - Version 1.1.10
- Faster beamsearch decoder (thanks @amitbcp)
- Better code structure (thanks @susmith98)
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.10',
version='1.2',
install_requires=requirements,
entry_points={"console_scripts": ["easyocr= easyocr.cli:main"]},
license='Apache License 2.0',
Expand Down

0 comments on commit 0071d11

Please sign in to comment.