yinyunie / BlenderProc-3DFront

Support BlenderProc2 with multi-GPU batch rendering and 3D visualization for 3D-Front
GNU General Public License v3.0
95 stars 7 forks source link

[FEATURE]: Render 3d bouding box & Sample camera pose near wall #3

Closed ZiAngGu1 closed 1 year ago

ZiAngGu1 commented 1 year ago

Hi Yinyu,

Thank you so much for sharing this project! Without the codebase, I literally have no idea How I suppose to do all those renderings. I just want to know that

  1. If it is possible to get the projection of 3D bbox in the rendered images instead of in 3d space? I notice that in the visualization/front3d/vis_front3d.py we do have the 3d bbox, but, if I am understanding this correctly, this is for the 3d visualization instead of 2d. Could we get the 3d bbox for each image?

  2. If it is possible to sample camera poses near the edge or boundary of the room? ( I want the rendered images to look at the center of the room from the wall) I noticed that in the front_3d_with_improved_mat/render_dataset_improved_mat.py we get the camera poses this way: location = point_sampler.sample_by_floor_id(height, floor_id=floor_id) Is it possible to change this line of code?

Thank you again for your time and contribution to the community! Sincerely, ZiAng

yinyunie commented 1 year ago

Hi,

I am pleased to know it is helpful.

For the first point, I added the 2D projection for 3D boxes. Please feel free to check the updated code. For the second one, I am sorry I cannot change that because this codebase is for general use. I believe it would be easy to customize yours by fixing the horizontal location of cameras on floor corners and optimizing the camera rotation with my code. It is a special case of this camera pose sampling version. Hope it helps.

Best, Yinyu

image

ZiAngGu1 commented 1 year ago

Thanks for the reply! Have a nice day!