Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 512
David Pickup Avatar asked Jul 07 '17 13:07

David Pickup


1 Answers

Missed a step in the installation instructions, where the following needs to be run from models/research:

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

You need to rerun the below command after that:

pip install . 
like image 191
David Pickup Avatar answered Nov 09 '22 07:11

David Pickup