google-coral / example-object-tracker

Apache License 2.0
105 stars 32 forks source link

Failed to prepare for TPU #23

Open Snail124 opened 1 year ago

Snail124 commented 1 year ago

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 ```shell 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. ```
hjonnala commented 1 year ago

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
Snail124 commented 1 year ago

@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?

hjonnala commented 1 year ago

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

Snail124 commented 1 year ago

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 commented 1 year ago

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

Snail124 commented 1 year ago

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?