Blenderproc: FileNotFoundError output/bop_data/train_pbr/000000/scene_gt.json

Created on 28 Jan 2021  路  4Comments  路  Source: DLR-RM/BlenderProc

Hi everyone,

I found this problem by running the basic

python run.py examples/basic_object_pose/config.yaml examples/basic_object_pose/obj_000004.ply examples/basic_object_pose/output

using a python virtual environment

using master branch and v1.8.2 branch
Python: 3.6
Blender: 2.91
Ubuntu 20

FileNotFoundError: [Errno 2] No such file or directory: '/BlenderProc/examples/basic_object_pose/output/bop_data/train_pbr/000000/scene_gt.json'

Most helpful comment

Hi @luigifaticoso ,

First of all, I can execute the basic_object_pose example without the bop_toolkit dependency. We have removed it already some time ago from the BopWriter, maybe you were running an old version?

Second, I think your error stems from the append_to_existing_output parameter in the BopWriter. It is most likely that during your first run the scene_gt.json was not created because it crashed or you terminated it. Then you tried to run the script again with the same output folder and it tried to append the results to scene_gt.json which did not exist, thus the error.

Try to update your repo and run the example with another output directory again, like:

python run.py examples/basic_object_pose/config.yaml examples/basic_object_pose/obj_000004.ply examples/basic_object_pose/output2

All 4 comments

58

Talking about the basic_object_pose, I have added an extra argument taking the bop_toolkit as It can't execute the BopWriter without the toolkit. Added in the Initializer as:

{
      "module": "main.Initializer",
      "config":{
        "global": {
          "output_dir": "<args:1>",
          "sys_paths": ["<args:2>"]
        }
      }
    },

and after cloning the bop toolkit and placing it in the main folder, run the program as:

python run.py examples/basic_object_pose/config.yaml examples/basic_object_pose/obj_000004.ply examples/basic_object_pose/output bop_toolkit/

Still giving me the same error, am I missing something?

Hi @luigifaticoso ,

First of all, I can execute the basic_object_pose example without the bop_toolkit dependency. We have removed it already some time ago from the BopWriter, maybe you were running an old version?

Second, I think your error stems from the append_to_existing_output parameter in the BopWriter. It is most likely that during your first run the scene_gt.json was not created because it crashed or you terminated it. Then you tried to run the script again with the same output folder and it tried to append the results to scene_gt.json which did not exist, thus the error.

Try to update your repo and run the example with another output directory again, like:

python run.py examples/basic_object_pose/config.yaml examples/basic_object_pose/obj_000004.ply examples/basic_object_pose/output2

@MartinSmeyer Thank you very much for your answer!

By deleting the output directory It was able to use the bop writer

Was this page helpful?
0 / 5 - 0 ratings