er-muyue / DeFRCN

MIT License
182 stars 43 forks source link

question about backbone #18

Closed junwei0812 closed 2 years ago

junwei0812 commented 2 years ago

I have great respect for your excellent work. and I have some questions. You provide two models contains a ".pkl" and a ".pth". Noticing that these models are pre-trained on ImageNet, I'd like to know whether the ".pkl" model is converted from ".pth". I use your model get the proposed performance. However, I try to convert "pth" to "pkl" and train the base classes, but can not get the same performance. Could you please give some suggestions?

er-muyue commented 2 years ago

Sorry for late reply. Actually, the ".pkl" model is from Detectron2 Repo, which is slightly different (e.g. BGR or RGB, BN and so on) with ".pth" model from torchvision, please refer this code script to perform converting correctly. Secondly, the ".pth" model is only used in our PCB module. If you want to ensure the consistency of the pretrain model, I suggest using the ".pkl" model (from d2) in the PCB module directly instead of converting the ".pth" model to ".pkl" model in the FRCN backbone. Moreover, you still need to promise the input format of PCB module is correct (this code-line).