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

后端 未结 16 2962
时光说笑
时光说笑 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:04

    I have same problem on ubuntu 16.04. Change directory to research and now this file missing problem solved.

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

    If it turns out you you're missing the whole models/research/object_detection/protos sub-tree like me, you can download it separately from https://github.com/tensorflow/models. Not having these files will give the same error, i.e. No such file or directory.

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

    A little python code that may help you compile protoc faster

    import os
    
    #folder where protos are located
    os.chdir('C:\\Users\\ ~ \\models-master\\research\\object_detection\\protos')
    #list protos
    fs=os.listdir()
    
    #back to where your protoc.exe is located
    os.chdir('C:\\Users\\ ~ \\models-master\\research')
    
    for f in fs:
    if f.find(".proto")>-1:
        print(f)
        s='protoc object_detection/protos/'+f+' --python_out=.'
        print(s)
        os.system(s)
    
    0 讨论(0)
  • 2020-12-14 11:08

    Hi everyone this was how I was able to solve this error while learning about object detection using tensorflow:

    STEPS:

    1- To download the Google Protobuf for Windows 10 64 bit system, head onto this link. https://github.com/protocolbuffers/protobuf/releases/tag/v3.4.0 and install “protoc-3.4.0-win32.zip”.(Advice-Don't install protoc-3.6.0)

    2- Download models file from this link. https://github.com/tensorflow/models

    3.Now you need to execute the protobuf compile within the command prompt with help of research directory:

    4-First get inside research directory: cd C:\Users\Ankit\tensorflow\models\research and press Enter//just an example

    5-Then do this step immediate after above step:

    "C:\Users\Ankit\Desktop\Tensorflow\protbuf\bin\protoc.exe" object_detection/protos/*.proto --python_out=. and press Enter(There is space between object and " sign and this is written in one line)

    6-Note: Go to the object_detection/protos folder, and if there are .py files, you’ve successfully completed the compilation of your .proto files

    THANK YOU

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

    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.

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

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