usage: main.py synth [-h] [-f [{tomato,bell_pepper,cucumber,strawberry} ...]] [-m {verification,coco}] [--debug] [--pos POS] [--no NO] [--out OUT]
options:
-h, --help show this help message and exit
-f [{tomato,bell_pepper,cucumber,strawberry} ...]
-m {verification,coco}
--debug launches blenderproc debug environment
--no NO rendering quantity
--out OUT name of output folder
camera:
--pos POS camera position quantity per render
- Multiple fruits can be chosen
- Same fruit can be chosen multiple times ("-f tomato tomato" is valid)
- List will be cycled until amount of renderings specified is done
- Only one mode supported at a time
- verification produces .hdf5 images with a .yaml with validation data
- coco produces .jpg images with a .json with coco annotations data
- starts the data-synthesizer in debug mode, launching in blender
- all other arguments are ignored
- arguments for testing in debug have to be set in the debug script, which opens automatically
- Sets the amount of Configurations that are to be generated
- Defaults to 1
- Sets the Output folder for the data
- Default is /data_synthesizer/output/verification/ and /data_synthesizer/output/coco/ respectively
- Without this option set, existing data will never be overwritten/appended
- With this option set, new data will be appended to existing data
- Sets the amount of camera positions per configuration/rendering
- Defaults to 1
- Positions will be evenly placed in a half circle around the plant
python main.py -f tomato bell_pepper -m coco --no 2
The output folder will be /data_synthesizer/coco_xxx/, with xxx being the lowest unused number. The 2 .jpg images will be placed into /images/ in this folder, they show one plant with tomatos, one with bell peppers. The COCO-annotations will be saved in the coco_annotations.json in the coco folder.
python main.py -f tomato bell_pepper -m coco
This is valid code, but it will only produce a single image with a tomato
python main.py -f tomato bell_pepper -m verification --no 10 --pos 5
This will output to the default folder, as described above, but replacing coco with verification. Every 5 images in a row are of the same fruit type and show the same plant. In total, this will produce 50 images and one .yaml file.
python main.py --debug
Opens blender with the data-synthesizer script open in the blender code editor. The following code can be found at the bottom of the file:
if args.debug:
fruit: str = "tomato"
pos: int = 5
tb = Testbench()
tb.generate(fruit=fruit, pos=pos)The variables "fruit" and "pos" can be changed to debug different settings. To run the script in blender, click on the button "Run Blenderproc", at the top of the code editor.
python main.py preprocess path/to/dir
Preprocess the training data
python main.py train
start training
python main.py benchmark path/to/valitaion_data.yaml
benchmark pose estimator