tensorflow / models

Models and examples built with TensorFlow
Other
77k stars 45.79k forks source link

[TF1 OD API] Models eligible for quantization #9390

Closed SukyoungCho closed 3 years ago

SukyoungCho commented 3 years ago

Hi, I was wondering what models are able to be quantized from TF 1 Object Detection Model Zoo.

I am sure that models which have "quantized" in their names and three Pixel4 models (ssd_mobilenet & mobiledet - edgeTPU and DSP) are able to be quantized, but I wonder what other models I could quantize and use them.

To the best of my knowledge, FasterRCNN models are not supported and only SSD models are able to be quantized. Then are we able to quantize models like "ssd_mobilenet_v1_fpn_coco ☆"?

It would be very appreciated if anyone could clarify. Thank you.

@srjoglekar246 Guess you would be the one who could clarify this. I do really appreciate for all your help!

srjoglekar246 commented 3 years ago

Only models with quantized in their name & the ones meant for EdgeTPU/DSP from the TF1 zoo can be converted to the quantized versions. You will need to use these instructions to convert. Note that the parameters while using quantized conversion are different from float conversion, as detailed in the documentation I linked.

fabian57fabian commented 3 years ago

Hi, i was trying to start a new training on mobiledet model (because i have my own model on mobilenet v2 but has low mAP).

i copied sample pipeline conf file from sample/configs/ssdlite_mobiledet_edgetpu_320x320_coco_sync_4x4.config and changed class num and dataset paths. Also changed to execute fine-tuning and downloaded checkpoint.

Followed every step in the coral AI website.

Is the mobiledet SSD eligible to be trained? because i get following error: ValueError: Unknown ssd feature_extractor: ssd_mobiledet_edgetpu

kbettsNedieon commented 3 years ago

Did you ever fix the error: ValueError: Unknown ssd feature_extractor: ssd_mobiledet_edgetpu

I am having the same issue

Petros626 commented 1 year ago

Only models with quantized in their name & the ones meant for EdgeTPU/DSP from the TF1 zoo can be converted to the quantized versions. You will need to use these instructions to convert. Note that the parameters while using quantized conversion are different from float conversion, as detailed in the documentation I linked.

Is the model ssd_mobilenet_v2_quantized fully quantized? The graph_rewriter irritates me, because I guess it was for the training from scratch (from zero) necessary to learn the model from floatto integer.