models icon indicating copy to clipboard operation
models copied to clipboard

models works on float32 instead of uint8

Open naarkhoo opened this issue 3 years ago • 5 comments

Hi,

I am in the process of my ssd model based on ssd_mobilenet_v2_320x320_coco17_tpu and I noticed the model works on float32 and not uint8 - I am curious how I can make that change ?

Also I appreciate if you point me to other tricks that I can make my model run faster at inference level. for example larger kernel size ? or shallower model ? or some threshold ? I feel these recommendations/explanation can be helpful when it comes to optmization

here is the link to the colab notebook https://drive.google.com/file/d/1iqUgeabbTgfixehGomDoj5eHGfHd8Lvt/view?usp=sharing

naarkhoo avatar Sep 02 '22 14:09 naarkhoo

@naarkhoo In order to expedite the trouble-shooting process, could you please provide the entire URL of the repository which you are using. Please provide more details on the issue reported here. Thank you!

sushreebarsa avatar Sep 07 '22 06:09 sushreebarsa

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] avatar Sep 14 '22 07:09 google-ml-butler[bot]

sorry for my late reply here is the colab https://drive.google.com/file/d/1iqUgeabbTgfixehGomDoj5eHGfHd8Lvt/view?usp=sharing and I made sure you have access to the files.

with the current code the model latency on android devices (average device) is 150ms - my goal is to make a model to work at 50ms - seems I have make sure the model works with uint8 data type.

naarkhoo avatar Sep 14 '22 07:09 naarkhoo

@jaeyounkim for TF-MOT problems

saberkun avatar Nov 26 '22 04:11 saberkun

"ssd_mobilenet_v2_320x320_coco17_tpu" is what "TensorFlow Object Detection API" provides. It is not the model officially supported by the Model Garden team. Let me check if the TensorFlow Model Optimization Toolkit (https://github.com/tensorflow/model-optimization) team can provide some help.

jaeyounkim avatar Nov 28 '22 02:11 jaeyounkim

The model is not quantized that's all. Read the name and compare it to the quantized model you'll find the difference. You must do post training quantization for the required result.

Additionally to run faster your model you need a tflite model and possibly a hardware accelerator like Google coral usb accelerator

Petros626 avatar Jun 24 '23 07:06 Petros626