Object Detection API error: "ImportError: cannot import name anchor_generator_pb2"

Viewed 9889

I'm trying to get Tensorflow's new Object Detection API working. I've followed the installation instructions, but when running the command

python object_detection/builders/model_builder_test.py

I get the following error

from object_detection.protos import anchor_generator_pb2
ImportError: cannot import name anchor_generator_pb2

I've looked inside object_detection.protos, and there doesn't seem to be anything named anchor_generator_pb2. Has anyone else managed to get this command to run, or solved this issue?

2 Answers

This worked for me Run it from your models/research

python setup.py
protoc -I=./ --python_out=./ ./object_detection/protos/*.proto
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
Related