Depth study TensorFlow --- I stepped pit (error summary) first post

# Deep learning TensorFlow Object Detection API when training their model - I stepped on a pit (error summary) first published
## May 2019 31 harvest summary
## being given a: object_detection / PROTOS / * proto: No SUCH File. or directoryobject_detection/protos/*.proto: No such file or directory

Solution: own path \ models \ research \ object_detection \ .proto all files under the protos paths need to be compiled into a .py file to run. . The / .proto this part into a specific folder under the file name, each running one folder at the end of the corresponding .py file should appear. No error can be. The number into a specific file name, this will generate a one .py file that lists my own
Protoc object_detection / PROTOS / anchor_generator.proto --python_out =.
Protoc object_detection / PROTOS / bipartite_matcher.proto --python_out =.
object_detection Protoc / PROTOS / box_coder.proto = --python_out.
Protoc object_detection / PROTOS / *. = 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=.
protoc object_detection/protos/train.proto --python_out=.
protoc object_detection/protos/preprocessor.proto --python_out=.
protoc object_detection/protos/preprocessor.proto --python_out=.
protoc object_detection/protos/argmax_matcher.proto --python_out=.

## two error: error introduced ImportError: CAN Not Import name ' xxxx.py '
Here Insert Picture DescriptionHere Insert Picture Description
corresponding to the given file is not generated properly when it belongs to a class of error, because the compiler protoc object_detection / protos / * proto --python_out =: solutions. .py file, the solution is: to find the corresponding file is deleted, the file is recompiled:
for example: ... \ models-master \ research \ object_detection found under protos \ argmax_matcher_pb2.py and grid_anchor_generator_pb2.py delete, compile
protoc object_detection / protos / argmax_matcher. --python_out = proto.
Protoc object_detection / PROTOS / grid_anchor_generator.proto --python_out =., can be solved

##报错三:不能打开某个文件问题python:can’t open file ‘xxxxx.py’:[Error] Nosuch file or directory
Here Insert Picture Description
答:一般是路径问题,比如我的已经
cd C:\Users\Administrator\Desktop\deeplearning\TensorflowAPI_modelmaster\models-master
research\object_detection,当运行python object_detection/builders/model_builder_test.py时就报错说找不到文件,此时解决方案为:python builders/model_builder_test.py

报错四:error: could not create ‘build’: 当文件已存在时,无法创建该文件。

答;原因是git clone下来的代码库中有个BUILD文件,而build和install指令需要新建build文件夹,名字冲突导致问题。
解决方案为首先找到…\models-master\research\slim下的BUILD文件
将该文件移动到其他目录或删除,再运行上述指令,即可成功安装。随后在…\models-master\research\slim目录下
运行
python setup.py build,
然后运行
python setup.py install
解决完毕!

##报错五:ModuleNotFoundError: No module named 'nets’或ImportError: No module named 'object_detection’

Solution: the former is in a directory ... \ models-master \ under research, input conda install nets, after a problem because there is no tensorflow install \ models caused,

Finally the test is successful it!

Here Insert Picture Description

If you help, I find it useful to point a praise it, not too concerned with it, hee hee, thank you very much!

Guess you like

Origin blog.csdn.net/qq_41570307/article/details/91610310