LayoutNet icon indicating copy to clipboard operation
LayoutNet copied to clipboard

What is the ground-truth mask used during training?

Open jackaceuser opened this issue 6 years ago • 1 comments

Hi

I saw in the file train_pano_joint.lua that you use somekind of mask to increase the loss at some poisitions. I couldn't find any reference to that neither in the paper or throughout the repository.

Could you please explain what is the mask, how it is generated and why is it needed?

Thanks

    gtMsk = torch.mul(gtMsk, 4)
    gtMsk = gtMsk:cuda()
    gtMsk_w = torch.cmul(loss_d_1, gtMsk)
    loss_d_1 = torch.add(gtMsk_w, loss_d_1)
    gt2Msk = torch.mul(gt2Msk, 4)
    gt2Msk = gt2Msk:cuda()
    gt2Msk_w = torch.cmul(loss_d_2, gt2Msk)
    loss_d_2 = torch.add(gt2Msk_w, loss_d_2)

jackaceuser avatar Aug 15 '18 12:08 jackaceuser

@jackaceuser You can refer to the ground-truth masking in Section 3.3, last sentence in the third paragraph of the paper(http://openaccess.thecvf.com/content_cvpr_2018/CameraReady/0409.pdf). Since our ground-truth layout edge and corner map contains >95% zero values even after gaussian smoothing, to ease the learning process we re-weight the back propagated gradients of the background pixels by multiplying with 0.2.

zouchuhang avatar Aug 15 '18 16:08 zouchuhang