我使用https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md正确安装了对象检测API,并通过运行model_builder_test.py进行检查 . 这给了我一个OK结果 . 然后我继续使用以下命令在我的数据集上运行train.py
python train.py --logtostderr --pipeline_config_path = pipeline.config --train_dir = train_file
我收到错误ImportError:无法导入名称'preprocessor_pb2'这个特定的preprocessor_pb2.py存在于它正在寻找的路径中,即
C:\用户\ SP-TestMc \ Anaconda3 \ ENVS \ tensorflow \型号主\型号主\研发\ object_detection \ PROTOS
那么这个错误的原因是什么?
1 回答
见https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md#protobuf-compilation . 听起来你需要在使用Python脚本之前编译protos .