tensorflow / models

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

Same models trained on ssd mobilenet v2 fpn lite 640*640 have different FPS. #9580

Open dhirajpatnaik16297 opened 3 years ago

dhirajpatnaik16297 commented 3 years ago

I have a 1650ti gpu 4gb and i trained an object detection model for detection of one class and then trained another model with 38 classes. The model with 1 class is giving 30 FPS but the model with 38 classes is giving 0.03 FPS. I have exported the saved model into a frozen graph and have done the inference from the checkpoint as mentioned here:: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/auto_examples/plot_object_detection_checkpoint.html#sphx-glr-auto-examples-plot-object-detection-checkpoint-py for both the models but one is performing fast and another one is dead slow.I am not able to figure out where i am going wrong. I have tried out to retrain by following the tutorial again but the results are same. The accuracy is good but only fps is hampered. Please help me out as soon as possible.

I even tried out other ssd models for multiple classes but the problem remains the same but single class models achieve the desired fps and accuracy.

Also, does increasing number of classes decreases the fps? I want to know. I have tried out all optimization techniques but all in vain.

Please let me know how to rectify this issue as soon as possible.

google-ml-butler[bot] commented 3 years ago

Are you satisfied with the resolution of your issue? Yes No

dhirajpatnaik16297 commented 3 years ago

Guys, did anyone face anything like this? Please help me out. I am stuck.

dhirajpatnaik16297 commented 3 years ago

Guys one more update.Its the same for other models as well. the 320*320 version of ssd mobilenet and efficientnet. I have tried them out too but no luck till now. One more thing, the pretrained COCO weights has 90 classes but it is not slow then how come a custom one with 38 classes is dead slow. Please help me out or provide me with a hack or something that will solve this.