amdegroot / ssd.pytorch

A PyTorch Implementation of Single Shot MultiBox Detector
MIT License
5.13k stars 1.74k forks source link

using COCO weights for transfer learning #367

Open pinkerltm opened 5 years ago

pinkerltm commented 5 years ago

I am training on Belgian Traffic Sign Detection Dataset (only on Traffic Sign Superclasses). So my model has only 12 classes to classify. I am wondering if and how it is possible to use the feature extraction weights from the pretrained ssd300_mAP_77.43_v2.pth file to initialize and then fine tune my model.

I've read that this is not possible as the .pth Files contain the model as a whole and I would need a .pt File. Is there another way of extracting the feature weights to my own model?

indrajitsg commented 5 years ago

PTH file should basically be a dictionary. One item in the dictionary would be the model weights. You can extract that item and load accordingly.