Coral.ai error

Pandemic

n3wb
Oct 29, 2021
30
12
earth
I'm having the following error:

00:05:45:objectdetection_coral_adapter.py: Unable to load OpenCV or numpy modules. Only using PIL.
00:05:45:objectdetection_coral_adapter.py: Unable to find or initialise the Coral TPU. Falling back to CPU-only.
00:05:45:objectdetection_coral_adapter.py: Using CPU

Obviously the response using CPU only is pretty damn long. I've got numpy installed but I'm not sure why it's not recognizing it.
 
I had the same problem after I just upgraded CPAI from 2.6.2 to 2.6.5

I rebooted and then also disabled Multi-TPU. That seemed to fix it for me.

My CPU went from 40-50% usage down to 15-20% and the detect times went from 9,000-10,000ms to 30-50 ms.

I feel CPU usage is slightly higher since upgrading but not 100% sure.

There is still a bug where it is not using the correct model. (it says it is in the logs but it's not)
 
Thanks for the response, I'll give that a try. I was really hoping to cut the response times down but the YOLOv5 seems to run at the same timing on my GTX960 vs the Coral Edge TPU. I'm getting pretty close to just building a dedicated box with an RTX GPU.

I'll try making sure the multi-TPU is disabled to see if it improves reliability. What version of python are you running (or does it matter?) I'm on 3.8.
 
13:11:17:Response rec'd from Object Detection (Coral) command 'detect' (...ba7f2d) ['Found car'] took 11735ms
13:11:18:Response rec'd from Object Detection (Coral) command 'detect' (...3e1d7d) [''] took 60ms
13:11:19:Response rec'd from Object Detection (Coral) command 'detect' (...796cd6) [''] took 63ms
13:11:28:Response rec'd from Object Detection (Coral) command 'detect' (...f66f17) ['No objects found'] took 11706ms
13:11:40:Response rec'd from Object Detection (Coral) command 'detect' (...e9d853) [''] took 62ms
13:11:43:Response rec'd from Object Detection (Coral) command 'detect' (...2da7cc) ['No objects found'] took 11837ms
 
I’m away for the weekend so won’t be able to check the versions till tomorrow.

The older version (I think it was 2.1) was more stable but the installer doesn’t work anymore.

My goal is to move this to a VM so I can keep back ups since the installers keep changing too.
 
IDK if the python version matters but my version is 3.9.6150.1013. Out of habit I uninstall the old version, delete all the CPAI files/folders, and then install a clean new version. I also did reboot again after I made the configuration changes (maybe even more than once).

I came back today and it's still running using the TPU but it look as though it paused or restarted as I was looking at it. If didn't say restarting but the bottom bar changed from color to like a grey for a couple of seconds.

I'm no expert but the times should not be that drastic of a difference (i.e.: 60 ms vs 11700ms). From what I remember reading it could be because you are using a large model and it has to swap memory (so first part is quick and second part is longer). I think there was another reason but can't remember at this time.

It would probably be good to show the modules you are using and system info. Also, show the system logs when you first start the module to confirm the model and size. It would give a better understanding of your environment.
 
So I'm getting the same problem now no matter what I try.

I also noticed that after my PC reboots, the module is not starting automatically.

I wish I could go back to 2.5.1 which had no problems. Only reason I upgraded was for multi-TPU but it has been buggy ever since. :banghead:


EDIT:

BTW are you running CPAI in Windows, Linux, or Docker? I'm running it on Windows. I tried upgrading my Linux instance (which was for testing) but that had issues too. However, the Linux one may be something else.
 
Last edited:
I'm running it on windows with WSL for testing the TPU. I've not touched this since my last message. I was actually thinking about building a beefier system with a GPU rather than this setup. My dual edge tpu doesn't fit and the USB tpu seems to be ineffective for now. Google hasn't updated the repositories since 2022...
 
I'm having the same error, after installing a new m.2 PCIe dual-TPU card this morning.
Any new or updated suggestions? This is just not a good situation. :(

Looks like the pycoral Python libraries are Google abandonware these days. :(
Fortunately, an open-source developer named feranick has developed some much needed patches and libraries.
The Frigate team are working with this, but that's Linux, and feranick isn't actively supporting Windows.
 
Last edited: