Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'ChamferDistanceLoss' from 'learning3d.losses #19

Open
01yaoyuan opened this issue Apr 6, 2023 · 5 comments
Open

Comments

@01yaoyuan
Copy link

image
hello,while I run pcrnet_train.py in my virtual python environmnent outside learning3d ,I come across a question shown in this picture,I sincerly hope you help with me to slove this question

@vinits5
Copy link
Owner

vinits5 commented Jun 10, 2023

Hi @01yaoyuan ,
I have tested the code on my side for test_pcrnet.py. It seems to be working totally fine on my personal system. Following is the screenshot showing the code's working. Along with that adding one more image of registered point cloud.

Screenshot from 2023-06-11 01-20-03

Screenshot from 2023-06-11 01-20-14

@01yaoyuan
Copy link
Author

01yaoyuan commented Jun 11, 2023 via email

@vinits5
Copy link
Owner

vinits5 commented Jun 11, 2023

Hey @01yaoyuan,
I have recently updated the requirements.txt file (Link: https://github.com/vinits5/learning3d/blob/master/requirements.txt) with the latest versions that I have in the conda environment that I use. Also, I am running the code on a non-GPU system. If you are using a GPU based system then please let me know. It might be the issue with CUDA compatibility for a faster and cuda based implementation of chamfer distance loss function.

Just a suggestion, maybe you can try to run test_pcrnet.py file by commenting the code from line number 35 to line no. 41 and correct the indentation for line number 42 in this file (Link: https://github.com/vinits5/learning3d/blob/master/losses/chamfer_distance.py#L35). If by doing so makes the code work then we will be sure that the issue is with CUDA based implementation of chamfer distance loss function.

Otherwise, we can e-meet on google meet and resolve this problem together. Thanks.

@01yaoyuan
Copy link
Author

01yaoyuan commented Jun 11, 2023 via email

@BotScutters
Copy link

I just wanted to add a comment about this chamfer loss implementation--it's very short and elegant, which is great for interpretability, but unfortunately it's also very slow. You may want to consider switching to a different chamfer loss implementation, particularly since this is likely to be called every iteration in some models.
For example, the Kaolin chamfer distance implementation is roughly 10x faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants