hunglc007 / tensorflow-yolov4-tflite

YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
https://github.com/hunglc007/tensorflow-yolov4-tflite
MIT License
2.25k stars 1.24k forks source link

Applying custom model on Android #226

Closed younghch closed 3 years ago

younghch commented 4 years ago

Hi, I have trained my own model and trying to apply it on android.

I tried changing "yolov4-416-fp32" to my custom model, "yolov4-3000.tflite", changed Image "kite.jpg" to my image and updated coco.txt to my label names. 2

but the app crushes when I click detect button, fail to run"tfLite.runForMultipleInputsOutputs(inputArray, outputMap);".

I checked every line and flags in the android studio, but could not figure out what went wrong, so I compared my tflite file with original one.

weird-explanation

And I found they have different structure, and guess that was why. So tried converting tflite file with my save weights, but always ends up different neural network structure from original one.

I don't know what I have done wrong, so could anyone successfully applied custom model on android give me some tips?

prakashr85 commented 4 years ago

can you pls tell how to get this structure for own model?

younghch commented 3 years ago

I used Netron. All you have to do is download the program and put your model in there https://github.com/lutzroeder/netron

Adithia88 commented 3 years ago

I used this default setting but the app get crush anybidy can help me?