Skip to content

Commit c4f3cd7

Browse files
committed
update v.1.7.2
1 parent 3d3852d commit c4f3cd7

6 files changed

Lines changed: 9 additions & 21 deletions

File tree

README.md

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

1515

1616
## What's new
17-
- 4 September 2023 - Version 1.7.1
17+
- 24 September 2024 - Version 1.7.2
1818
- Fix several compatibilities
19-
- 25 May 2023 - Version 1.7.0
20-
- 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))
21-
- Fix several compatibilities
22-
- 15 September 2022 - Version 1.6.2
23-
- Add CPU support for DBnet
24-
- DBnet will only be compiled when users initialize DBnet detector.
25-
- 1 September 2022 - Version 1.6.1
26-
- Fix DBnet path bug for Windows
27-
- Add new built-in model `cyrillic_g2`. This model is a new default for Cyrillic script.
28-
- 24 August 2022 - Version 1.6.0
29-
- Restructure code to support alternative text detectors.
30-
- 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')`.
31-
- 2 June 2022 - Version 1.5.0
32-
- Add trainer for CRAFT detection model (thanks[@gmuffiness](https://github.com/gmuffiness), see [PR](https://github.com/JaidedAI/EasyOCR/pull/739))
3319

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

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.7.1'
3+
__version__ = '1.7.2'

easyocr/detection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ def get_detector(trained_model, device='cpu', quantize=True, cudnn_benchmark=Fal
7575
net = CRAFT()
7676

7777
if device == 'cpu':
78-
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device)))
78+
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device, weights_only=False)))
7979
if quantize:
8080
try:
8181
torch.quantization.quantize_dynamic(net, dtype=torch.qint8, inplace=True)
8282
except:
8383
pass
8484
else:
85-
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device)))
85+
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device, weights_only=False)))
8686
net = torch.nn.DataParallel(net).to(device)
8787
cudnn.benchmark = cudnn_benchmark
8888

easyocr/recognition.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def get_recognizer(recog_network, network_params, character,\
166166
model = model_pkg.Model(num_class=num_class, **network_params)
167167

168168
if device == 'cpu':
169-
state_dict = torch.load(model_path, map_location=device)
169+
state_dict = torch.load(model_path, map_location=device, weights_only=False)
170170
new_state_dict = OrderedDict()
171171
for key, value in state_dict.items():
172172
new_key = key[7:]
@@ -179,7 +179,7 @@ def get_recognizer(recog_network, network_params, character,\
179179
pass
180180
else:
181181
model = torch.nn.DataParallel(model).to(device)
182-
model.load_state_dict(torch.load(model_path, map_location=device))
182+
model.load_state_dict(torch.load(model_path, map_location=device, weights_only=False))
183183

184184
return model, converter
185185

releasenotes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- 24 September 2024 - Version 1.7.2
2+
- Fix several compatibilities
13
- 4 September 2023 - Version 1.7.1
24
- Fix several compatibilities
35
- 25 May 2023 - Version 1.7.0

setup.py

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

0 commit comments

Comments
 (0)