mseg-dataset / mseg-semantic

An Official Repo of CVPR '20 "MSeg: A Composite Dataset for Multi-Domain Segmentation"
MIT License
457 stars 78 forks source link

Is pretrained weight used? #34

Open XAVILLA opened 2 years ago

XAVILLA commented 2 years ago

Hi, in train.md you mentioned that we need to download the ImageNet-pretrained HRNet backbone model from the original authors' OneDrive. After downloading the file, I assumed the path to this weight should be specified as "weight" in config yaml file to be used as the initial weight? However the model keys don't seem to match, so I'm confused where should I use the pertained HRNET model. Looking forward to your response

johnwlambert commented 2 years ago

Hi @XAVILLA, thanks for your interest in our work.

Which training config are you using? Are you running train.py?

XAVILLA commented 2 years ago

Thanks for getting back to me so quickly! Yes I'm running train.py, and using mseg_semantic/config/train/1080_release/mseg-relabeled-1m.yaml. Just wondering where should the ImageNet-pretrained HRNet backbone model be stored after download it, and where to specify the path to this file in config.

XAVILLA commented 2 years ago

I tried putting path to pertained weight in args.weight but got "KeyError: 'state_dict' " Also tried changing model.load_state_dict(checkpoint['state_dict']) to model.load_state_dict(checkpoint) but got a bunch of missing keys. Please let me know what I'm doing wrong. Thanks!