hi, i need help please, i want to generate a dataset from several config files, how to do that automatically
example :
import yaml
import os
new_list = []
for root, dirs, files in os.walk("output"):
print (new_list)
thank you
@Lotfi-MERAD One thing that you can do is to run the BlenderProc pipeline individually for each of the config files instead of concatenating them. Maybe the code below works for your use case (if not just let me know).
Don't forget to change the variables DATASET_PATH and OUTPUT_PATH. Also, the arguments for the run.py might be different depending on which BlenderProc example you want to run. Don't forget to change those as well.
import yaml
import os
import subprocess
DATASET_PATH = "DATASET_PATH"
OUTPUT_PATH = "OUTPUT_PATH"
for root, dirs, files in os.walk("output"):
for file_ in files:
if file_.endswith(".yaml"):
# Assuming your present working directory is BlenderProc repo
subprocess.call(["python", "run.py", file_, DATASET_PATH, OUTPUT_PATH], shell=False)
Did this help you? If so please close the issue if not, tell us.
Thank you @moizsajid
Most helpful comment
@Lotfi-MERAD One thing that you can do is to run the BlenderProc pipeline individually for each of the config files instead of concatenating them. Maybe the code below works for your use case (if not just let me know).
Don't forget to change the variables
DATASET_PATHandOUTPUT_PATH. Also, the arguments for therun.pymight be different depending on which BlenderProc example you want to run. Don't forget to change those as well.