Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Bounding boxes in scene files #8

Closed
erobic opened this issue Jun 21, 2018 · 4 comments
Closed

Bounding boxes in scene files #8

erobic opened this issue Jun 21, 2018 · 4 comments

Comments

@erobic
Copy link

erobic commented Jun 21, 2018

How do we output bounding boxes for objects? The bound_box property outputs either 1 or -1. It seems like every object occupies the whole scene?

@erobic
Copy link
Author

erobic commented Aug 8, 2018

In case anyone else needs this, here is the updated code which produces bounding boxes:
clevr-dataset-gen with Bounding Boxes

I used the solution presented in:
https://blender.stackexchange.com/questions/7198/save-the-2d-bounding-box-of-an-object-in-rendered-image-to-a-text-file

@erobic
Copy link
Author

erobic commented Nov 20, 2018

The following script generates bounding boxes from CLEVR's annotation file. No need to re-render the scenes again!
https://github.com/larchen/clevr-vqa/blob/master/bounding_box.py

@saharudra
Copy link

@erobic The bounding boxes using this script are not tight.

@erobic
Copy link
Author

erobic commented Aug 9, 2019

@saharudra You may want to play around with formulae inside extract_bounding_boxes function to get tighter boxes, or may be apply postprocessing steps to further narrow down boxes. These are all just estimates, so they may not be tight. As a last resort, you could re-render the scenes too: https://github.com/erobic/clevr-dataset-gen/blob/da2e75c88ca42f0ea17bcc40c7d8654dd46cb7a2/image_generation/render_images.py.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants