Skip to content
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

Could not use custom model in object detection #22

Closed
chenyuZha opened this issue Aug 13, 2019 · 4 comments
Closed

Could not use custom model in object detection #22

chenyuZha opened this issue Aug 13, 2019 · 4 comments
Assignees
Labels
type:research Model specific questions

Comments

@chenyuZha
Copy link

Recently I would like to replace model ssdlite_object_detection.tflite by my custom model, which is trained with ssd_mobilenetv2_coco(float model). To get tflite file, I use the script export_ssdlite_graph.py and set the flag add_postprocessing_op=False as mentioned in the tutorial, then I used TFliteConverter to quantize my model (weight only) to obtain my graph tflite.
For the part of mobile, I modified the model_path, label_map_path,num class,num_boxes(for my case is 1917 instead of 2034) in the object_detection_android_gpu.pbtxt. Besides, I replace the models and file txt in objectdetctiongpu/BUILD file. Then I build and install apk, no errors during the process. But when I run inference with my mobile, no bounding boxes were detected.. Did I miss something ? Thanks for your help!

@mgyong
Copy link

mgyong commented Aug 18, 2019

Routing to @fanzhanggoogle @chuoling

@fanzhanggoogle
Copy link

One issue is that to use quantized model, you should add use_quantized_tensors: true option to TfLiteConverterCalculator. Then the rest of the graph should take care of the quantized model naturally. Let me know if it works for you.

@fanzhanggoogle
Copy link

Please pull the latest commits, quantized model might not be supported yet in the previous release.

@fanzhanggoogle
Copy link

fanzhanggoogle commented Aug 22, 2019

Closing the issue. Please re-open if you still have issues.

@mgyong mgyong added the type:research Model specific questions label Aug 28, 2019
arttupii pushed a commit to arttupii/mediapipe that referenced this issue Nov 18, 2023
Adding README updates and images for all samples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:research Model specific questions
Projects
None yet
Development

No branches or pull requests

3 participants