cnn-number-detection
cnn-number-detection copied to clipboard
Unable to run the code
Hi,
I am trying to run the code using already train models on one of the available images. I basically just want to test how it works.
I am in cnn-number-detection folder and I run python3 Tester/test_model.py -h and get the following error:
from Tester.tester import Tester ModuleNotFoundError: No module named 'Tester'
I am not sure what and how to change, the dependencies look ok so I have no idea what is wrong. Could you please help?
The imports in the project are done by importing them as modules. Thus you have to start all scripts with the respective flag -m
from python as follows: python3 -m Tester.test_model -h
Thank you!
I seem to have the code working now. But I encounter few more issues. When I run the code on picture without numbers I get:
Total params: 57,482 Trainable params: 57,482 Non-trainable params: 0
2022-01-13 15:35:07,428 - Tester - INFO - [Prediction] type: info, category: -1 (100.00%) : cannot connect to X server
Which seems fine, category is -1 so no digit detected, but when I run it on the picture with digits I get:
Total params: 57,482 Trainable params: 57,482 Non-trainable params: 0
and thats it! What is the detected digit? There is no prediction displayed anywhere....
Also another thing is I tried to run the code on my image and I get the error message as below:
Total params: 57,482 Trainable params: 57,482 Non-trainable params: 0
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/cnn-number-detection/Tester/test_model.py", line 57, in
Not sure how I can give my image those attributes
Could you please advice?
Thanks, Kornelia