不知道什么时候安装了pycocotools,在import的时候一只报错
No module named 'pycocotools._mask'
解决方法:
找到annconda目录annconda\Lib\site-packages下的pycocotools文件夹将其删除,如果没有,可以忽视这一步
然后在github上下载大神改写的
支持 Windows 的 COCO 地址:https://github.com/philferriere/cocoapi
下载完后,解压,结果如下
在cmd中切换到上述路径下
# install pycocotools locally
python setup.py build_ext --inplace
# install pycocotools to the Python site-packages
python setup.py build_ext install
完成!