microsoft / SoftTeacher

Semi-Supervised Learning, Object Detection, ICCV2021
MIT License
899 stars 123 forks source link

How do I use Torchvision R50 Weights #110

Open sarmientoj24 opened 2 years ago

sarmientoj24 commented 2 years ago

I would want to use ViSSL and pre-train the weights before using SoftTeacher. However, I am having problems with the Caffe weights. I would like to know how do I use the Resnet-50 torchvision weights from here https://github.com/open-mmlab/mmdetection/blob/master/docs/model_zoo.md in this code. Or if it is possible.

MendelXu commented 2 years ago

You can just change the style in the model config to pytorch and write the path of the model in the init_cfg.

model = dict(

    backbone=dict(
        style='pytorch',
        init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
...
zhaogev5 commented 2 years ago

I also use the torch checkpoint but performance is bad,even the loss is Nan,How can I solve it

NimaDL commented 2 years ago

I have got the same bad results using pytorch style. Is it required to change something else in the config file once the stype is changed to pytorch. By checking the visualization in wandb, the model estimation for bbox is really bad during the training phase.

MendelXu commented 2 years ago

Could anyone share your config file here?