All Projects → ThibaultGROUEIX → Chamferdistancepytorch

ThibaultGROUEIX / Chamferdistancepytorch

Licence: mit
Chamfer Distance in Pytorch with f-score

Labels

Projects that are alternatives of or similar to Chamferdistancepytorch

Thundersvm
ThunderSVM: A Fast SVM Library on GPUs and CPUs
Stars: ✭ 1,282 (+1120.95%)
Mutual labels:  cuda
Tutorial Ubuntu 18.04 Install Nvidia Driver And Cuda And Cudnn And Build Tensorflow For Gpu
Ubuntu 18.04 How to install Nvidia driver + CUDA + CUDNN + build tensorflow for gpu step by step command line
Stars: ✭ 91 (-13.33%)
Mutual labels:  cuda
Extending Jax
Extending JAX with custom C++ and CUDA code
Stars: ✭ 98 (-6.67%)
Mutual labels:  cuda
Weighted softmax loss
Weighted Softmax Loss Layer for Caffe
Stars: ✭ 89 (-15.24%)
Mutual labels:  cuda
Matconvnet
MatConvNet: CNNs for MATLAB
Stars: ✭ 1,299 (+1137.14%)
Mutual labels:  cuda
Fbtt Embedding
This is a Tensor Train based compression library to compress sparse embedding tables used in large-scale machine learning models such as recommendation and natural language processing. We showed this library can reduce the total model size by up to 100x in Facebook’s open sourced DLRM model while achieving same model quality. Our implementation is faster than the state-of-the-art implementations. Existing the state-of-the-art library also decompresses the whole embedding tables on the fly therefore they do not provide memory reduction during runtime of the training. Our library decompresses only the requested rows therefore can provide 10,000 times memory footprint reduction per embedding table. The library also includes a software cache to store a portion of the entries in the table in decompressed format for faster lookup and process.
Stars: ✭ 92 (-12.38%)
Mutual labels:  cuda
Deep Learning Boot Camp
A community run, 5-day PyTorch Deep Learning Bootcamp
Stars: ✭ 1,270 (+1109.52%)
Mutual labels:  cuda
Pygraphistry
PyGraphistry is a Python library to quickly load, shape, embed, and explore big graphs with the GPU-accelerated Graphistry visual graph analyzer
Stars: ✭ 1,365 (+1200%)
Mutual labels:  cuda
Elasticfusion
Real-time dense visual SLAM system
Stars: ✭ 1,298 (+1136.19%)
Mutual labels:  cuda
Supra
SUPRA: Software Defined Ultrasound Processing for Real-Time Applications - An Open Source 2D and 3D Pipeline from Beamforming to B-Mode
Stars: ✭ 96 (-8.57%)
Mutual labels:  cuda
Halloc
A fast and highly scalable GPU dynamic memory allocator
Stars: ✭ 89 (-15.24%)
Mutual labels:  cuda
Aurora
Minimal Deep Learning library is written in Python/Cython/C++ and Numpy/CUDA/cuDNN.
Stars: ✭ 90 (-14.29%)
Mutual labels:  cuda
Region Conv
Not All Pixels Are Equal: Difficulty-Aware Semantic Segmentation via Deep Layer Cascade
Stars: ✭ 95 (-9.52%)
Mutual labels:  cuda
Deep Learning With Cats
Deep learning with cats (^._.^)
Stars: ✭ 1,290 (+1128.57%)
Mutual labels:  cuda
Dpp
Detail-Preserving Pooling in Deep Networks (CVPR 2018)
Stars: ✭ 99 (-5.71%)
Mutual labels:  cuda
Minhashcuda
Weighted MinHash implementation on CUDA (multi-gpu).
Stars: ✭ 88 (-16.19%)
Mutual labels:  cuda
Numer
Numeric Erlang - vector and matrix operations with CUDA. Heavily inspired by Pteracuda - https://github.com/kevsmith/pteracuda
Stars: ✭ 91 (-13.33%)
Mutual labels:  cuda
Cuda Winograd
Fast CUDA Kernels for ResNet Inference.
Stars: ✭ 104 (-0.95%)
Mutual labels:  cuda
Deepnet
Deep.Net machine learning framework for F#
Stars: ✭ 99 (-5.71%)
Mutual labels:  cuda
Pynvvl
A Python wrapper of NVIDIA Video Loader (NVVL) with CuPy for fast video loading with Python
Stars: ✭ 95 (-9.52%)
Mutual labels:  cuda

pip install torch ninja

Pytorch Chamfer Distance.

Include a CUDA version, and a PYTHON version with pytorch standard operations. NB : In this depo, dist1 and dist2 are squared pointcloud euclidean distances, so you should adapt thresholds accordingly.

  • [x] F - Score

CUDA VERSION

  • [x] JIT compilation
  • [x] Supports multi-gpu
  • [x] 2D point clouds.
  • [x] 3D point clouds.
  • [x] 5D point clouds.
  • [x] Contiguous() safe.

Python Version

  • [x] Supports any dimension

Usage

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)

Add it to your project as a submodule

git submodule add https://github.com/ThibaultGROUEIX/ChamferDistancePytorch

Benchmark: [forward + backward] pass

  • [x] CUDA 10.1, NVIDIA 435, Pytorch 1.4
  • [x] p1 : 32 x 2000 x dim
  • [x] p2 : 32 x 1000 x dim
Timing (sec * 1000) 2D 3D 5D
Cuda Compiled 1.2 1.4 1.8
Cuda JIT 1.3 1.4 1.5
Python 37 37 37
Memory (MB) 2D 3D 5D
Cuda Compiled 529 529 549
Cuda JIT 520 529 549
Python 2495 2495 2495

What is the chamfer distance ?

Stanford course on 3D deep Learning

Aknowledgment

Original backbone from Fei Xia.

JIT cool trick from Christian Diller

Troubleshoot

  • Undefined symbol: Zxxxxxxxxxxxxxxxxx:

--> Fix: Make sure to import torch before you import chamfer. --> Use pytorch.version >= 1.1.0

wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
sudo unzip ninja-linux.zip -d /usr/local/bin/
sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force 

TODO:

  • Discuss behaviour of torch.min() and tensor.min() which causes issues in some pytorch versions
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].