protoc object_detection/protos/*.proto: No such fi

2020-02-08 06:07发布

I am following the example found here. But whenever I enter the command "C:/Program Files/protoc/bin/protoc" object_detection/protos/.proto --python_out=. I get an error that says object_detection/protos/.proto: No such file or directory. I can't create a directory called *.proto. So I'm missing some fundamental information on how to do this. Since I can't find anyone else complaining about this issue it must be pretty simple. I am using a windows OS.

16条回答
放我归山
2楼-- · 2020-02-08 06:49

Be sure to change the directory to "models\research\" and try to do the steps from the tutorial using the protoc version 3.4.0, just like the tutorial. I only worked for me using 3.4.0.

my cmd line that worked:

C:\Users\...\protoc-3.4.0-win32\bin\protoc object_detection/protos/*.proto --python_out=.
查看更多
Summer. ? 凉城
3楼-- · 2020-02-08 06:50

This is what I did and I could compile with with 3.4 and 3.6 version on Windows 7 Professional

C:\tensorflow1\models\research>for /F %i in 
('dir /b 
.\object_detection\protos\*
.proto') do ( c:\tensorflow1\models\research\bin/protoc 
.\object_detection\protos\%i --python_out=.)
查看更多
smile是对你的礼貌
4楼-- · 2020-02-08 06:51

I am using protoc-3.6.1-win32.zip.. On windows

Created a batch file which will compile all the .proto files.

for %%v in object_detection\protos*.proto do ( D:\bin\protoc %%v --python_out=. )

Run this batch file from models\research folder. Do change the protoc path. Hope this helps others and we dont need to install older versions of protoc. Thanks

查看更多
时光不老,我们不散
5楼-- · 2020-02-08 06:52

change the directory to models or model master of tensorflow then you have to compile the .proto files of protobuff using the following commands running one by one

protoc --python_out=. .\object_detection\protos\anchor_generator.proto 
protoc --python_out=. .\object_detection\protos\argmax_matcher.proto  
protoc --python_out=. .\object_detection\protos\bipartite_matcher.proto 
protoc --python_out=. .\object_detection\protos\box_coder.proto 
protoc --python_out=. .\object_detection\protos\box_predictor.proto 
protoc --python_out=. .\object_detection\protos\eval.proto 
protoc --python_out=. .\object_detection\protos\faster_rcnn.proto 
protoc --python_out=. .\object_detection\protos\faster_rcnn_box_coder.proto 
protoc --python_out=. .\object_detection\protos\grid_anchor_generator.proto 
protoc --python_out=. .\object_detection\protos\hyperparams.proto 
protoc --python_out=. .\object_detection\protos\image_resizer.proto 
protoc --python_out=. .\object_detection\protos\input_reader.proto 
protoc --python_out=. .\object_detection\protos\losses.proto 
protoc --python_out=. .\object_detection\protos\matcher.proto 
protoc --python_out=. .\object_detection\protos\mean_stddev_box_coder.proto 
protoc --python_out=. .\object_detection\protos\model.proto 
protoc --python_out=. .\object_detection\protos\optimizer.proto 
protoc --python_out=. .\object_detection\protos\pipeline.proto 
protoc --python_out=. .\object_detection\protos\post_processing.proto 
protoc --python_out=. .\object_detection\protos\preprocessor.proto 
protoc --python_out=. .\object_detection\protos\region_similarity_calculator.proto 
protoc --python_out=. .\object_detection\protos\square_box_coder.proto 
protoc --python_out=. .\object_detection\protos\ssd.proto 
protoc --python_out=. .\object_detection\protos\ssd_anchor_generator.proto 
protoc --python_out=. .\object_detection\protos\string_int_label_map.proto 
protoc --python_out=. .\object_detection\protos\train.proto 
protoc --python_out=. .\object_detection\protos\keypoint_box_coder.proto 
protoc --python_out=. .\object_detection\protos\multiscale_anchor_generator.proto
protoc --python_out=. .\object_detection\protos\graph_rewriter.proto
查看更多
甜甜的少女心
6楼-- · 2020-02-08 06:53

I faced the issue of missing output directive. The solution that worked out for me was that I tried the full file names as *.proto was not working.

查看更多
劫难
7楼-- · 2020-02-08 06:53

Go to the protoc releases page and download the protoc-3.4.0-win32.zip, extract it, and you will find protoc.exe in the bin directory. then it is needed to be added path to the system path.

Move this to models/research folder tensorflow model project

Next, you can use the protoc command.

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

查看更多
登录 后发表回答