cocodataset / cocoapi - 配置环境

cocodataset / cocoapi - 配置环境

https://github.com/cocodataset/cocoapi
COCO API - Dataset - http://cocodataset.org/

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. The exact format of the annotations is also described on the COCO website. The Matlab and Python APIs are complete, the Lua API provides only basic functionality.
COCO 是一个大型图像数据集,用于 object detection, segmentation, person keypoints detection, stuff segmentation, and caption generation。该软件包提供了 Matlab, Python, and Lua APIs,可帮助加载、解析和可视化 COCO 中的标注。请访问 http://cocodataset.org/ 以获取有关 COCO 的更多信息,包括数据、论文和教程。注释的确切格式也在 COCO 网站上描述。Matlab and Python APIs 都很完整,Lua API 仅提供基本功能。

In addition to this API, please download both the COCO images and annotations in order to run the demos and use the API. Both are available on the project website.
除了此 API 外,请同时下载 COCO 图像和注释,以运行演示并使用 API。两者都可以在项目网站上找到。
-Please download, unzip, and place the images in: coco/images/
-Please download and place the annotations in: coco/annotations/

For substantially more details on the API please see http://cocodataset.org/#download.

After downloading the images and annotations, run the Matlab, Python, or Lua demos for example usage.

To install:
-For Matlab, add coco/MatlabApi to the Matlab path (OSX/Linux binaries provided)
-For Python, run "make" under coco/PythonAPI
-For Lua, run “luarocks make LuaAPI/rocks/coco-scm-1.rockspec” under coco/

strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation$ git clone https://github.com/cocodataset/cocoapi.git
Cloning into 'cocoapi'...
remote: Counting objects: 936, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 936 (delta 0), reused 4 (delta 0), pack-reused 931
Receiving objects: 100% (936/936), 11.69 MiB | 1.59 MiB/s, done.
Resolving deltas: 100% (557/557), done.
Checking connectivity... done.
strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation$ ls
cocoapi
strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation$ cd cocoapi/
strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi$ ls
common  license.txt  LuaAPI  MatlabAPI  PythonAPI  README.txt  results
strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi$ cd PythonAPI/
strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi/PythonAPI$ ls
Makefile  pycocoDemo.ipynb  pycocoEvalDemo.ipynb  pycocotools  setup.py

strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi/PythonAPI$ sudo pip install cython
[sudo] password for strong: 
The directory '/home/strong/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/strong/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting cython
  Downloading https://files.pythonhosted.org/packages/fe/d6/a097bd9913cc0fc974b968f5586d3f0609f46ca58b2aae3b8dfd51c1fe18/Cython-0.28.2-cp27-cp27mu-manylinux1_x86_64.whl (3.3MB)
    100% |████████████████████████████████| 3.3MB 516kB/s 
Installing collected packages: cython
Successfully installed cython-0.28.2
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi/PythonAPI$ make
python setup.py build_ext --inplace
running build_ext
cythoning pycocotools/_mask.pyx to pycocotools/_mask.c
building 'pycocotools._mask' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/strong/.local/lib/python2.7/site-packages/numpy/core/include -I../common -I/usr/include/python2.7 -c ../common/maskApi.c -o build/temp.linux-x86_64-2.7/../common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/strong/.local/lib/python2.7/site-packages/numpy/core/include -I../common -I/usr/include/python2.7 -c pycocotools/_mask.c -o build/temp.linux-x86_64-2.7/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pycocotools
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/../common/maskApi.o build/temp.linux-x86_64-2.7/pycocotools/_mask.o -o build/lib.linux-x86_64-2.7/pycocotools/_mask.so
copying build/lib.linux-x86_64-2.7/pycocotools/_mask.so -> pycocotools
rm -rf build
strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi/PythonAPI$

strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi$ mkdir images
strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi$ mkdir annotations

验证 cocodataset / cocoapi 配置环境

strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi/PythonAPI$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycocotools
>>> exit()
strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi/PythonAPI$

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Yongqiang Cheng

梦想不是浮躁,而是沉淀和积累。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值