edgetpu: ERROR : Deadline exceeded: USB transfer error 2 [LibUsbDataOutCallback]
I am using 2 Coral Edge Tpu’s on Rasberry Pi 4. I use 2 threads to utilize the Coral’s, where on the first thread I switch between 2 models to detect objects and extract features. Similarly, on the second thread I switch between 2 models to detect and classify objects. I have encountered the following error consistently when running the code for a long period of time (couple of hours).
F :838] transfer on tag 1 failed. Abort. Deadline exceeded: USB transfer error 2 [LibUsbDataOutCallback] Fatal Python error: Aborted
This error is precisely encountered when edgetpu.basic.basic_engine.BasicEngine.run_inference is called.
As far as I have experimented, I could not reproduce the problem in a consistent manner. It usually occurs after running for a couple hours, but also occasionally in shorter amounts of time. Moreover, I did not encounter the error when using a single Edge TPU with either thread function. Thus I suspect that this has something to do with the USB bus and its limitations in transferring data to two different Coral’s in a sufficient amount of time.
Any ideas on causes or workarounds?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16
No, but as a workaround, I’ve moved my Frigate + TPU setup to a RPi400.
I am using HomeAssistant yellow, and I’m still experiencing this issue.
I have tried using a powered USB hub and I made sure it can supply the Coral’s peak current usage of 900 mA (I’ve used https://sandberg.world/en-us/product/USB-3.0-Hub-7-ports)
I have tried several different USB cables, and even tried using an extender to a total of 2m, since some people suggested moving the TPU away from the HomeAssistant yellow to avoid USB3 interference, but to no avail.
After the reboot, the TPU unit is detected, and the first detection or two seem to be working fine, but after that it just errors out with the aforementioned error.
EDIT: I have tried it with RaspberryPI 400 and it works fine, so it is definitely something with Raspberry PI Compute module 4 or the HomeAssistant Yellow hardware itself.
@Namburger thank you very much, I’ll try with a powered usb hub.