enriccorona/LVD

[kaolin][directed_distance missing]

Opened this issue · 2 comments

Dear author,

thank you for you release the code & paper for research! In test_LVD_MANO.py, the directed_distance function is missing in the latest Kaolin repo.
Should I use chamfer_distance instead or others?

Looking forward to your reply, thank you very much!

@tomguluson92 , I faced the same issue and solved with these lines in "test_LVD_MANO.py":

                #d1 = torch.sqrt(directed_distance(vertices_scan_torch, vertices_smpl[0], False)).mean()
                #d2 = torch.sqrt(directed_distance(vertices_smpl[0], vertices_scan_torch, False)).mean()
                d = sided_distance(torch.unsqueeze(vertices_scan_torch,0), torch.unsqueeze(vertices_smpl[0],0))[0]
                
                #d1 = torch.cdist(vertices_scan_torch, vertices_smpl[0]).mean()
                #d2 = torch.cdist(vertices_smpl[0], vertices_scan_torch).mean()
                loss = torch.sum(d)

The fitting output looks reasonable.

Let's see if the authors can confirm this workaround :)

@tomguluson92 , I faced the same issue and solved with these lines in "test_LVD_MANO.py":

                #d1 = torch.sqrt(directed_distance(vertices_scan_torch, vertices_smpl[0], False)).mean()
                #d2 = torch.sqrt(directed_distance(vertices_smpl[0], vertices_scan_torch, False)).mean()
                d = sided_distance(torch.unsqueeze(vertices_scan_torch,0), torch.unsqueeze(vertices_smpl[0],0))[0]
                
                #d1 = torch.cdist(vertices_scan_torch, vertices_smpl[0]).mean()
                #d2 = torch.cdist(vertices_smpl[0], vertices_scan_torch).mean()
                loss = torch.sum(d)

The fitting output looks reasonable.

Let's see if the authors can confirm this workaround :)

Thanks bro