ThibaultGROUEIX / ChamferDistancePytorch

Chamfer Distance in Pytorch with f-score
MIT License
326 stars 43 forks source link

[Errno 2] No such file or directory: 'chamfer_cuda.cpp' #11

Open SysOverdrive opened 4 years ago

SysOverdrive commented 4 years ago

After cloning the repo at the same level as a Jupiter notebook I can't seem to use this repo because of the error in the title.

My Code is :``` sys.path.append("ChamferDistancePytorch")

import torch, chamfer3D.dist_chamfer_3D, fscore chamLoss = chamfer3D.dist_chamfer_3D.chamfer_3DDist() points1 = torch.rand(32, 1000, 3).cuda() points2 = torch.rand(32, 2000, 3, requires_grad=True).cuda() dist1, dist2, idx1, idx2 = chamLoss(points1, points2) f_score, precision, recall = fscore.fscore(dist1, dist2)

ThibaultGROUEIX commented 4 years ago

Hi @SysOverdrive I am not sure what you mean by because of the error in the title. Can you be more specific? Did the tests run on your end? Sincerely, Thibault

SysOverdrive commented 4 years ago

Hi ThibaultGROUEIX so first I was referring to :

image

SysOverdrive commented 4 years ago

So basically I am using a conda enviroment to install and use the chamfer distance. I have tried running from a VS Build tools consolse/ from conda and other ways.

I am running on a windows machine :)

ahariri13 commented 4 years ago

@SysOverdrive Any luck running on windows ? I have a similar problem

jih189 commented 4 years ago

have you run python setup.py install?

Leong1230 commented 3 years ago

On windows, maybe try to replace '/' with double '\' in line 20, 21 in dist_chamfer_3D.py to make sure "/".join(os.path.abspath(file).split('\')[:-1] + ["chamfer_cuda.cpp"]) is the right path.

tiancaipipi110 commented 1 year ago

"/".join(os.path.abspath(file).split('\')[:-1] + ["chamfer_cuda.cpp"]) is the right path.

This works, but then it'll run into OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.