本文复现的代码来自:https://github.com/jwyang/faster-rcnn.pytorch/tree/pytorch-1.0,直接下载压缩包,没有使用git克隆(貌似克隆的代码有点问题)。
首先按照链接中的步骤进行环境配置,在运行中可能会出现以下错误:
1.No module named ‘pycocotools._mask’
可能是由于pycocotool相关的问题,安装pycocotools工具包
// 安装pycocotools工具包
pip install pycocotools
2.ImportError: cannot import name ‘imread’
这大多是因为 “scipy” 库和 “pillow” 库的版本不匹配,安装适配版本,本人使用第一条语句后即可通过。
pip install scipy==1.2.1
pip install pillow==6.1.0
参考:
https://blog.csdn.net/weixin_44695969/article/details/100523017