-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out how to run yolov8 on TPU #2
Comments
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install libedgetpu1-std
sudo apt-get install python3-pycoral Install the latest build opencv-python on piwheels, luckily ultralytics requires version 4.6 or above. https://www.piwheels.org/project/opencv-python/
Install ultralytics:
Trying to run model.export:need to install a specific https://linuxhint.com/install-cmake-on-debian/
relevant yolov8 convert to tflite model issue: ultralytics/ultralytics#1185 and PR to get it working: ultralytics/ultralytics#1695 (comment) Also seems edgetpu-compiler cant run on ARM, so need to do tflite -> edge_tpu model conversion on colab i think. unfortunately seems that conversion is failing still:
|
According to the yolov8 discord and this issue ultralytics/ultralytics#1185 it seems like currently this is a no go, but it does seem like people are working on it. Hopefully in the near future we can use it. |
Hi @shaunmulligan, have you found any solution related to the issue? |
Hey @dvando thanks for the tip, I haven't found a solution yet. I will give this a try. What TPU are you using, I'm using the USB based edge TPU from coral.ai, so that might make it more difficult :P |
Same with me, I'm using a USB Coral accelerator too, and it works great 👌 |
okay awesome, so all you did was use the standard yolov8s model and export to edge_tpu format using the above? |
The only noticeable change I made to the model is changing all of its activation functions to ReLU. After that, I followed the steps in the commit I mentioned above. I exported it to tflite int8, and then use the edgetpu_compiler to compile the model to run in the TPU. |
thats awesome @dvando , thanks so much for the tips! |
No description provided.
The text was updated successfully, but these errors were encountered: