eric-yyjau/pytorch-superpoint

Which mask_3d_flattened is used?

DaddyWesker opened this issue · 2 comments

Hello, i can't think of better name for this, but oh well. Here is the case:

File Train_model_heatmap.py. Line 301. Here you're using mask_3d_flattened as mask_desc. THough, if bool value if_warp == True, then you're replacing value of this mask_3d_flattened (which was defined previously as mask_3D_flattened = self.getMasks(mask_2D, self.cell_size, device=self.device) ) with new value, line 278, mask_3D_flattened = self.getMasks(mask_warp_2D, self.cell_size, device=self.device). So, in the further calculations, you're using warped mask instead of normal one. Is that algorithmically right?

Thanks in advance fr explanations.

Hi @DaddyWesker ,

I'm not sure if I understand your question correctly.

Are you asking why I'm overwriting the value of mask_3D_flattened when if_warp == True?

When if_warp == True, mask_3D_flattened is overwriiten when calculating the warped descriptor loss.
mask_desc is only used to calculate that loss.

mask_desc = mask_3D_flattened.unsqueeze(1)

If if_warp == False or lambda_loss <= 0, we won't calculate descriptor loss.

loss_desc, positive_dist, negative_dist = ze, ze, ze

Hope this helps.
Best,

Alright. Thanks for the explanation.