一 Windows安装COCO-PythonAPI(pycocotools)
1 pip install cython
2 git clone https://github.com/cocodataset/cocoapi.git
3 cd C:UsersDELLcocoapiPythonAPI
这个路径根据自己的路径写
4 python setup.py build_ext --inplace
报错:
cl: 命令行 error D8021 :无效的数值参数“/Wno-cpp”
error: command ‘C:VS2017VCToolsMSVC14.16.27023binHostX86x64cl.exe’ failed with exit status 2
解决办法:
在setup.py文件中红框部分删除处理。
5 python setup.py build_ext install
二 代码
import os from pycocotools.coco import COCO



