google-coral / tflite

Examples using TensorFlow Lite API to run inference on Coral devices
https://coral.withgoogle.com
Apache License 2.0
181 stars 67 forks source link

Calling `make_interpreter()` crashes the sample `classify_image.py` script with no error message #53

Closed talcs closed 2 years ago

talcs commented 2 years ago

Description

Hello,

I have a Windows 10 machine and I could only execute the Coral example using the old drivers (edgetpu_runtime_20210119), which caused abnormal runtimes of ~1800ms per image.

Later, I fixed the install.bat script in the latest version (edgetpu_runtime_20210726):

Before change

start /wait msiexec /i "%ROOTDIR%\third_party\usbdk\UsbDk_*.msi" /quiet /qb! /norestart

After change

start /wait msiexec /i "%ROOTDIR%\third_party\usbdk\UsbDk_1.0.22_x64.msi" /quiet /qb! /norestart

Now the failed to load delegate from edgetpu.dll error message has disappeared, yet a new error started appearing, where the script hangs up with no error message when it calls interpreter = make_interpreter(*args.model.split('@')).

Insights

Any advice?

Click to expand! ### Issue Type Build/Install, Support ### Operating System Windows 10 ### Coral Device USB Accelerator ### Other Devices _No response_ ### Programming Language Python 3.7 ### Relevant Log Output _No response_
hjonnala commented 2 years ago

Hi, in this issue you are trying with cpu tflite model. Can you please try with mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite.

talcs commented 2 years ago

Wow, thanks! I'm pretty shocked... wasn't aware of the fact that there were two files with similar names.

The updated output:

C:\programs\coral\pycoral>python .\examples\classify_image.py --model .\test_data\mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --labels .\test_data\inat_bird_labels.txt --input .\test_data\parrot.jpg
----INFERENCE TIME----
Note: The first inference on Edge TPU is slow because it includes loading the model into Edge TPU memory.
14.4ms
4.8ms
4.9ms
4.8ms
4.7ms
-------RESULTS--------
Ara macao (Scarlet Macaw): 0.76953

Problem's solved 😃

google-coral-bot[bot] commented 2 years ago

Are you satisfied with the resolution of your issue? Yes No