|
COCO数据集的官方介绍:
COCO is a large image dataset designed for object detection, segmentation, person keypoints detection, stuff segmentation, and caption generation. This package provides Matlab, Python, and Lua APIs that assists in loading, parsing, and visualizing the annotations in COCO. Please visit http://cocodataset.org/ for more information on COCO, including for the data, paper, and tutorials.
使用coco数据集之前需要安装官方提供的api,github链接如下:
https://github.com/cocodataset/cocoapi
安装的时候根据python版本的不同,步骤也略有不同。
首先,切换到coco api下PythonAPI路径:
cd cocoapi/PythonAPI
1. python 2.7版本,在我的机器上直接make就可以正常使用。如果不行的话,参考如下步骤:
make
make install
python setup.py install
2. python 3.5版本
python3 setup.py build_ext --inplace
python3 setup.py build_ext install
配置完成后,通过测试pycocotools能否正常导入来检查cocoapi是否安装成功。
import pycocotools
|