NeuTex icon indicating copy to clipboard operation
NeuTex copied to clipboard

About chamfer loss and initialize F_uv

Open cqf7419 opened this issue 3 years ago • 3 comments

hello,this is a great work and thanks for your sharing. when I run the demo(dtu.sh) you provided, I'm a bit confused and I need your help. In your paper "NeuTex", you mentioned that you used Chamfer loss during Fuv-1 initialization. However, loss_chamfer_weight=-1 means that it has not been used. If I want to try it, When do I need to set loss_chamfer_weight=1 so that I can get the result similar to Figure 3 in paper ? And how do I understand this word in 4.2Training detail,initialize Fuv-1 with a point cloud from COLMAP.

zeros = torch.zeros(camera_position.shape[0], dtype=torch.long, device=camera_position.device)
geometry_embedding = self.net_geometry_embedding(zeros) 
...
point_array_2d, points_3d = self.net_atlasnet(geometry_embedding)
...

In the code, does the geometric latent code represent the point cloud here ?

cqf7419 avatar Apr 18 '23 03:04 cqf7419

The code for the point cloud initialization and Chamfer loss is not released in this repo, as this trick is not really crucial as shown in figure 3, and it actually makes the pipeline less general and more complicated.

fbxiang avatar Apr 18 '23 03:04 fbxiang

The code for the point cloud initialization and Chamfer loss is not released in this repo, as this trick is not really crucial as shown in figure 3, and it actually makes the pipeline less general and more complicated.

all right. Now,I'm confused about the necessity of this code

if compute_atlasnet:
            point_array_2d, points_3d = self.net_atlasnet(geometry_embedding)

            output["points"] = points_3d.view(
                points_3d.shape[0], -1, points_3d.shape[-1]
            ).permute(
                0, 2, 1
            )  # (N, 3, total_points)

            (
                output["points_2d_inverse"],
                output["weights_inverse"],
                output["weights_inverse_logits"],
            ) = self.net_inverse_atlasnet(
                geometry_embedding,
                points_3d.view(points_3d.shape[0], -1, points_3d.shape[-1]),
            )
            output["gt_primitive"] = self.net_atlasnet.get_label(points_3d.device)[None]
            output["gt_points_2d"] = torch.stack(point_array_2d, dim=1)[None]

The output of this section is not used in loss. What is its special meaning about the input of net_geometry_embedding is just {0}. So, It seems that only the loss_inverse_mapping loss function supervises the uv map process(3d to uv,and uv to 3d) ? and this code feels useless

cqf7419 avatar Apr 18 '23 03:04 cqf7419

Ah I think you are right. It probably is something I forgot to remove while removing the Chamfer loss.

fbxiang avatar Apr 18 '23 03:04 fbxiang