lp6m / yolov5s_android

Run yolov5s on Android device!
GNU General Public License v3.0
311 stars 77 forks source link

node wrong #7

Closed ppogg closed 2 years ago

ppogg commented 2 years ago

Sir, I use this warehouse to build yolov5 lite, but I get the following error. Screenshot_2021-11-20-13-44-15-964_com example tf The code is too long, I don’t know where to change it. Can you give some suggestions for me? Thankyou very much! The tflite model as follow: https://github.com/PINTO0309/openvino2tensorflow/files/7573864/saved_model.zip

lp6m commented 2 years ago

did you try the model on github? https://github.com/lp6m/yolov5s_android/tree/master/tflite_model
I checked your converted tflite model, and the model itself seems ok.

It is possible that the order of the output layers in the tflite model you converted yourself may be different from the model I converted. Try changing the order of the sizes of the output layers.

https://github.com/lp6m/yolov5s_android/blob/master/app/tflite_yolov5_test/app/src/main/java/com/example/tflite_yolov5_test/TfliteRunner.java#L46-L48 https://github.com/lp6m/yolov5s_android/blob/master/app/tflite_yolov5_test/app/src/main/java/com/example/tflite_yolov5_test/TfliteRunner.java#L147-L149

ppogg commented 2 years ago

Thankyou Sir. I try it, but failed~ May not only modify these places,right?

lp6m commented 2 years ago

Your tflite model includes "StatefulPartitionedCall". Please use my convert script.https://github.com/lp6m/yolov5s_android/tree/master/convert_model