example-object-tracker icon indicating copy to clipboard operation
example-object-tracker copied to clipboard

Failed to prepare for TPU

Open Snail124 opened this issue 3 years ago • 6 comments

Description

I tried to retrain an "EfficientDet-Lite" detection with the "Retrain EfficientDet-Lite detector for the Edge TPU (TF2)" guide (https://colab.research.google.com/github/google-coral/tutorials/blob/master/retrain_efficientdet_model_maker_tf2.ipynb) and to use it with this example object tracker. When I try to execute the detect.py file with the retrained model, I get the error: "Failed to prepare for TPU". Does somebody know a solution for this problem? Or is there any other option to retrain a model to use it with this detect.py file?

Click to expand!

Issue Type

Support

Operating System

Mendel Linux

Coral Device

Dev Board Mini, Coral Camera

Other Devices

No response

Programming Language

Python 3.7

Relevant Log Output

RuntimeError: Failed to prepare for TPU. Failed precondition: Package requires runtime version (14), which is newer than this runtime version (13).Node number 4 (EdgeTpuDelegateForCustomOp) failed to prepare.

Snail124 avatar Oct 01 '22 08:10 Snail124

Hi @Snail124 this project hasn't been implemented for Dev Board Mini.

RuntimeError: Failed to prepare for TPU. Failed precondition: Package requires runtime version (14), which is newer than this runtime version (13).Node number 4 (EdgeTpuDelegateForCustomOp) failed to prepare.

Please update the packages to resolve the failed to preprare for TPU error. https://coral.ai/docs/dev-board-mini/get-started/#6-update-the-mendel-software

sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot now

hjonnala avatar Oct 04 '22 02:10 hjonnala

@hjonnala thank you for your answer. I did the update and rebooted the Dev Board Mini. Then I tried to run the object detection with the default .tflite file. This worked, but with the retrained model, I got the same error. Then I tried to reflash the board with the latest OS version (https://coral.ai/docs/dev-board-mini/reflash/) , but the Dev Board Mini wasn't detected by the flash.sh script. The fastboot script also didn't detect the board, but the LED turns to red. Now the Board doesn't boot anymore. When I try to boot the Board, the LED stays green-red and doesn't turn to green. Is there an solution to get the board working again? Or is it broken?

Snail124 avatar Oct 05 '22 16:10 Snail124

please try flashing the board using force boot method: https://coral.ai/docs/dev-board-mini/reflash/#force-boot-into-fastboot-mode

hjonnala avatar Oct 06 '22 00:10 hjonnala

I tried to flash the Board using the force bood method. The LED turned to red, but the board wasn't detected by the linux devices. I executed it with 2 different Raspberry Pi's and with one MX-Linux computer and with different USB-C cables, but it didn't work. Is there another solution?

Snail124 avatar Oct 06 '22 17:10 Snail124

I reflashed the board, but I had to interrupt the flash script. When I power the board, no LED lights.

Snail124 avatar Oct 06 '22 19:10 Snail124

Hi @hjonnala, after I had to cancel the fastboot flash script, the red and green LEDs do no longer light up when I power the board, because the Dev Board Mini does no longer boot. The operating system is probably no longer complete after the script has been aborted. I have already tried to start the fastboot mode a few times, but it does not work. I also tried to power the board, connected with an screen, but it also does not work. Is there another way to reinstall the operating system?

Snail124 avatar Dec 18 '22 11:12 Snail124