ShuangXieIrene / ssds.pytorch

Repository for Single Shot MultiBox Detector and its variants, implemented with pytorch, python3.
MIT License
571 stars 166 forks source link

Cannot re-implement the performance #6

Closed JesseYang closed 6 years ago

JesseYang commented 6 years ago

I have tried to train the ssdlite with Mobilenetv2 as the backbone. As suggested, the pre-trained Mobilenetv2 model is downloaded from another repo. Besides changing the weights' name in pre-trained model to load it, I also change the preprocessing of input images. The input image is normalized to to make the mean 0 and standard deviation 1, as an issue in the repo of the pre-trained model shows. I didn't make other modifications and followed the Readme to train the ssdlite model for 300 epochs. I used the test.py to test and the mAP after 300 epochs is about 65 to 66. I also tested the pre-trained ssdlite model downloaded from the 73.2 link in the Readme file, and the mAP is 73.4 when nms threshold is 0.45.

Could you give some suggestions on how to improve the mAP and re-implement the results? Thanks!

foreverYoungGitHub commented 6 years ago

The preprocessing will not have a huge influence on the bad result. Actually, normalization always have good result in my experience.

I'm not sure that, when you train the net, do you try to train the extra layers and localization and classification layers first and freeze the base model at the same time?

JesseYang commented 6 years ago

Do you mean firstly set the "TRAINABLE_SCOPE" in configuration file as "extras, loc, conf", train some epochs, and then include "base" in the "TRAINABLE_SCOPE"? I have tried that in my tensorflow implementation, but didn't see much difference. In your experience, how much improvement can be achieved by doing this? I will try with this repo. How many epochs should I freeze the base part when training on VOC dataset?

foreverYoungGitHub commented 6 years ago

It could get around 2~4% improvement when you freeze the previous layers(sometimes partially basebone). It's hard to say how many epoch it should be freezed. Regularly, I just try 30~50 epochs.

Besides, I also used the coco as the pretrain model in sometimes, but I'm not sure which model I used to train coco first.

bailvwangzi commented 5 years ago

@JesseYang Can you re-implement the mAP 73.x% performance? thanks