aniqueakhtar / PointCloudUpsampling

MIT License
36 stars 8 forks source link

Loss function #4

Closed schenock closed 2 years ago

schenock commented 2 years ago

Hi,

What is the purpose of the function get_target_by_sp_tensor ? I am curious why do you use BCE loss in this case? 7

Also, about the LIDAR upsampling results: it seems that your model is introducing cube-like patches but around existing points, it does not complete the LIDAR layers, as opposed to your meshes, where it clearly does a good job. Any idea why?

image

Thank you

aniqueakhtar commented 2 years ago

What is the purpose of the function get_target_by_sp_tensor ? I am curious why do you use BCE loss in this case? 7

When you Upsample using transpose convolution generating new coordinates when the generate_new_coords=True, there would be new voxels/coordinates generated around the existing occupied voxels. You would need to prune out the false voxels and keep the ones in the ground truth. get_target_by_sp_tensor function basically tells you which of the newly generated voxels are present in the ground truth. BCE loss is used because we are performing a voxel classification here.

Also, about the LIDAR upsampling results: it seems that your model is introducing cube-like patches but around existing points, it does not complete the LIDAR layers, as opposed to your meshes, where it clearly does a good job. Any idea why?

So as explained previously, the kernel size plays a role in generating newer coordinates. For a kernel size (last_kernel_size) of 5 in the convolution layer generating new coordinates, the new coordinates would only be generated around the already occupied voxels. So the cubes you see are due to the voxelization of the original point cloud and the kernel size you are using in your network. If you play with the k variable when voxelizing the input point cloud and the last_kernel_size, you would get better results. However, getting better results on sparse point clouds does get tricky because of the difference in sparsity.