tensorflow.python.framework.errors_impl.NotFoundError while generating TFRecord files Object Detection API -


i trying generate tfrecord files pascal voc format dataset. following this guide , used this instructions create pascal_train.record and pascal_val.record.

i have prepared annotations, images , image sets in imagesets -> main. generated label map in pascal_label_map.pbtxt.

now, when run following command tf_worspace/models:

python3 object_detection/create_pascal_tf_record.py \ --label_map_path=object_detection/data/pascal_label_map.pbtxt \ --data_dir=vocdevkit --year=voc2012 --set=train \ --output_path=pascal_train.record 

i get:

file "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status pywrap_tensorflow.tf_getcode(status)) tensorflow.python.framework.errors_impl.notfounderror: vocdevkit/voc2012/imagesets/main/marlboro_red_train.txt

my project structure follow:

  • tf_workspace
    • models (tf staff here...)
      • object_detection
        • vocdevkit
          • voc2012
            • annotations
            • imagesets
              • action (my annotations here)
              • layout
              • main (my imagesets here)
                • marlboro_red_train.txt
                • marlboro_red_val.txt
                • marlboro_red_trainval.txt
                • ...
              • segmentation
            • jpegimages (my images here)
            • segmentationclass
            • segmentationobject

the file script cannot find reasons exist in directory, have checked few times.

be sure changed following line in create_pascal_tf_record.py:

examples_path = os.path.join(data_dir, year, 'imagesets', 'main',                                  'aeroplane_' + flags.set + '.txt') 

to:

examples_path = os.path.join(data_dir, year, 'imagesets', 'main',                                  'marlboro_red_' + flags.set + '.txt') 

so going on? can explain why gives such error, please! in advance hint!

ok, reason because of wrong parameters. this guide says:

make sure vocdevkit inside models/object_detection can go ahead , generate tfrecords.

so had change line:

--data_dir=vocdevkit 

to:

--data_dir=object_detection/vocdevkit/ 

Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -