Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

can't load R50 FPN 2x checkpoint from Detectron #161

Open
happynewya opened this issue Oct 10, 2018 · 0 comments
Open

can't load R50 FPN 2x checkpoint from Detectron #161

happynewya opened this issue Oct 10, 2018 · 0 comments

Comments

@happynewya
Copy link

Expected results

load checkpoints from Detectron R-50_FPN_2x
image

Actual results

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/work/Detectron.pytorch/tools/train_net_step.py in <module>()
    457
    458 if __name__ == '__main__':
--> 459     main()

~/work/Detectron.pytorch/tools/train_net_step.py in main()
    307     if args.load_detectron:  #TODO resume for detectron weights (load sgd momentum values)
    308         logging.info("loading Detectron weights %s", args.load_detectron)
--> 309         load_detectron_weight(maskRCNN, args.load_detectron)
    310
    311     lr = optimizer.param_groups[0]['lr']  # lr of non-bias parameters, for commmand line outputs.

~/work/Detectron.pytorch/lib/utils/detectron_weight_helper.py in load_detectron_weight(net, detectron_weight_file)
     21         d_name = name_mapping[p_name]
     22         if isinstance(d_name, str):  # maybe str, None or True
---> 23             p_tensor.copy_(torch.Tensor(src_blobs[d_name]))
     24
     25

KeyError: 'conv_rpn_fpn2_w'

Detailed steps to reproduce

python tools/train_net_step.py --dataset coco2017 --cfg configs/baselines/e2e_faster_rcnn_R-50-FPN_2x.yaml --bs 4 --load_detectron data/pretrained_model/detectron/e2e_faster_rcnn_R-50-FPN-2x.pkl

System information

  • Operating system: Ubuntu
  • CUDA version: 8.0
  • python version: 3.5
  • pytorch version: 0.4
  • Anything else that seems relevant: I can load R-50-FPN-1x successfully,I think you can add a key check at load_detectron_weights。
@happynewya happynewya changed the title can't load R50 FPN 1x checkpoint from Detectron can't load R50 FPN 2x checkpoint from Detectron Oct 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant