Skip to content

Commit

Permalink
update v.1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rkcosmos committed Sep 24, 2024
1 parent 3d3852d commit c4f3cd7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 21 deletions.
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,8 @@ Integrated into [Huggingface Spaces 🤗](https://huggingface.co/spaces) using [


## What's new
- 4 September 2023 - Version 1.7.1
- 24 September 2024 - Version 1.7.2
- Fix several compatibilities
- 25 May 2023 - Version 1.7.0
- Add Apple Silicon support (thanks[@rayeesoft](https://github.com/rayeesoft) and [@ArtemBernatskyy](https://github.com/ArtemBernatskyy), see [PR](https://github.com/JaidedAI/EasyOCR/pull/1004))
- Fix several compatibilities
- 15 September 2022 - Version 1.6.2
- Add CPU support for DBnet
- DBnet will only be compiled when users initialize DBnet detector.
- 1 September 2022 - Version 1.6.1
- Fix DBnet path bug for Windows
- Add new built-in model `cyrillic_g2`. This model is a new default for Cyrillic script.
- 24 August 2022 - Version 1.6.0
- Restructure code to support alternative text detectors.
- Add detector `DBnet`, see [paper](https://arxiv.org/abs/2202.10304v1). It can be used by initializing like this `reader = easyocr.Reader(['en'], detect_network = 'dbnet18')`.
- 2 June 2022 - Version 1.5.0
- Add trainer for CRAFT detection model (thanks[@gmuffiness](https://github.com/gmuffiness), see [PR](https://github.com/JaidedAI/EasyOCR/pull/739))

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

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.7.1'
__version__ = '1.7.2'
4 changes: 2 additions & 2 deletions easyocr/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ def get_detector(trained_model, device='cpu', quantize=True, cudnn_benchmark=Fal
net = CRAFT()

if device == 'cpu':
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device)))
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device, weights_only=False)))
if quantize:
try:
torch.quantization.quantize_dynamic(net, dtype=torch.qint8, inplace=True)
except:
pass
else:
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device)))
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device, weights_only=False)))
net = torch.nn.DataParallel(net).to(device)
cudnn.benchmark = cudnn_benchmark

Expand Down
4 changes: 2 additions & 2 deletions easyocr/recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def get_recognizer(recog_network, network_params, character,\
model = model_pkg.Model(num_class=num_class, **network_params)

if device == 'cpu':
state_dict = torch.load(model_path, map_location=device)
state_dict = torch.load(model_path, map_location=device, weights_only=False)
new_state_dict = OrderedDict()
for key, value in state_dict.items():
new_key = key[7:]
Expand All @@ -179,7 +179,7 @@ def get_recognizer(recog_network, network_params, character,\
pass
else:
model = torch.nn.DataParallel(model).to(device)
model.load_state_dict(torch.load(model_path, map_location=device))
model.load_state_dict(torch.load(model_path, map_location=device, weights_only=False))

return model, converter

Expand Down
2 changes: 2 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- 24 September 2024 - Version 1.7.2
- Fix several compatibilities
- 4 September 2023 - Version 1.7.1
- Fix several compatibilities
- 25 May 2023 - Version 1.7.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def readme():
name='easyocr',
packages=['easyocr'],
include_package_data=True,
version='1.7.1',
version='1.7.2',
install_requires=requirements,
entry_points={"console_scripts": ["easyocr= easyocr.cli:main"]},
license='Apache License 2.0',
Expand Down

0 comments on commit c4f3cd7

Please sign in to comment.