weixin_46615730
weixin_46615730
2021-02-27 21:57

Mask R-CNN 预训练权重文件的准备时不能生成my_pretrained_R_50.pth

以下是我cmd里面的代码及报错,求大神帮助

 

 

(maskrcnn) D:\maskrcnn2\maskrcnn-benchmark>python weights/trim_detectron_model.py --pretrained_path weights/e2e_mask_rcnn_R_50_FPN_1x.pth --save_path weights/my_pretrained_R_50.pth
detectron path: weights/e2e_mask_rcnn_R_50_FPN_1x.pth
Traceback (most recent call last):
  File "weights/trim_detectron_model.py", line 41, in <module>
    _d=torch.load(pretrained_model_pth)
  File "D:\anaconda\envs\maskrcnn\lib\site-packages\torch\serialization.py", line 581, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "D:\anaconda\envs\maskrcnn\lib\site-packages\torch\serialization.py", line 230, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "D:\anaconda\envs\maskrcnn\lib\site-packages\torch\serialization.py", line 211, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'weights/e2e_mask_rcnn_R_50_FPN_1x.pth'
 

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答