infinigen
infinigen copied to clipboard
labels: flower, petal, seed, tree
I just ran below command one time, and I could get below images
python -m tools.manage_datagen_jobs --output_folder /data/chcho/dataset_try/infinigen/hello_world --num_scenes 1 --pipeline_configs local_16GB monocular opengl_gt --specific_seed 0 --configs desert simple
flower
petal
seed
tree
Could you please let me know..
- Is it intended?
- If I only want to see trees which are not (flower, petal, seed), how can I do it? I found the tag_lookup dictionary, so I tried to get only bboxes with v =11 ('tree': 11), but the small boxes are still shown.
tag_lookup dictionary
{'landscape.terrain': 1, 'landscape': 2, 'landscape.warped_rocks': 3, 'landscape.voronoi_rocks': 4, 'cave.landscape.terrain': 5, 'cave.landscape.voronoi_rocks': 6, 'cave.landscape.warped_rocks': 7, 'flower.petal': 8, 'flower': 9, 'flower.seed': 10, 'tree': 11, 'flower.petal.tree': 12, 'flower.tree': 13, 'flower.seed.tree': 14, 'blender_rock': 15, 'prickypear_cactus': 16, 'spike': 17, 'cactus.prickypear_cactus': 18, 'cactus.spike': 19, 'cave.landscape.out_of_view.terrain': 20, 'cave.landscape.out_of_view.voronoi_rocks': 21, 'landscape.out_of_view.warped_rocks': 22, 'landscape.out_of_view.terrain': 23, 'cave.landscape.out_of_view.warped_rocks': 24, 'landscape.out_of_view.voronoi_rocks': 25}
This looks like a bug with the 3D bounding boxes and/or the semantic tagging.
I've created PR #50 to investigate / fix this, and also include more instructions for generating segmentation masks and 3d bounding boxes.
The command you ran generates a synthetic dataset of images and annotations. The images are rendered using the InfiniGen renderer, and the annotations are generated by a simulated LiDAR sensor. The images and annotations are saved in the output folder you specified. The images you posted show a tree, a flower, and a petal. The tree is labeled with the tag "tree", the flower is labeled with the tag "flower", and the petal is labeled with the tag "petal". The tag_lookup dictionary you found maps tags to integer values. The value for the tag "tree" is 11, the value for the tag "flower" is 12, and the value for the tag "petal" is 13. You can use the tag_lookup dictionary to filter the annotations for trees. To do this, you can use the following code:
import json with open("annotations.json") as f: annotations = json.load(f) trees = [annotation for annotation in annotations if annotation["v"] == 11]
This code will create a list of annotations for trees. You can then use this list to filter the images. For example, you could use the following code to only show images that contain trees:
for image in images: if any(tree in image["bboxes"] for tree in trees): print(image)
This code will print the images that contain trees. Note that the small boxes you are seeing are likely annotations for flowers or petals. You can use the tag_lookup dictionary to filter these annotations out as well.
@lahavlipson Thanks so much for the PR :)
@Hussain90s
I could understand what you mean, but currently, the codes ("./tools/summarize.py", "./tools/ground_truth/bounding_boxes_3d.py"
) are a little bit differently implemented (as above images showes).
In "./tools/ground_truth/bounding_boxes_3d.py"
, query=flower
will select tags 12, 13, 14 and query=tree
will select tags 11, 12, 13, 14, because "./tools/summarize.py"
makes tag_lookup like this.
'tree': 11, 'flower.petal.tree': 12, 'flower.tree': 13, 'flower.seed.tree': 14
Then natural logic will be "there should be no petals and seeds in tag 11". But the above result showed that all petals and seeds are still shown when the bboxes are filtered with only tag 11. This is weird and this is why I made this issue.
@timegate FYI PR #50 has been merged which fixed some issues with the ground-truth and added lots of docs (See GroundTruthAnnotations.md). To address your original question about getting boxes for just trees which are not flower, petal, or seed, you can subtract the boxes with the "petal" tag from those with the "tree" tag. For example,
python tools/ground_truth/bounding_boxes_3d.py outputs/helloworld 1 --query petal
subtracted from
python tools/ground_truth/bounding_boxes_3d.py outputs/helloworld 1 --query tree
In practice you can implement this by only saving boxes for objects with the tree tag but without the other tags. Just a simple modification to bounding_boxes_3d.py
@lahavlipson Wow, thanks for a lot of fixes. I'll check it out soon. Thanks so much! :)