1 ImportError: No module named 'object_detection'
Traceback (most recent call last):
File "object_detection/builders/model_builder_test.py", line 21, in <module>
from object_detection.builders import model_builder
ImportError: No module named 'object_detection'
解决方法:在site-packages添加一个路径文件,如tensorflow_model.pth,必须以.pth为后缀,写上你要加入的模块文件所在的目录名称就是了,如:
H:\pythoncode\Tensorflow\models-master\research
H:\pythoncode\Tensorflow\models-master\research\slim
2 no such file or directory "object_detection/protos/*proto"
解决方法:运行下面代码
protoc object_detection/protos/anchor_generator.proto --python_out=. &&
protoc object_detection/protos/argmax_matcher.proto --python_out=. &&
protoc object_detection/protos/bipartite_matcher.proto --python_out=. &&
protoc object_detection/protos/box_coder.proto --python_out=. &&
protoc object_detection/protos/box_predictor.proto --python_out=. &&
protoc object_detection/protos/eval.proto --python_out=. &&
protoc object_detection/protos/faster_rcnn.proto --python_out=. &&
protoc object_detection/protos/faster_rcnn_box_coder.proto --python_out=. &&
protoc object_detection/protos/graph_rewriter.proto --python_out=. &&
protoc object_detection/protos/grid_anchor_generator.proto --python_out=. &&
protoc object_detection/protos/hyperparams.proto --python_out=. &&
protoc object_detection/protos/image_resizer.proto --python_out=. &&
protoc object_detection/protos/input_reader.proto --python_out=. &&
protoc object_detection/protos/keypoint_box_coder.proto --python_out=. &&
protoc object_detection/protos/losses.proto --python_out=. &&
protoc object_detection/protos/matcher.proto --python_out=. &&
protoc object_detection/protos/mean_stddev_box_coder.proto --python_out=. &&
protoc object_detection/protos/model.proto --python_out=. &&
protoc object_detection/protos/multiscale_anchor_generator.proto --python_out=. &&
protoc object_detection/protos/optimizer.proto --python_out=. &&
protoc object_detection/protos/pipeline.proto --python_out=. &&
protoc object_detection/protos/post_processing.proto --python_out=. &&
protoc object_detection/protos/preprocessor.proto --python_out=. &&
protoc object_detection/protos/region_similarity_calculator.proto --python_out=. &&
protoc object_detection/protos/square_box_coder.proto --python_out=. &&
protoc object_detection/protos/ssd.proto --python_out=. &&
protoc object_detection/protos/ssd_anchor_generator.proto --python_out=. &&
protoc object_detection/protos/string_int_label_map.proto --python_out=.
3 打开jupyter notebook时报错
ValueError: Please install nodejs 5+ and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website.
解决方法:conda
install
nodejs
[1] Win7配置和运行TensorFlow:Object_Detection_API步骤
[2] TensorFlow Object Detection API(Windows下训练)