justanhduc / graphx-conv

Official implementation of GraphX-Convolution
https://justanhduc.github.io/2019/09/29/GraphX-Convolution.html
MIT License
62 stars 17 forks source link

Some question about chamfer distance calculation #13

Closed Excuse-mimimi closed 3 years ago

Excuse-mimimi commented 3 years ago

In network.py line 21 ,the function normalized_chamfer_loss(), when the reduce == 'mean', it return loss*3000. ,why multiply 3000?

return loss if reduce == 'sum' else loss * 3000.

Then, ithe chamfer distance loss calculation in the test.py line 57 confuse me , because the normalized_chamfer_loss(). Did it means the chamfer distance multiply 1000? I know I have made some mistakes.Please help me.

loss = sum([normalized_chamfer_loss(pred[None], gt[None]) for pred, gt in zip(pred_pc, gt_pc)]) / (
                            3. * len(gt_pc))

Look forward to your reply.

justanhduc commented 3 years ago

Hi @Excuse-mimimi. This is some heuristic scaling that I inherit from Pixel2Mesh. The data provided by Pixel2Mesh is heuristically scaled to a certain size, and the multiplication is to avoid having too many zeros in the loss. This is mentioned in the paper (probably the pixel2mesh paper as well).