cannot import name 'center_net_pb2'
See original GitHub issueI followed the tutorial exactly and did everything exactly as it was written. I started all over again and twice the same mistake:
`(tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config 2020-06-23 11:00:32.995237: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_100.dll’; dlerror: cudart64_100.dll not found 2020-06-23 11:00:33.002556: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File “train.py”, line 53, in <module> from object_detection.builders import model_builder File “C:\tensorflow1\models\research\object_detection\builders\model_builder.py”, line 38, in <module> from object_detection.protos import model_pb2 File “C:\tensorflow1\models\research\object_detection\protos\model_pb2.py”, line 15, in <module> from object_detection.protos import center_net_pb2 as object__detection_dot_protos_dot_center__net__pb2 ImportError: cannot import name ‘center_net_pb2’
(tensorflow1) C:\tensorflow1\models\research\object_detection>`
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
Top GitHub Comments
i have the same problem. anyone can fix it.
Ok go to the models/research directory.
Enter the following:
protoc --python_out=. ./object_detection/protos/anchor_generator.proto ./object_detection/protos/argmax_matcher.proto ./object_detection/protos/bipartite_matcher.proto ./object_detection/protos/box_coder.proto ./object_detection/protos/box_predictor.proto ./object_detection/protos/eval.proto ./object_detection/protos/faster_rcnn.proto ./object_detection/protos/faster_rcnn_box_coder.proto ./object_detection/protos/grid_anchor_generator.proto ./object_detection/protos/hyperparams.proto ./object_detection/protos/image_resizer.proto ./object_detection/protos/input_reader.proto ./object_detection/protos/losses.proto ./object_detection/protos/matcher.proto ./object_detection/protos/mean_stddev_box_coder.proto ./object_detection/protos/model.proto ./object_detection/protos/optimizer.proto ./object_detection/protos/pipeline.proto ./object_detection/protos/post_processing.proto ./object_detection/protos/preprocessor.proto ./object_detection/protos/region_similarity_calculator.proto ./object_detection/protos/square_box_coder.proto ./object_detection/protos/ssd.proto ./object_detection/protos/ssd_anchor_generator.proto ./object_detection/protos/string_int_label_map.proto ./object_detection/protos/train.proto ./object_detection/protos/keypoint_box_coder.proto ./object_detection/protos/multiscale_anchor_generator.proto ./object_detection/protos/graph_rewriter.proto ./object_detection/protos/calibration.proto ./object_detection/protos/flexible_grid_anchor_generator.proto ./object_detection/protos/center_net.proto
The only result you should get back is a warning, saying:object_detection/protos/input_reader.proto: warning: Import object_detection/protos/image_resizer.proto but not used.
Then, in that same directory, run:
python setup.py build
and then
python setup.py install
Re-run all commands after this point, including xml to csv and generate_tfrecord.py
Let me know if that helps