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
Segmentation Fault when using Coral Edge Tpu #62371
Comments
@Skillnoob Could you please make sure that you are using the correct TensorFlow Lite model and interpreter for your Edge TPU device? |
@sushreebarsa The model has been converted to tflite with int8 and compiled using the latest version of the edgetpu compiler. The edgetpu runtime is also on the latest version. The ultralytics module uses the tflite interpreter from the tensorflow module iirc. |
@Skillnoob , Could you please provide the model_edgetpu.tflite file to better understand the issue and to investigate further? Thank You |
@Skillnoob, I have verified the Tflite file given. It seems that your model is using custom ops. Please find the gist. Could you please check these instructions(documentation) for custom ops and let us know if they have been followed? Thank You |
@LakshmiKalaKadali the error you got inside the notebook is to be expected as the model relies on the delegate from the coral usb accelerator |
Hi @pkgoogle , Thank you |
Hi @Skillnoob, it seems like there is a dependency on some installation instructions from Coral? Can you let us know the Coral instructions you followed prior to receiving this error? Also please note that the website explicitly states:
As a requirement. Apparently you are using: 3.11.2, you might want to try using python=3.9 and see if it resolves your issue. Thanks for your help. |
@pkgoogle Hi. I've tried the same program previously on a raspberry pi 4B with python 3.9.2 and had the same crash but couldn't run it through gdb as the pi would just freeze. I also tried it on the pi 5 using a anaconda virtual env with python 3.9.18 and the same crash occured. |
Recently tried to run this using tensorflow-aarch64 2.13.1 and 2.15.0 and the crash still occurs |
easier way of reproducing the issue:
Install the edge tpu runtime as explained here
|
also tried this with every tensorflow version going from the current latest to 2.12.1 on a raspberry pi 4B with python 3.9.2 |
This is now resolved due to https://github.com/feranick updating the libedgetpu runtime to support newer tflite_runtime versions in google-coral/edgetpu#812 . |
I would still keep this issue open. While there is a solution from my forked repository, Google should update the main one, and until then the issue is not solved. |
@feranick i agree. But it seems that google has completly abandoned the coral project. |
Hi @feranick I don't work with that repo but can you perhaps link your PR that fixes the issue? Maybe I can help push it from here. Edit: nevermind.. found it. I think this is it? google-coral/libedgetpu#59 |
@pkgoogle thats the correct pr |
New builds are finally available against Tensorflow I plan to do a new PR soon. https://github.com/feranick/libedgetpu/releases/tag/v16.0-TF2.15.0-1 |
Thanks. That is the PR, but I plan to make a new one based on the last few commits hat bring support to TensorFlow 2.15.0. I'll post here. |
BTW, in case someone needs updated https://github.com/feranick/TFlite-builds/releases/tag/v2.15.0 |
@feranick Thanks a lot! Finally after a long journey in the rabbit hole, this is the only solution to get working with 3.11 currently |
pkgoogle Just wondering whether you had a chance to move this forward. The correct and current PR is this: |
Thanks very much to @pkgoogle and @Namburger at Google for merging PR. The libedgetpu library is now fully updated, and I hope binaries will be made available soon through the official channel. |
Hi @Skillnoob, as @feranick mentioned, the libedgetpu library is now updated. Can you test your case against master and see if it resolves your issue? |
@Skillnoob, awesome, if you are confident this issue is resolved and you have no more open items, please feel free to close this issue as completed. Thanks. |
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
binary
TensorFlow version
2.14.0
Custom code
Yes
OS platform and distribution
Raspberry Pi Os Bookworm
Mobile device
No response
Python version
3.11.2
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
The program crashes as soon as it tries to load the edge tpu model.
I already asked in the YoloV8 discord and they told me to open a issue here from looking at the stacktrace.
The hardware is a raspberry pi 5 with 8Gb of ram but the same issue also happens on a raspberry pi 4B with 2Gb of ram
Standalone code to reproduce the issue
Relevant log output
Crash when running through gdb to get the stacktrace:
Stacktrace made using gdb:
The text was updated successfully, but these errors were encountered: