Google tensorflow object detection API install

官方连接:https://github.com/tensorflow/models/blob/master/object_detection/g3doc/installation.md

Installation

Dependencies

Tensorflow Object Detection API depends on the following libraries:

· Protobuf 2.6

· Pillow 1.0

· lxml

· tf Slim (which is included in the "tensorflow/models" checkout)!!!!!!  每次都会把Slim忘了  就会报错找不到

具体安装过程在:https://github.com/tensorflow/models/tree/master/slim 

· Jupyter notebook

· Matplotlib

· Tensorflow

For detailed steps to install Tensorflow, follow theTensorflow installation instructions. A typically user can install Tensorflow using one of the following commands:

# For CPU

pip install tensorflow# For GPU

pip install tensorflow-gpu

The remaining libraries can be installed on Ubuntu 16.04 using via apt-get:

sudo apt-get install protobuf-compiler python-pil python-lxml

sudo pip install jupyter

sudo pip install matplotlib

Alternatively, users can install dependencies using pip:

sudo pip install pillow

sudo pip install lxml

sudo pip install jupyter

sudo pip install matplotlib

Protobuf Compilation

The Tensorflow Object Detection API uses Protobufs to configure model and training parameters. Before the framework can be used, the Protobuf libraries must be compiled. This should be done by running the following command from the tensorflow/models directory:

# From tensorflow/models/

protoc object_detection/protos/*.proto --python_out=.

Add Libraries to PYTHONPATH

When running locally, the tensorflow/models/ and slim directories should be appended to PYTHONPATH. This can be done by running the following from tensorflow/models/:

# From tensorflow/models/

export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim   

Note: This command needs to run from every new terminal you start. If you wish to avoid running this manually, you can add it as a new line to the end of your ~/.bashrc file.

每次打开一个terminal都要重新添环境变量 比较麻烦 就直接写入/etc/profile 文件中

Testing the Installation

You can test that you have correctly installed the Tensorflow Object Detection
API by running the following command:

python object_detection/builders/model_builder_test.py

运行就是这个样子:

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值