文档详情

pycocotools介绍以及在windows10下的安装过程.docx

发布:2025-05-11约2.38千字共4页下载文档
文本预览下载声明

pycocotools介绍以及在windows10下的安装过程

目录前言pycocotools库的介绍pycocotools库的安装pycocotools安装失败compiler_compat/ld项目场景问题描述原因分析解决方案总结

前言

最近在学习SSD目标检测算法,需要用到pycocotools,所以这里就简单介绍一下pycocotools是什么以及安装教程。

pycocotools库的介绍

pycocotools是什么?即pythonapitoolsofCOCO。

COCO是一个大型的图像数据集,用于目标检测、分割、人的关键点检测、素材分割和标题生成。这个包提供了Matlab、Python和luaapi,这些api有助于在COCO中加载、解析和可视化注释。

请访问/,可以了解关于COCO的更多信息,包括数据、论文和教程。

COCO网站上也描述了注释的确切格式。Matlab和PythonAPI是完整的,LuaAPI只提供基本功能。

除了这个API,请下载COCO图片和注释,以便运行演示和使用API。

两者都可以在项目网站上找到。

-请下载、解压缩并将图像放入:coco/images/-请下载并将注释放在:coco/annotations中/

pycocotools库的安装

环境:windows10x64,python3.7。不需要额外安装vs。

发现网上好多教程都需要额外安装vc++2015buildtools,感觉很麻烦,这里只需要一行命令即可:

pipinstallpycocotools-windows

验证安装是否成功,输入:importpycocotools._maskas_mask

若没有报错,则安装成功。

参考:pycocotools的使用

pycocotools安装失败compiler_compat/ld

项目场景

安装pycocotools出现的问题,python版本是3.6.9,在conda环境下:

gcc-pthread-shared-B/home/hm/anaconda3/envs/lan/compiler_compat-L/home/hm/anaconda3/envs/lan/lib-Wl,-rpath=/home/hm/anaconda3/envs/lan/lib-Wl,--no-as-needed-Wl,--sysroot=/build/temp.linux-x86_64-3.6/../common/maskApi.obuild/temp.linux-x86_64-3.6/pycocotools/_mask.o-obuild/lib.linux-x86_64-3.6/pycocotools/_mask.cpython-36m-x86_64-linux-gnu.so

/home/hm/anaconda3/envs/xxx/compiler_compat/ld:build/temp.linux-x86_64-3.6/../common/maskApi.o:unabletoinitializedecompressstatusforsection.debug_info

/home/hm/anaconda3/envs/xxx/compiler_compat/ld:build/temp.linux-x86_64-3.6/../common/maskApi.o:unabletoinitializedecompressstatusforsection.debug_info

/home/hm/anaconda3/envs/xxx/compiler_compat/ld:build/temp.linux-x86_64-3.6/../common/maskApi.o:unabletoinitializedecompressstatusforsection.debug_info

/home/hm/anaconda3/envs/xxx/compiler_compat/ld:build/temp.linux-x86_64-3.6/../common/maskApi.o:unabletoinitializedecompressstatusforsection.debug_info

build/temp.linux-x86_64-3.6/../common/maskApi.o:filenotre

显示全部
相似文档