安装object detection API环境配置
1,下面记录object detection api工具的安装过程,安装环境为win10
准备工作:
(1)预先安装tensorflow-gpu-1.9.0, python3.5
(2)下载TensorFlow/model文件夹
, 新版本存在与GPU的兼容问题,所以不要更新版本
(3)在https://github.com/protocolbuffers/protobuf/releases 下载 protoc-3.4.0-win32.zip,安装protoc,设置环境变量。
(4)在research文件下执行命令:
protoc.exe object_detection/protos/*.proto --python_out=.
(5)
设置环境变量,
将models-master;models-master/research;models-master\research\slim添加到环境变量中
如果出现Import erro : no models named '*', 则尝试将object detection也添加到环境变量中,
在models-master/research目录寻找setup.py文档。若存在,则运行python setup.py install
(6)需要安装Cython, pycocotools,pillow jupyter matplotlib lxml
Cython, 可以通过pip install Cython 直接安装
pycocotools需要进行编译, 推荐先安装GIT, 然后安装别人编译好的版本
install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
(7)运行测试命令:python object_detection/builders/model_builder_test.py
确保不报任何错误, 如果报错,则执行第四步。
(8)运行官方demo, 如果没有任何错误, 可以显示图片, 则API安装完成。
(9)如果出现 ImportError: No module named 'object_detection' 这种问题
在python的安装目录 :\Lib\site-packages 这个文件夹目录下,写一个.pth文件,内容为两条路径
-----------------------------------------------------------------------------------------------------
18.10.19更新Linux下安装object detection API 过程
其中protoc在系统中已经安装了, 所以不需要再安装,需要安装Cython, pycocotools,pillow jupyter matplotlib lxml,,、、
然后设置环境变量:export PYTHONPATH=/xx/xx/models/research/build/lib:/xx/xx/models/research/slim/build/lib:${PYTHONPATH}
运行测试命令:python object_detection/builders/model_builder_test.py
确保不报任何错误, 如果报错,则是环境变量没设置好。
安装coco API
在 https://github.com/cocodataset/cocoapi 中下载源码, 然后进入到PythonAPI目录下,执行make指令安装。
Linux 后台运行程序指令: nohup python object_detection/train.py --logtostderr --train_dir=object_detection/ssd_mobile/models/train --pipeline_config_path=object_detection/ssd_mobile/models/ssd_mobilenet_v1_pascal.config >> models_master.log 2>&1 &
暂时需要注意这些, 如果出现什么bug,试情况修改。
阅读更多- 安装Google Object Detection API
- Ubuntu 16.04下安装TensorFlow Object Detection API(对象检测API)
- Windows下安装TensorFlow Object Detection API,训练自己的数据集
- tensorflow Object Detection API 配置
- TF ObjectDetectionAPI的安装、验证测试(2)
- TensorFlow object detection API应用--配置
- Tensorflow Object Detection API 安装
- tensorflow object detection API安装
- tensorflow object detection API安装实例
- Windows下安装TensorFlow Object Detection API,训练自己的数据集
- TensorFlow:Object_Detection_API在Windows10上的配置
- 安装Google Object Detection API
- ubuntu16.04 TensorFlow object Detection API安装
- TF ObjectDetectionAPI的安装、验证测试
- tensorflow object detection API安装
- object detection api配置
- TensorFlow:Object_Detection_API在Windows10上的配置
- TF ObjectDetectionAPI的安装、验证测试(3)
- Tensorflow object detection API 搭建属于自己的物体识别模型(1)——环境搭建与测试
- TensorFlow Object Detection API 在Windows10和Ubuntu上的配置