1 开发环境搭建
1.1 Dependencies
# For CPU
pip install tensorflow==1.10
# For GPU
pip install tensorflow-gpu==1.10
pip install --user Cython
pip install --user contextlib2
pip install --user pillow
pip install --user lxml
pip install --user jupyter
pip install --user matplotlib
1.2 COCO API installation
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
make
cp -r pycocotools <path_to_tensorflow>/models/research/
1.3 Protobuf Compilation
# From tensorflow/models/research/
protoc object_detection/protos/*.proto --python_out=.
1.4 Add Libraries to PYTHONPATH
# From tensorflow/models/research/
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
1.5 Testing the Installation
python object_detection/builders/model_builder_test.py
Error
ValueError: Tensor conversion requested dtype string for Tensor with dtype float32: 'Tensor("arg0:0", shape=(), dtype=float32, device=/device:CPU:0)'