Skip to content Skip to sidebar Skip to footer

Protoc Object_detection/protos/*.proto: No Such File Or Directory

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 say

Solution 1:

Solved for Windows, be in 'research' and have the 'protoc' in path, then this will work:

for /f %i in ('dir /b object_detection\protos\*.proto') do protoc object_detection\protos\%i --python_out=.

Good Luck !

Solution 2:

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=.

Solution 3:

I'm going to post this on all these questions I can find so people know. I have to write these directions for myself and others later anyways.

The following does and does not work in a way:

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

The *.proto designating all files does not work for the compiler. If you are using version 3.5, you have to specify each individual file.

So here it what it would look like:

  1. Run cmd
  2. change your directory to the research folder you downloaded(may differ):

    cd /d C:\Users\yourusername\Desktop\TensorFlow\models-master\models-master\research
    
  3. Get the location of the protroc.exe file that you downloaded

    C:\Users\yourusername\Desktop\TensorFlow\protoc-3.5.1-win32\bin\protoc 
  4. Go to the protos folder so you know what files you need to do individually

    C:\Users\yourusername\Desktop\TensorFlow\models-master\models-master\research\object_detection\protos
  5. Now start spamming every individual .proto item in that folder in cmd:

    C:\Users\yourusername\Desktop\TensorFlow\protoc-3.5.1-win32\bin\protoc object_detection/protos/anchor_generator.proto --python_out=.
    C:\Users\yourusername\Desktop\TensorFlow\protoc-3.5.1-win32\bin\protoc object_detection/protos/argmax_matcher.proto --python_out=.
    C:\Users\yourusername\Desktop\TensorFlow\protoc-3.5.1-win32\bin\protoc object_detection/protos/bipartite_matcher.proto --python_out=.
    ....and so onuntil you finish all items in the protos folder
    
  6. Or you could call it a day and get 3.4 and run:

    C:\Users\yourusername\Projects\TensorFlow\protoc-3.5.1-win32\bin\protoc object_detection/protos/*.proto --python_out=.
    

Let me know if I can clarify some more. I try to be very clear so idiots like me can understand.

Solution 4:

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

Solution 5:

I have the same error Object_detection/protos/.proto: No such file or directory.

This is solved when I use Protocol Buffers v3.4.0.

Make Sure you are inside models-master\research and then, use command as:

FullPathToProtoc/protoc-3.4.0-win32/bin/protoc object_detection/protos/*.proto --python_out=.

Post a Comment for "Protoc Object_detection/protos/*.proto: No Such File Or Directory"