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:54

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

查看更多
我想做一个坏孩纸
3楼-- · 2020-02-08 06:55

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.

查看更多
趁早两清
4楼-- · 2020-02-08 07:00

The .proto files should be in tensorflow-models/research/object_detection/protos/.

So you should first

cd C:\path\to\tensorflow-models\research 

as per the installation instructions. The above is an imaginary path and uses the Windows path structure. You should replace it with the actual path on your computer. And when you're in that directory, you can run your command:

C:\Program Files\protoc-<version>\bin\protoc object_detection/protos/.proto --python_out=.

Again, the above is just a general example. You will have to replace <version> with your protoc version.

Do NOT copy-paste the above, as it will not work directly on your machine. Instead, you must find the path of the protoc binary on your computer and use that one as the command before object_detection/protos/.proto --python_out=.

查看更多
做个烂人
5楼-- · 2020-02-08 07:01

well in my case broke the head longLong time ... the problem was in protoc version 3.5... it does not accepts this arguments on WINDOWS ... it will work completely fine if u will download 3.4.0 version that can be used with your exactly arguments:! protoc object_detection/protos/*.proto --python_out=.

查看更多
登录 后发表回答