zouchuhang / LayoutNet

Torch implementation of our CVPR 18 paper: "LayoutNet: Reconstructing the 3D Room Layout from a Single RGB Image"
http://openaccess.thecvf.com/content_cvpr_2018/papers/Zou_LayoutNet_Reconstructing_the_CVPR_2018_paper.pdf
MIT License
417 stars 93 forks source link

Would you mind share optimization code for 6 walls #8

Closed robotshanxi closed 6 years ago

robotshanxi commented 6 years ago

@zouchuhang For 4 walls case function sampleEijOpt optimize 3 variables (camera center and scale probably), I assume there would be more variables for 6 walls. Thanks.

zouchuhang commented 6 years ago

@robotshanxi They are now available in /matlab folder, named "pano_line_solver_6.m" and "sampleEijOpt_6.m"

robotshanxi commented 6 years ago

Thank you for the update. In line 11 and 20, x_ini are not initialized, can you explain how you set those variables?

zouchuhang commented 6 years ago

@robotshanxi The initialization is to ease the optimization, typically to set the initial camera position at the point where all walls can be observed in the "L"-shape room. Line 11 and 20 are cases not appeared in the aligned data (After panorama alignment, if you scan from the most left part of the panorama, the first and the last wall-wall boundaries are always convex). You can refer to the cited paper http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.81.195&rep=rep1&type=pdf for related details.

robotshanxi commented 6 years ago

Thank you for the prompt answer.

robotshanxi commented 6 years ago

I tested the panorama shown in the first page of the paper (panocontext training dataset #75,82), the network output 8 peaks instead 12. Is there any parameter I can set in the network to output corners for 6 walls?

zouchuhang commented 6 years ago

@robotshanxi There'e no parameter need to be changed in the network. We observe that training with box-shape layout ground truth can also produce good corner detections for more than 4 walls. Alternatively you need to train on panorama with labeled ground truth for more than 4 walls.