Giter Site home page Giter Site logo

nvidiagameworks / kaolin Goto Github PK

View Code? Open in Web Editor NEW
4.2K 109.0 528.0 109.03 MB

A PyTorch Library for Accelerating 3D Deep Learning Research

License: Apache License 2.0

Shell 0.20% Python 74.90% C++ 7.31% Cuda 11.16% C 0.64% PowerShell 0.02% Makefile 0.05% JavaScript 1.94% CSS 0.23% GLSL 0.19% HTML 0.34% Cython 0.74% Groovy 2.27%
pytorch 3d-deep-learning neural-networks differentiable-rendering artificial-intelligence camera-api cuda rasterization differentiable-lighting

kaolin's Introduction

Kaolin: A Pytorch Library for Accelerating 3D Deep Learning Research

Overview

NVIDIA Kaolin library provides a PyTorch API for working with a variety of 3D representations and includes a growing collection of GPU-optimized operations such as modular differentiable rendering, fast conversions between representations, data loading, 3D checkpoints, differentiable camera API, differentiable lighting with spherical harmonics and spherical gaussians, powerful quadtree acceleration structure called Structured Point Clouds, interactive 3D visualizer for jupyter notebooks, convenient batched mesh container and more. Visit the Kaolin Library Documentation to get started!

Note that Kaolin library is part of the larger NVIDIA Kaolin effort for 3D deep learning.

Installation and Getting Started

Starting with v0.12.0, Kaolin supports installation with wheels:

# Replace TORCH_VERSION and CUDA_VERSION with your torch / cuda versions
pip install kaolin==0.15.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-{TORCH_VERSION}_cu{CUDA_VERSION}.html

For example, to install kaolin 0.15.0 over torch 1.12.1 and cuda 11.3:

pip install kaolin==0.15.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-1.12.1_cu113.html

About the Latest Release (0.15.0)

In this version we added a non commercial section under NSCL license. See The license section for more info for more details.

In this new section we implemented features for Flexicubes a method to extract meshes from scalar fields. See more information in the official repository which is now using Kaolin's implementation.

flexicubes

In addition we implemented a GLTF mesh loader that can be used to load models from Objaverse and Objaverse-XL.

gltf

Check our new tutorial: Load and render a GLTF file interactively into a Jupyter notebook: In this file we show how to load a gltf file and fully differentiably render it with nvdiffrast and spherical gaussian for diffuse and specular lighting, using displacement mapping and other materials properties from the GLTF file.

gltf notebook

See change logs for details.

Contributing

Please review our contribution guidelines.

External Projects using Kaolin

Licenses

Most of Kaolin's repository is under Apache v2.0 license, except under kaolin/non_commercial which is under NSCL license restricted to non commercial usage for research and evaluation purposes. For example, FlexiCubes method is included under non_commercial.

Default kaolin import includes Apache-licensed components:

import kaolin

The non-commercial components need to be explicitly imported as:

import kaolin.non_commercial

Citation

If you are using Kaolin library for your research, please cite:

@misc{KaolinLibrary,
      author = {Fuji Tsang, Clement and Shugrina, Maria and Lafleche, Jean Francois and Takikawa, Towaki and Wang, Jiehan and Loop, Charles and Chen, Wenzheng and Jatavallabhula, Krishna Murthy and Smith, Edward and Rozantsev, Artem and Perel, Or and Shen, Tianchang and Gao, Jun and Fidler, Sanja and State, Gavriel and Gorski, Jason and Xiang, Tommy and Li, Jianing and Li, Michael and Lebaredian, Rev},
      title = {Kaolin: A Pytorch Library for Accelerating 3D Deep Learning Research},
      year = {2022},
      howpublished={\url{https://github.com/NVIDIAGameWorks/kaolin}}
}

Contributors

Current Team:

  • Technical Lead: Clement Fuji Tsang
  • Manager: Maria (Masha) Shugrina
  • Charles Loop
  • Or Perel
  • Alexander Zook

Other Majors Contributors:

  • Wenzheng Chen
  • Sanja Fidler
  • Jun Gao
  • Jason Gorski
  • Jean-Francois Lafleche
  • Rev Lebaredian
  • Jianing Li
  • Michael Li
  • Krishna Murthy Jatavallabhula
  • Artem Rozantsev
  • Tianchang (Frank) Shen
  • Edward Smith
  • Gavriel State
  • Towaki Takikawa
  • Jiehan Wang
  • Tommy Xiang

kaolin's People

Contributors

andrescasado avatar avik-pal avatar caenorst avatar charlesloop avatar cosw0t avatar dependabot[bot] avatar edgarriba avatar frankshen07 avatar jasongorski avatar jean-francois-lafleche avatar jerryjiehanwang avatar jonahthelion avatar kosuke55 avatar krrish94 avatar le-greg avatar mason-mcgough avatar mikerjacobi avatar mjd3 avatar mlej8 avatar orperel avatar shumash avatar talmaj avatar tommyx12 avatar tovacinni avatar zookae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kaolin's Issues

build error:error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

Repost (seems like the project is reset)

I faced this error with pytorch 1.2.0, cuda 10.0 and gcc 5.4.0.
If you face the same error, try to modify #include <torch/extension.h> to #include <torch/types.h> in the following files (*.h and *.cu files only):

kaolin/cuda/util.h
kaolin/cuda/cuda_util.h
kaolin/cuda/mesh_intersection_cuda.cu
kaolin/cuda/sided_distance_cuda.cu

NeuralMeshRenderer fails to find Lighting

I am using kaolin.graphics.NeuralMeshRenderer.render()
but it fails with the following error.

kaolin/graphics/NeuralMeshRenderer.py", line 293, in lighting
NameError: name 'Lighting' is not defined

NeuralMeshRenderer.py seems to import functions of Lighting.py,
but doesn't import Lighting.py itself.

No module named 'kaolin.nnsearch'

OS: Ubuntu 16.04.6
Nvidia Driver: 418.87
CUDA: 10.1

Steps to reproduce

conda create --name kaolin python=3.7
conda activate kaolin
conda install pytorch-gpu numpy
python setup.py install
python -c "import kaolin"
(kaolin) jbartolozzi@mldwl4028-l|kaolin|: python -c "import kaolin"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/jbartolozzi/kaolin/kaolin/__init__.py", line 17, in <module>
    from kaolin import conversions
  File "/home/jbartolozzi/kaolin/kaolin/conversions/__init__.py", line 1, in <module>
    from kaolin.conversions.meshconversions import *
  File "/home/jbartolozzi/kaolin/kaolin/conversions/meshconversions.py", line 22, in <module>
    from kaolin.metrics.point import directed_distance as directed_distance
  File "/home/jbartolozzi/kaolin/kaolin/metrics/__init__.py", line 2, in <module>
    from .point import *
  File "/home/jbartolozzi/kaolin/kaolin/metrics/point.py", line 16, in <module>
    from kaolin.nnsearch import nnsearch
ModuleNotFoundError: No module named 'kaolin.nnsearch'

importerror undefined symbol: _ZN3c1011CPUTensorIdEv

env: pytorch 1.3.1 , cuda 10.1 ,python 3.6.9. ubuntu-18.04, gpu: GTX 960M, driver version 435.

during import kaolin, report the import error as follows.
builtins.ImportError: /home/xxx/.cache/Python-Eggs/kaolin-0.2.0+ed13273-py3.6-linux-x86_64.egg-tmp/kaolin/cuda/sided_distance.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c1011CPUTensorIdEv

anyone in this problem? how to solve it.

Cuda

Hello,

I am using Ubuntu which has Cuda 10.1 installed. I checked that torch is working with it.

However, when I run pytest tests, I get the following Cuda error

RuntimeError: CUDA error: no kernel image is available for execution on the device
__________________________________ ERROR collecting tests/datasets/test_usdfile.py

what should I do?

DIB_R Readme.

Hello,

I was reading the README.md in the folder DIB-R. I am not sure if the description
is correct or I do not know how to run it.

Can someone help?

Cuda compiling error

I'm getting this error when building kaolin on Win 10, with Cuda 10.2, Pytorch 1.3, Conda 3.7.

1 error detected in the compilation of "C:/Users/chris/AppData/Local/Temp/tmpxft_00000b28_00000000-10_sided_distance_cuda.cpp1.ii".
Traceback (most recent call last):
File "C:\Users\chris\Anaconda3\envs\kaolin\lib\distutils_msvccompiler.py", line 424, in compile
self.spawn(args)
File "C:\Users\chris\Anaconda3\envs\kaolin\lib\site-packages\torch\utils\cpp_extension.py", line 337, in spawn
return original_spawn(cmd)
File "C:\Users\chris\Anaconda3\envs\kaolin\lib\distutils_msvccompiler.py", line 543, in spawn
return super().spawn(cmd)
File "C:\Users\chris\Anaconda3\envs\kaolin\lib\distutils\ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "C:\Users\chris\Anaconda3\envs\kaolin\lib\distutils\spawn.py", line 38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "C:\Users\chris\Anaconda3\envs\kaolin\lib\distutils\spawn.py", line 81, in _spawn_nt
"command %r failed with exit status %d" % (cmd, rc))

ModuleNotFoundError: No module named 'kaolin.nnsearch'

OS: ubuntu 18.0.4
platform: conda
python: 3.6.9
cuda: 10.1
pytorch: 1.3.1

After type in import kaolin as kal
I get this error message:
Traceback (most recent call last):
File "", line 1, in
File "/home/nikepupu/Desktop/kaolin/kaolin/init.py", line 17, in
from kaolin import conversions
File "/home/nikepupu/Desktop/kaolin/kaolin/conversions/init.py", line 1, in
from kaolin.conversions.meshconversions import *
File "/home/nikepupu/Desktop/kaolin/kaolin/conversions/meshconversions.py", line 22, in
from kaolin.metrics.point import directed_distance as directed_distance
File "/home/nikepupu/Desktop/kaolin/kaolin/metrics/init.py", line 2, in
from .point import *
File "/home/nikepupu/Desktop/kaolin/kaolin/metrics/point.py", line 16, in
from kaolin.nnsearch import nnsearch
ModuleNotFoundError: No module named 'kaolin.nnsearch'

module 'site' has no attribute 'getsitepackages'

When python setup.py install:

Building wheel kaolin-0.2.0+83002fe
--Building version 0.2.0+83002fe
Traceback (most recent call last):
File "setup.py", line 78, in
build_deps()
File "setup.py", line 43, in build_deps
sp = site.getsitepackages()[0]
AttributeError: module 'site' has no attribute 'getsitepackages'

ModuleNotFoundError: No module named 'Cython'

Environment: Ubuntu 18.04
When running python setup.py install, I get the following error:


> Using /home/niko/workspace/kaolin/venv/lib/python3.6/site-packages
> Finished processing dependencies for kaolin==0.2.0+1accd3e
> Traceback (most recent call last):
>   File "setup.py", line 98, in <module>
>     import Cython
> ModuleNotFoundError: No module named 'Cython'

Installation procedure:

virtualenv -p /usr/bin/python3.6 venv #create virtual environment
# activate virtual environment
pip install numpy
pip install torch torchvision
python setup.py install

The same error occurred in case of using conda instead of pip

could not open output file

When I compile setup.py.Following Error occurs,I Know I dont have permission to create files in /tmp/,
I also try nvcc -keep to allocate temporary files but error still happen,Do you have some suggestion

Unable to resolve Cuda issue

Hello,

I am running Ubuntu 18.04 with Cuda 10.1. However, I am unable to resolve the error message
coming from "pytest tests". What should I check for?

(kaolin)$ pytest tests
============================================= test session starts ==============================================
platform linux -- Python 3.6.7, pytest-5.2.4, py-1.8.0, pluggy-0.13.0
rootdir: /Software/MLearn/kaolin
plugins: cov-2.8.1
collected 163 items / 1 errors / 162 selected

==================================================== ERRORS ====================================================
____________________________ ERROR collecting tests/test_compute_adjacency_info.py _____________________________
tests/test_compute_adjacency_info.py:31: in
ef, ef_count = Mesh.compute_adjacency_info(vertices_gpu, faces_gpu)
/home//Disk/Software/Anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.2.0+ed13273-py3.6-linux-x86_64.egg/kaolin/rep/Mesh.py:534: in compute_adjacency_info
[faces[:,[-1,0]]], dim=0)
E RuntimeError: CUDA error: no kernel image is available for execution on the device
=============================================== warnings summary ===============================================
/home/Disk/Software/Anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.2.0+ed13273-py3.6-linux-x86_64.egg/kaolin/nnsearch.py:3
/home/Disk/Software/Anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.2.0+ed13273-py3.6-linux-x86_64.egg/kaolin/nnsearch.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

/home/Disk/Software/Anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.2.0+ed13273-py3.6-linux-x86_64.egg/kaolin/datasets/shapenet.py:861
/home/Disk/Software/Anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.2.0+ed13273-py3.6-linux-x86_64.egg/kaolin/datasets/shapenet.py:861
/home/Disk/Software/Anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.2.0+ed13273-py3.6-linux-x86_64.egg/kaolin/datasets/shapenet.py:861: DeprecationWarning: invalid escape sequence *

-- Docs: https://docs.pytest.org/en/latest/warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================= 3 warnings, 1 error in 4.12s ====

ModuleNotFoundError: No module named 'kaolin.nnsearch'

Hi, all,

After successfully building kaolin, I got the import error as follows:

(kaolin) root@milton-ThinkCentre-M93p:/data/code10/kaolin# python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import kaolin as kal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/code10/kaolin/kaolin/__init__.py", line 17, in <module>
    from kaolin import conversions
  File "/data/code10/kaolin/kaolin/conversions/__init__.py", line 1, in <module>
    from kaolin.conversions.meshconversions import *
  File "/data/code10/kaolin/kaolin/conversions/meshconversions.py", line 22, in <module>
    from kaolin.metrics.point import directed_distance as directed_distance
  File "/data/code10/kaolin/kaolin/metrics/__init__.py", line 2, in <module>
    from .point import *
  File "/data/code10/kaolin/kaolin/metrics/point.py", line 16, in <module>
    from kaolin.nnsearch import nnsearch
ModuleNotFoundError: No module named 'kaolin.nnsearch'

Any suggestion to fix this issue?

THX!

Not supported python3.7

Python 3.7 cannot import the pacage. It works all right with python 3.6.9.

Error message:

`Python 3.7.3 (default, Mar 27 2019, 22:11:17)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

import kaolin as kal
Traceback (most recent call last):
File "", line 1, in
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/site-packages/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg/kaolin/init.py", line 17, in
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/site-packages/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg/kaolin/conversions/init.py", line 1, in
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/site-packages/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg/kaolin/conversions/meshconversions.py", line 22, in
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/site-packages/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg/kaolin/metrics/init.py", line 3, in
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/site-packages/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg/kaolin/metrics/mesh.py", line 40, in
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/site-packages/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg/kaolin/rep/init.py", line 1, in
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/site-packages/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg/kaolin/rep/Mesh.py", line 25, in
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/site-packages/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg/kaolin/cuda/load_textures.py", line 7, in
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/site-packages/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg/kaolin/cuda/load_textures.py", line 6, in bootstrap
File "/home/zuanazzi/anaconda3/envs/tomtom/lib/python3.7/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /home/zuanazzi/.cache/Python-Eggs/kaolin-0.2.0+ed13273-py3.7-linux-x86_64.egg-tmp/kaolin/cuda/load_textures.cpython-37m-x86_64-linux-gnu.so: undefined symbol: cudaSetupArgument
`

No module named 'kaolin.nnsearch'

After a fresh install in a new python 3.7 conda env, importing kaolin fails.
I'm on Ubuntu 18.04, Python 3.7.3.

Python 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 21:52:21) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import kaolin as kal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/godoakos/Apps/kaolin/kaolin/__init__.py", line 17, in <module>
    from kaolin import conversions
  File "/home/godoakos/Apps/kaolin/kaolin/conversions/__init__.py", line 1, in <module>
    from kaolin.conversions.meshconversions import *
  File "/home/godoakos/Apps/kaolin/kaolin/conversions/meshconversions.py", line 22, in <module>
    from kaolin.metrics.point import directed_distance as directed_distance
  File "/home/godoakos/Apps/kaolin/kaolin/metrics/__init__.py", line 2, in <module>
    from .point import *
  File "/home/godoakos/Apps/kaolin/kaolin/metrics/point.py", line 16, in <module>
    from kaolin.nnsearch import nnsearch
ModuleNotFoundError: No module named 'kaolin.nnsearch'

ModuleNotFoundError: No module named 'kaolin.nnsearch'

The installation of kaolin "python setup.py install" runs smoothly, but when I test the installation by running "python -c 'import kaolin'" I get the following error:

Traceback (most recent call last):
File "", line 1, in
File "/Data02/michel/MyResearch/kaolin/kaolin/init.py", line 17, in
from kaolin import conversions
File "/Data02/michel/MyResearch/kaolin/kaolin/conversions/init.py", line 1, in
from kaolin.conversions.meshconversions import *
File "/Data02/michel/MyResearch/kaolin/kaolin/conversions/meshconversions.py", line 22, in
from kaolin.metrics.point import directed_distance as directed_distance
File "/Data02/michel/MyResearch/kaolin/kaolin/metrics/init.py", line 2, in
from .point import *
File "/Data02/michel/MyResearch/kaolin/kaolin/metrics/point.py", line 16, in
from kaolin.nnsearch import nnsearch
ModuleNotFoundError: No module named 'kaolin.nnsearch'

Any ideas about what is causing this issue?

PointNetSegmenter prints input shape

I came across ghost pints when using PointNetSegmenter.

I am not sure if they are there on purpose. But the forward call of PointNet.PointNetSegmenter is printing the input shape. Line512.

nvcc fatal : Unsupported gpu architecture 'compute_75'

when I use: python3 setup.py install , have a problem, what should I do

/usr/bin/nvcc -I/home/zhaozhichao/.local/lib/python3.6/site-packages/torch/include -I/home/zhaozhichao/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/zhaozhichao/.local/lib/python3.6/site-packages/torch/include/TH -I/home/zhaozhichao/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/include/python3.6m -c kaolin/cuda/furthest_point_sampling_cuda.cu -o build/temp.linux-x86_64-3.6/kaolin/cuda/furthest_point_sampling_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=furthest_point_sampling -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++11
nvcc fatal   : Unsupported gpu architecture 'compute_75'
error: command '/usr/bin/nvcc' failed with exit status 1

Env:
System: ubuntu 18.04
CUDA Version 10.0.130
cudnn: 7.5.0
nvcc:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85

ModuleNotFoundError: No module named 'kaolin.nnsearch'

I'm using pytorch:19.10-py3 docker image (docker pull nvcr.io/nvidia/pytorch:19.10-py3). I get the following error:
.......

Finished processing dependencies for kaolin==0.2.0+a76a004
root@d404b78867d9:/workspace/kaolin# python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import kaolin as kal
Traceback (most recent call last):
File "", line 1, in
File "/workspace/kaolin/kaolin/init.py", line 17, in
from kaolin import conversions
File "/workspace/kaolin/kaolin/conversions/init.py", line 1, in
from kaolin.conversions.meshconversions import *
File "/workspace/kaolin/kaolin/conversions/meshconversions.py", line 22, in
from kaolin.metrics.point import directed_distance as directed_distance
File "/workspace/kaolin/kaolin/metrics/init.py", line 2, in
from .point import *
File "/workspace/kaolin/kaolin/metrics/point.py", line 16, in
from kaolin.nnsearch import nnsearch
ModuleNotFoundError: No module named 'kaolin.nnsearch'

Point Set Registration

A useful feature would be strong baselines for point set registration, e.g., Iterative Closest Point, Coherent Point Drift, PointNetLK, FilterReg to name a few classics and recents.

ValueError: 'kaolin/cython/triangle_hash.pyx' doesn't match any files

This error happens if the installation takes place from the parent directory of kaolin or another directory in the same level of it (see issue #52 ):
....................
Finished processing dependencies for kaolin==0.2.0+05e6433
Traceback (most recent call last):
File "../kaolin/setup.py", line 192, in
ext_modules=cythonize(ext_modules),
File "/home/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/Cython-0.29.14-py3.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 966, in cythonize
aliases=aliases)
File "/home/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/Cython-0.29.14-py3.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 810, in create_extension_list
for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
File "/home/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/Cython-0.29.14-py3.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 109, in nonempty
raise ValueError(error_msg)
ValueError: 'kaolin/cython/triangle_hash.pyx' doesn't match any files

Segmentation Fault (core dumped) after training PointNet

Any time I try to train PointNet (following the code providing in kaolin/examples/Classification/, it trains and validates for all of the specified epochs, but at the very end, a Segmentation fault (core dumped) error is raised.

Here is the code for the Python script:


import torch
from torch.utils.data import DataLoader
import kaolin as kal
from kaolin import ClassificationEngine
from kaolin.datasets import ModelNet10
from kaolin.models.PointNet import PointNetClassifier as PointNet
from kaolin.transforms import NormalizePointCloud


if __name__ == "__main__":
    modelnet_path = Path("/user/data/ModelNet10/")
    engines = {"epochs":10, "print-every":10, "save":True, "savedir":Path.cwd()}
    cats = ['bathtub', 'bed', 'chair', 'desk', 'dresser', 'monitor', 'night_stand', 'sofa', 'table', 'toilet']
    bs = 12

    print(f"kaolin version: {kal.__version__}\n\n")

    norm = NormalizePointCloud()
    train_loader = DataLoader(ModelNet10(modelnet_path, categories=cats,
                                         split='train', rep='pointcloud', transform=norm, device='cuda:0'),
                              batch_size=bs, shuffle=True)
    val_loader = DataLoader(ModelNet10(modelnet_path, categories=cats,
                                       split='test', rep='pointcloud', transform=norm, device='cuda:0'),
                            batch_size=bs)

    engine = ClassificationEngine(PointNet(num_classes=len(cats)), train_loader, val_loader, engineparams=engines, device='cuda:0')
    engine.fit()

Here is the output from gdb after I ran backtrace after running the script and got a Segmentation fault (core dumped) error:

#1  0x00007fffec941b01 in ?? () from /user/miniconda3/envs/kaolin_test/lib/python3.6/site-packages/torch/lib/../../../../libcudart.so.10.1
#2  0x00007fffec93498e in ?? () from /user/miniconda3/envs/kaolin_test/lib/python3.6/site-packages/torch/lib/../../../../libcudart.so.10.1
#3  0x00007fffec935006 in ?? () from /user/miniconda3/envs/kaolin_test/lib/python3.6/site-packages/torch/lib/../../../../libcudart.so.10.1
#4  0x00007fff66af27d0 in __cudaUnregisterBinaryUtil() ()
   from /user/.cache/Python-Eggs/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg-tmp/kaolin/cuda/three_nn.cpython-36m-x86_64-linux-gnu.so
#5  0x00007ffff7808041 in __run_exit_handlers (status=0, listp=0x7ffff7bb0718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, 
    run_dtors=run_dtors@entry=true) at exit.c:108
#6  0x00007ffff780813a in __GI_exit (status=<optimized out>) at exit.c:139
#7  0x00007ffff77e6b9e in __libc_start_main (main=0x5555556377a0 <main>, argc=2, argv=0x7fffffffe148, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe138) at ../csu/libc-start.c:344```

nnsearch missing

Hello,

I am new to Python and I installed Anaconda and thereafter followed the instructions given
on the website.

I get the following message:

(kaolin) csverma@blackhole:$ python
Python 3.6.7 | packaged by conda-forge | (default, Nov 6 2019, 16:19:42)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import kaolin as kal
Traceback (most recent call last):
File "", line 1, in
File "/mnt/35f6163f-1be0-4350-89a5-b885cc687dd6/csverma/Software/MLearn/kaolin/kaolin/init.py", line 17, in
from kaolin import conversions
File "/mnt/35f6163f-1be0-4350-89a5-b885cc687dd6/csverma/Software/MLearn/kaolin/kaolin/conversions/init.py", line 1, in
from kaolin.conversions.meshconversions import *
File "/mnt/35f6163f-1be0-4350-89a5-b885cc687dd6/csverma/Software/MLearn/kaolin/kaolin/conversions/meshconversions.py", line 22, in
from kaolin.metrics.point import directed_distance as directed_distance
File "/mnt/35f6163f-1be0-4350-89a5-b885cc687dd6/csverma/Software/MLearn/kaolin/kaolin/metrics/init.py", line 2, in
from .point import *
File "/mnt/35f6163f-1be0-4350-89a5-b885cc687dd6/csverma/Software/MLearn/kaolin/kaolin/metrics/point.py", line 16, in
from kaolin.nnsearch import nnsearch
ModuleNotFoundError: No module named 'kaolin.nnsearch'

DGCNN Semantic Segmentation

Will you implement the DGCNN semantic segmentation model? Currently, it seems that the classification model is implemented.

RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected

Hey,

great work with the library!

I am trying to install it, but I am getting a cuda error. I have been using pytorch the gpus wihout problems until now.

The full line reads: RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at /opt/conda/conda-bld/pytorch_1570910687650/work/aten/src/THC/THCGeneral.cpp:50

I am using python 3.7.3 and pytorch 1.3.

the output of nvidia_smi is:
Fri Nov 15 16:13:25 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.56 Driver Version: 418.56 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|==================+======================+======================|
| 0 GeForce GTX TIT... On | 00000000:04:00.0 Off | N/A |
| 22% 41C P8 18W / 250W | 11MiB / 12212MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX TIT... On | 00000000:06:00.0 Off | N/A |
| 22% 38C P8 17W / 250W | 11MiB / 12212MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 2 GeForce GTX 108... On | 00000000:07:00.0 Off | N/A |
| 31% 34C P8 8W / 250W | 1283MiB / 11178MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 3 GeForce GTX 108... On | 00000000:08:00.0 Off | N/A |
| 31% 33C P8 8W / 250W | 10MiB / 11178MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 4 TITAN X (Pascal) On | 00000000:0C:00.0 Off | N/A |
| 23% 35C P8 8W / 250W | 10MiB / 12196MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 5 TITAN X (Pascal) On | 00000000:0E:00.0 Off | N/A |
| 23% 30C P8 8W / 250W | 10MiB / 12196MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|============================================================|
| 2 14534 C ...zzi/anaconda3/envs/tmtm/bin/python3.7 1273MiB |
+-----------------------------------------------------------------------------+

Any suggestions?

Compilation failed in CUDA load_texture module

image
I try to install kaolin library in Windows 10 platform.
I search for torch/torch.h to find possible solutions and also search for Internet for solutions. I have tried giving the administor access to VS code for cl.exe status problem but failed.
I already installed CUDA 10.0 and cudnn 7.6.4. I also use "conda upgrade pytorch" to upgrade pytorch.
Thanks for helping me:)

Rendering

Hello,

I was able to run the following command from the document:

from kaolin.datasets import shapenet
from torch.utils.data import DataLoader
meshes = shapenet.ShapeNet_Meshes(root=shapenet_dir, categories=['plane'])

But do not know how to render the models as shown in the document. Can someone help?

missing piglet in dependencies

Hello
I have noticed that "piglet" is missing in the dependencies after installing kaolin.
The missing dependency was found after running the installation script as instructed.
$ python setup.py install
regards
Pablo

setup.py is getting hung after trying to find nv-usd-py36.

Setup.py is getting hung after trying to find nv-usd-py36.

Processing project file 'packman/target_deps.xml'
Package 'nv-usd-py36' at version '19.11.139.596f7aaf-linux-x86_64' is missing from local storage.
(hangs here)

Ubuntu 18.04

I had no trouble installing last Friday with a near identical build on another computer. Not sure why this is broken now. Can probably reproduce by nuking your packman-repo to simulate having a fresh setup and then running: python setup.py install

Other packman-repo packages are getting pulled and installed correctly for example:
Processing project file '/home/stephen/packman-repo/packman-common/6.1.3/deps.packman.xml'
Package '7za' at version '16.02.4' is missing from local storage.
Downloading from 'packman-bootstrap.s3.amazonaws.com': [email protected] (4.33 MiB)
100.00% (speed 10.4 MiB/s)

Seems the url is no longer valid?

Edit*
I just downloaded and copied the files into the packman-repo and named the directory accordingly. Quick fix for anyone waiting for this to get fixed. Here's the file: https://developer.nvidia.com/usd

ModuleNotFoundError: No module named 'pxr'

Hello,
when I run this command as described in the documentation (with a space between "kaolin/" and "tests"):

pytest --cov=kaolin/ tests
I get the attached output.
Any hints on what I am missing?
other than: Hint: make sure your test modules/packages have valid Python names.

Thanks

Pablo

`========================================================================================================== test session starts ==========================================================================================================
platform linux -- Python 3.6.8, pytest-5.3.0, py-1.8.0, pluggy-0.13.0
rootdir: /home/pabs/PycharmProjects/kaolin
plugins: cov-2.8.1
collected 114 items / 2 errors / 112 selected
Coverage.py warning: No data was collected. (no-data-collected)
WARNING: Failed to generate report: No data to report.

/home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/pytest_cov-2.8.1-py3.6.egg/pytest_cov/plugin.py:254: PytestWarning: Failed to generate report: No data to report.

self.cov_controller.finish()

================================================================================================================ ERRORS =================================================================================================================
____________________________________________________________________________________________ ERROR collecting tests/datasets/test_usdfile.py ____________________________________________________________________________________________
ImportError while importing test module '/home/pabs/PycharmProjects/kaolin/tests/datasets/test_usdfile.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/datasets/test_usdfile.py:19: in
from kaolin.datasets.usdfile import USDMeshes
/home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/datasets/usdfile.py:19: in
???
E ModuleNotFoundError: No module named 'pxr'
___________________________________________________________________________________________ ERROR collecting tests/visualize/test_vis_usd.py ____________________________________________________________________________________________
ImportError while importing test module '/home/pabs/PycharmProjects/kaolin/tests/visualize/test_vis_usd.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/visualize/test_vis_usd.py:8: in
from kaolin.visualize.vis_usd import VisUsd
/home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/visualize/vis_usd.py:24: in
???
E ModuleNotFoundError: No module named 'pxr'
=========================================================================================================== warnings summary ============================================================================================================
venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/nnsearch.py:3
/home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/nnsearch.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/datasets/shapenet.py:861
venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/datasets/shapenet.py:861
/home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/datasets/shapenet.py:861: DeprecationWarning: invalid escape sequence *

-- Docs: https://docs.pytest.org/en/latest/warnings.html

----------- coverage: platform linux, python 3.6.8-final-0 -----------

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================================== 3 warnings, 2 errors in 4.99s`

MeshCNN implementation

Hi,
Thank you for the great work. Has the implementation of MeshCNN already been released? I can't seem to find it either in the kaolin/models folder or anywhere else in the repo.

Thanks!

build error: pybind11/cast.h & pybind11.h

Dear All,
I got the build error on pybind11 when processing the "python setup.py install".
The errors are as follows:
torch/include/pybind11/pytypes.h:1205:395: error: template argument 2 is invalid
torch/include/pybind11/pytypes.h:1205:397: error: template argument 1 is invalid
torch/include/pybind11/pytypes.h:1205:397: error: template argument 2 is invalid
torch/include/pybind11/pytypes.h:1205:412: error: template argument 1 is invalid
/root/miniconda3/envs/kaolin/lib/python3.6/site-packages/torch/include/pybind11/cast.h:776:149: error: expansion pattern ‘std::is_copy_constructible<_Tp>::value’ contains no argument packs
.../torch/include/pybind11pybind11.h:1471:131: error: no matching function for call to ‘pybind11::cpp_function::cpp_function(pybind11::detail::enum_base::init(bool, bool)::<lambda(pybind11::object, pybind11::object)>, pybind11::is_method)’
... pybind11/cast.h:2108:44: error: no matching function for call to ‘collect_arguments(pybind11::object&)’

I have tried built the pybind11 separately, and it's ok, I don't know what's wrong with the pybind11 when combining with the kaolin.
Env:
System: ubuntu 16.04
CUDA Version 10.1
cudnn: 9.0

Anybody know? Thanks very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.