protoc object_detection/protos/*.proto: No such file or directory

后端 未结 16 2963
时光说笑
时光说笑 2020-12-14 10:47

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 e

相关标签:
16条回答
  • 2020-12-14 11:23

    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

    0 讨论(0)
  • 2020-12-14 11:24

    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 on until 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.

    0 讨论(0)
  • 2020-12-14 11:24

    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
    
    0 讨论(0)
  • 2020-12-14 11:26

    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=.
    
    0 讨论(0)
提交回复
热议问题