Comments (1)
-
So I went and checked the code to see if the weights are being taken from the trained model or just being initialized randomly:
turns out there is the following part in the recognition.py
of EasyOCR:
if device == 'cpu':
state_dict = torch.load(model_path, map_location=device)
new_state_dict = OrderedDict()
for key, value in state_dict.items():
new_key = key[7:]
new_state_dict[new_key] = value
model.load_state_dict(new_state_dict)
Which I am also on CPU. So I went and compared the dicts and it seems that they are the same:
# Compare state_dict and new_state_dict
differing_indices = []
for idx, (key, state_value) in enumerate(state_dict.items()):
new_value = new_state_dict.get(key, None)
if new_value is not None and not torch.equal(state_value, new_value):
differing_indices.append(idx)
if len(differing_indices) == 0:
print("The state_dict and new_state_dict are the same.")
else:
print("The state_dict and new_state_dict differ at the following indices:")
print(differing_indices)
Output: The state_dict and new_state_dict are the same.
So I'm not sure what can cause this...
Any ideas? đ
from deep-text-recognition-benchmark.
Related Issues (20)
- training success ,but failed is run as python file
- training success , but run python code error, about
- Text Color Recognition in Images
- after Fine tuning, demo.py can't decode original data HOT 1
- RuntimeError HOT 1
- how to get coordinate of the text
- how i convert .zip files to .pth?
- AssertionError: datasets should not be an empty iterable
- CUDA error, while training Attn as prediction
- Cannot train model for upper case characters
- I encountered a bug when executing the following command in the deep-text-recognition-benchmark repository HOT 1
- [Question] Configuring the dataset for custom training HOT 2
- custom dataset Calculated padded input size per channel: (1 x 22). Kernel size: (2 x 2)
- Check the wrong prediction data
- Can it be used to extract texts from an entire page ?
- Adding new characters causes error HOT 2
- [Training] lmdb.Error: The paging file is too small
- ImportError: cannot import name '_accumulate' from 'torch._utils' HOT 1
- I am getting AssertionError: datasets should not be an empty iterable HOT 1
- Getting RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deep-text-recognition-benchmark.