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 kaolin.metrics.mesh etc... #414

Closed
hengtaoguo opened this issue Jul 14, 2021 · 9 comments
Closed

Cannot import kaolin.metrics.mesh etc... #414

hengtaoguo opened this issue Jul 14, 2021 · 9 comments

Comments

@hengtaoguo
Copy link

Hi! Thanks for developing this tool!

I have been trying to install kaolin in my Linux docker. Now the installation is complete, and I can see the info through pip show kaolin and successfully import kaolin. However, I cannot succeed any imports other than that. All these following imports do not work for me and gives "No module named 'xxx'":

import kaolin.rep, import kaolin.metrics.mesh, kaolin.cuda...

Also, when I install kaolin through python setup.py develop, it fives an error "No local pacakges or working download links found for usd-core==20.11". I tried to install this usd-core through manually downloaded packages, but also gives me error "usd_core-20.11-cp36-none-manylinux2014_x86_64.whl is not a supported wheel on this platform". So I commented out the line requirements.append('usd-core==20.11') in setup.py and finished installing. I am not sure whether this is the problem.

Thank you so much for your time and patience! Looking forward to hearing from you!

@Caenorst
Copy link
Collaborator

Hi @Tonight1121 ! Thank you for your interest in Kaolin!

Can you specify your system? (Linux OS? Python version? Pytorch version? CUDA version?)

Thanks!

@hengtaoguo
Copy link
Author

Hi @Tonight1121 ! Thank you for your interest in Kaolin!

Can you specify your system? (Linux OS? Python version? Pytorch version? CUDA version?)

Thanks!

Thank you so much for the timely reply! Here are my settings:

Ubuntu 18.04.3
Python 3.8.8
Pytorch 1.9.0
Cuda 10.2
Cython 0.29.23
Scipy 1.21.0
Pillow 8.3.1

@Caenorst
Copy link
Collaborator

So, be aware that USD related features only works with python >=3.6,<3.8, however Kaolin should install without USD if python version is outside of this supported range. Can you describe your installation process?

@hengtaoguo
Copy link
Author

So, be aware that USD related features only works with python >=3.6,<3.8, however Kaolin should install without USD if python version is outside of this supported range. Can you describe your installation process?

I was configuring these environments in a docker container on the Linux system. Inside this docker image, I followed the instructions:

git clone --recursive https://github.com/NVIDIAGameWorks/kaolin
cd kaolin
git checkout v0.9.0
python setup.py develop

Note that in order to complete the installation, I commented out the requirements of USD. Besides, I also tried to install kaolin in a virtual environment, but when I ran python setup.py develop, it showed:

no known conversion for argument 1 from '' to 'at::TensorList {aka c10::ArrayRefat::Tensor}'
error: command 'gcc' failed with exit status 1

@Caenorst
Copy link
Collaborator

Just to be sure, do you want the release v0.9.0 or the latest version of kaolin? There have been several changes since v0.9.0, if you still want to use v0.9.0, then the corresponding documentation is: https://kaolin.readthedocs.io/en/v0.9.0/

@hengtaoguo
Copy link
Author

Just to be sure, do you want the release v0.9.0 or the latest version of kaolin? There have been several changes since v0.9.0, if you still want to use v0.9.0, then the corresponding documentation is: https://kaolin.readthedocs.io/en/v0.9.0/

Hi thank your for your hint! I have successfully build v0.9.0 kaolin, but noticed that the codes, from other author's public project, was built depending on your older version v0.1. There are many function callings are inconsistent with the newer version v0.9.0. For example, I cannot find kaolin.rep, kaolin.metrics.mesh. Also some other functions are miss-matching including "_compute_edge_dist, _compute_planar_dist, TriangleDistance, point_to_surface". Do you have any suggestions on how can I modify the codes (built on kaolin v0.1) to fit the newer version v0.9.0? In other words, how can I find the correspondences of each functions from old to new?

I am really much appreciated for your help! Thanks a lot in advance!

@Caenorst
Copy link
Collaborator

v0.9.0 went through a reformat, so we didn't specifically look for correspondences.

For instance I see that in the project you've linked they used TriangleMesh which doesn't exist anymore in v0.9.0, we figured out that the representation was a little bit awkward to use, so we decided to remove it for now. However, we do have sometimes very similar functions, like the laplacian_loss used in the project.

The project recommend checkout to a specific commit and so if you intend to use exactly the same project you should follow their recommendation, but if you want to use the latest features I recommend just always following master.

@Tanmay98
Copy link

Hi can you let me know how to install the previous version of kaolin (V0.1)? Thanks in advance

@Xuanmeng-Zhang
Copy link

v0.9.0 went through a reformat, so we didn't specifically look for correspondences.

For instance I see that in the project you've linked they used TriangleMesh which doesn't exist anymore in v0.9.0, we figured out that the representation was a little bit awkward to use, so we decided to remove it for now. However, we do have sometimes very similar functions, like the laplacian_loss used in the project.

The project recommend checkout to a specific commit and so if you intend to use exactly the same project you should follow their recommendation, but if you want to use the latest features I recommend just always following master.

Hello, I want to know what function can calculate the laplacian_loss of two meshes in the latest version.

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

5 participants