基于tensorflow1.13.1 的tensorflow objectdetction Api 安装

github hosts 更新(非必要)

  1. 添加hostssudo gedit /etc/hosts
    在文本末添加以下信息,其中ip地址随时变化,在以下网站中查找http://tool.chinaz.com/
52.74.223.119 github.com 
69.171.235.16 github.global.ssl.fastly.net
  1. 重启网络服务sudo /etc/init.d/networking restart

依赖包安装

sudo apt-get install protobuf-compiler python-pil python-lxml python-tk
pip install  --user Cython contextlib2 pillow lxml

jupyter *matplotlib *这两个模块已经安装。

下载github zip文件

https://github.com/tensorflow/models
解压放在home~文件夹

COCO ApI 安装

cd cocoapi/PythonAPI
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
make
cp -r pycocotools ~/tensorflow/models/research/

Protobuf 编译

cd ~/tensorflow/models/research
# From tensorflow/models/research/
protoc object_detection/protos/*.proto --python_out=.
sudo python setup.py install
cd ~/tensorflow/models/research/slim
sudo python setup.py install

测试

python object_detection/builders/model_builder_test.py

结果如下显示成功:

.............s...
----------------------------------------------------------------------
Ran 17 tests in 0.066s

OK (skipped=1)

你可能感兴趣的:(基于tensorflow1.13.1 的tensorflow objectdetction Api 安装)