本文用于记录tensorflow object detection api的安装与使用,主要包括COCO 数据集和更大的The Open Images Dataset数据集,以便将来快速查找。
主要步骤为:
- 下载代码 (https://github.com/tensorflow/models)
使用zip压缩包下载,将“models-master”修改为“models” - 创建并激活conda环境:
conda create -n tfapi python=3.6 tensorflow-gpu=1.12.0
安装tensorflow-gpu(2019/8/24 jupyter测试代码中要求使用1.12.0及以上版本)
可能出现cuda 与 tensorflow的版本匹配问题,可参考tensorflow各个版本的CUDA以及Cudnn版本对应关系进行选择
3. 安装其他依赖包
pillow,lxml,Cython,jupyter,matplotlib,pandas,opencv-python
pip install 依赖包名称
可能出现cuda 与 tensorflow的版本匹配问题,可参考tensorflow各个版本的CUDA以及Cudnn版本对应关系进行选择
此步可能提示版本不匹配问题,根据提示更改即可。
4. 安装protoc
打开网址https://github.com/protocolbuffers/protobuf/releases,根据自己的ubuntu位数,下载想要的包,我这里下载的是protoc-3.14.0-linux-x86_64.zip。