Open cornerfarmer opened 1 year ago
Looks already a lot better!
mapping
should define the mapping between category id and category name[x] Your new example folder automate_semantic_relations
should go into the advanced
folder. Also please remove all unused scripts and rename the main one to main.py
[x] Please use one parameter for the output path. Also the number of cameras can be determined based on the given data, so this should be no extra parameter. The debug parameter test_bboxes
should also not be part of the final code
https://github.com/jplazag/BlenderProc/blob/main/blenderproc/python/writer/SceneGraphWriter.py#L12
[x] In this code there are a lot of lines that are coco specific and are not really necessary here. You can remove the first few ifs. Also I think a lot of the latter code is not necessary. You only need bounding boxed for each category_id right? Then just use the last for loop and loop over all category ids and then use the segmap to calculate the bounding boxes https://github.com/jplazag/BlenderProc/blob/main/blenderproc/python/writer/SceneGraphWriter.py#L89
blenderproc/python/writer/SceneGraphWriter.py
and should be available viabproc.writer.write_scene_graph
. Its first argument should not be a file handle but just the filename, similar to the other writer functionshttps://github.com/jplazag/BlenderProc/blob/e6e901ddac64a02f04ff584c16e22f6490658092/examples/automate_semantic_relations/third_placement.py#L357
blenderproc/python/object/SceneGraphSampler.py
and should be available viabproc.object.sample_scene_graph
.https://github.com/jplazag/BlenderProc/blob/e6e901ddac64a02f04ff584c16e22f6490658092/examples/automate_semantic_relations/third_placement.py#L182
write_annotations
function compute the bboxes by itself using the given segmentation imageshttps://github.com/jplazag/BlenderProc/blob/e6e901ddac64a02f04ff584c16e22f6490658092/examples/automate_semantic_relations/third_placement.py#L702
https://github.com/jplazag/BlenderProc/blob/e6e901ddac64a02f04ff584c16e22f6490658092/examples/automate_semantic_relations/third_placement.py#L74
https://github.com/jplazag/BlenderProc/blob/e6e901ddac64a02f04ff584c16e22f6490658092/examples/automate_semantic_relations/third_placement.py#L98
https://github.com/jplazag/BlenderProc/blob/e6e901ddac64a02f04ff584c16e22f6490658092/examples/automate_semantic_relations/third_placement.py#L399