• This repository has been archived on 25/Jul/2024
  • Stars
    star
    639
  • Rank 70,436 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 5 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[NeurIPS 2019, Spotlight] Point-Voxel CNN for Efficient 3D Deep Learning

PVCNN: Point-Voxel CNN for Efficient 3D Deep Learning

NVIDIA Jetson Community Project Spotlight

@inproceedings{liu2019pvcnn,
  title={Point-Voxel CNN for Efficient 3D Deep Learning},
  author={Liu, Zhijian and Tang, Haotian and Lin, Yujun and Han, Song},
  booktitle={Advances in Neural Information Processing Systems},
  year={2019}
}

Prerequisites

The code is built with following libraries (see requirements.txt):

Data Preparation

S3DIS

We follow the data pre-processing in PointCNN. The code for preprocessing the S3DIS dataset is located in data/s3dis/. One should first download the dataset from here, then run

python data/s3dis/prepare_data.py -d [path to unzipped dataset dir]

ShapeNet

We follow the data pre-processing in PointNet2. Please run the following command to down the dataset

./data/shapenet/download.sh

KITTI

For Frustum-PointNet backbone, we follow the data pre-processing in Frustum-Pointnets. One should first download the ground truth labels from here, then run

unzip data_object_label_2.zip
mv training/label_2 data/kitti/ground_truth
./data/kitti/frustum/download.sh

Code

The core code to implement PVConv is modules/pvconv.py. Its key idea costs only a few lines of code:

    voxel_features, voxel_coords = voxelize(features, coords)
    voxel_features = voxel_layers(voxel_features)
    voxel_features = trilinear_devoxelize(voxel_features, voxel_coords, resolution)
    fused_features = voxel_features + point_layers(features)

Pretrained Models

Here we provide some of the pretrained models. The accuracy might vary a little bit compared to the paper, since we re-train some of the models for reproducibility.

S3DIS

We compare PVCNN against the PointNet, 3D-UNet and PointCNN performance as reported in the following table. The accuracy is tested following PointCNN. The list is keeping updated.

Models Overall Acc mIoU
PointNet 82.54 42.97
PointNet (Reproduce) 80.46 44.03
PVCNN (0.125 x C) 82.79 48.75
PVCNN (0.25 x C) 85.00 53.08
3D-UNet 85.12 54.93
PVCNN 86.47 56.64
PointCNN 85.91 57.26
PVCNN++ (0.5 x C) 86.88 58.30
PVCNN++ 87.48 59.02

ShapeNet

We compare PVCNN against the PointNet, PointNet++, 3D-UNet, Spider CNN and PointCNN performance as reported in the following table. The accuracy is tested following PointNet. The list is keeping updated.

Models mIoU
PointNet (Reproduce) 83.5
PointNet 83.7
3D-UNet 84.6
PVCNN (0.25 x C) 84.9
PointNet++ SSG (Reproduce) 85.1
PointNet++ MSG 85.1
PVCNN (0.25 x C, DML) 85.1
SpiderCNN 85.3
PointNet++ MSG (Reproduce) 85.3
PVCNN (0.5 x C) 85.5
PVCNN 85.8
PointCNN 86.1
PVCNN (DML) 86.1

KITTI

We compare PVCNN (Efficient Version in the paper) against PointNets performance as reported in the following table. The accuracy is tested on val set following Frustum PointNets using modified code from kitti-object-eval-python. Since there is random sampling in Frustum Pointnets, random seed will influence the evaluation. All results provided by us are the average of 20 measurements with different seeds, and the best one of 20 measurements is shown in the parentheses. The list is keeping updated.

Models Car Car Car Pedestrian Pedestrian Pedestrian Cyclist Cyclist Cyclist
Easy Moderate Hard Easy Moderate Hard Easy Moderate Hard
Frustum PointNet 83.26 69.28 62.56 - - - - - -
Frustum PointNet (Reproduce) 85.24 (85.17) 71.63 (71.56) 63.79 (63.78) 66.44 (66.83) 56.90 (57.20) 50.43 (50.54) 77.14 (78.16) 56.46 (57.41) 52.79 (53.66)
Frustum PointNet++ 83.76 70.92 63.65 70.00 61.32 53.59 77.15 56.49 53.37
Frustum PointNet++ (Reproduce) 84.72 (84.46) 71.99 (71.95) 64.20 (64.13) 68.40 (69.27) 60.03 (60.80) 52.61 (53.19) 75.56 (79.41) 56.74 (58.65) 53.33 (54.82)
Frustum PVCNN (Efficient) 85.25 (85.30) 72.12 (72.22) 64.24 (64.36) 70.60 (70.60) 61.24 (61.35) 56.25 (56.38) 78.10 (79.79) 57.45 (58.72) 53.65 (54.81)

Testing Pretrained Models

For example, to test the downloaded pretrained models on S3DIS, one can run

python train.py [config-file] --devices [gpu-ids] --evaluate --configs.evaluate.best_checkpoint_path [path to the model checkpoint]

For instance, to evaluate PVCNN on GPU 0,1 (with 4096 points on Area 5 of S3DIS), one can run

python train.py configs/s3dis/pvcnn/area5.py --devices 0,1 --evaluate --configs.evaluate.best_checkpoint_path s3dis.pvcnn.area5.c1.pth.tar

Specially, for Frustum KITTI evaluation, one can specify the number of measurements to eliminate the random seed effects,

python train.py configs/kitti/frustum/pvcnne.py --devices 0 --evaluate --configs.evaluate.best_checkpoint_path kitti.frustum.pvcnne.pth.tar --configs.evaluate.num_tests [#measurements]

Training

We provided several examples to train PVCNN with this repo:

  • To train PVCNN on S3DIS holding out Area 5, one can run
python train.py configs/s3dis/pvcnn/area5/c1.py --devices 0,1

In general, to train a model, one can run

python train.py [config-file] --devices [gpu-ids]

NOTE: During training, the meters will provide accuracies and IoUs. However, these are just rough estimations. One have to run the following command to get accurate evaluation.

To evaluate trained models, one can do inference by running:

python train.py [config-file] --devices [gpu-ids] --evaluate

License

This repository is released under the MIT license. See LICENSE for additional details.

Acknowledgement

More Repositories

1

streaming-llm

[ICLR 2024] Efficient Streaming Language Models with Attention Sinks
Python
6,530
star
2

bevfusion

[ICRA'23] BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation
Python
2,286
star
3

temporal-shift-module

[ICCV 2019] TSM: Temporal Shift Module for Efficient Video Understanding
Python
2,060
star
4

once-for-all

[ICLR 2020] Once for All: Train One Network and Specialize it for Efficient Deployment
Python
1,866
star
5

llm-awq

AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration
Python
1,687
star
6

proxylessnas

[ICLR 2019] ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware
C++
1,420
star
7

torchquantum

A PyTorch-based framework for Quantum Classical Simulation, Quantum Machine Learning, Quantum Neural Networks, Parameterized Quantum Circuits with support for easy deployments on real quantum computers.
Jupyter Notebook
1,304
star
8

data-efficient-gans

[NeurIPS 2020] Differentiable Augmentation for Data-Efficient GAN Training
Python
1,277
star
9

efficientvit

EfficientViT is a new family of vision models for efficient high-resolution vision.
Python
1,218
star
10

torchsparse

[MICRO'23, MLSys'22] TorchSparse: Efficient Training and Inference Framework for Sparse Convolution on GPUs.
Cuda
1,181
star
11

smoothquant

[ICML 2023] SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models
Python
1,175
star
12

gan-compression

[CVPR 2020] GAN Compression: Efficient Architectures for Interactive Conditional GANs
Python
1,104
star
13

anycost-gan

[CVPR 2021] Anycost GANs for Interactive Image Synthesis and Editing
Python
778
star
14

tinyml

Python
755
star
15

TinyChatEngine

TinyChatEngine: On-Device LLM Inference Library
C++
730
star
16

tinyengine

[NeurIPS 2020] MCUNet: Tiny Deep Learning on IoT Devices; [NeurIPS 2021] MCUNetV2: Memory-Efficient Patch-based Inference for Tiny Deep Learning; [NeurIPS 2022] MCUNetV3: On-Device Training Under 256KB Memory
C
717
star
17

fastcomposer

[IJCV] FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention
Python
644
star
18

lite-transformer

[ICLR 2020] Lite Transformer with Long-Short Range Attention
Python
589
star
19

spvnas

[ECCV 2020] Searching Efficient 3D Architectures with Sparse Point-Voxel Convolution
Python
577
star
20

distrifuser

[CVPR 2024 Highlight] DistriFusion: Distributed Parallel Inference for High-Resolution Diffusion Models
Python
538
star
21

mcunet

[NeurIPS 2020] MCUNet: Tiny Deep Learning on IoT Devices; [NeurIPS 2021] MCUNetV2: Memory-Efficient Patch-based Inference for Tiny Deep Learning
Python
460
star
22

tiny-training

On-Device Training Under 256KB Memory [NeurIPS'22]
Python
432
star
23

amc

[ECCV 2018] AMC: AutoML for Model Compression and Acceleration on Mobile Devices
Python
428
star
24

dlg

[NeurIPS 2019] Deep Leakage From Gradients
Python
400
star
25

haq

[CVPR 2019, Oral] HAQ: Hardware-Aware Automated Quantization with Mixed Precision
Python
368
star
26

offsite-tuning

Offsite-Tuning: Transfer Learning without Full Model
Python
365
star
27

hardware-aware-transformers

[ACL'20] HAT: Hardware-Aware Transformers for Efficient Natural Language Processing
Python
321
star
28

litepose

[CVPR'22] Lite Pose: Efficient Architecture Design for 2D Human Pose Estimation
Python
304
star
29

inter-operator-scheduler

[MLSys 2021] IOS: Inter-Operator Scheduler for CNN Acceleration
C++
191
star
30

amc-models

[ECCV 2018] AMC: AutoML for Model Compression and Acceleration on Mobile Devices
Python
166
star
31

apq

[CVPR 2020] APQ: Joint Search for Network Architecture, Pruning and Quantization Policy
Python
156
star
32

parallel-computing-tutorial

C++
134
star
33

flatformer

[CVPR'23] FlatFormer: Flattened Window Attention for Efficient Point Cloud Transformer
Python
119
star
34

patch_conv

Patch convolution to avoid large GPU memory usage of Conv2D
Python
74
star
35

6s965-fall2022

Jupyter Notebook
64
star
36

sparsevit

[CVPR'23] SparseViT: Revisiting Activation Sparsity for Efficient High-Resolution Vision Transformer
Python
48
star
37

bnn-icestick

Binary Neural Network on IceStick FPGA.
Jupyter Notebook
47
star
38

e3d

Efficient 3D Deep Learning
46
star
39

neurips-micronet

[JMLR'20] NeurIPS 2019 MicroNet Challenge Efficient Language Modeling, Champion
Jupyter Notebook
40
star
40

spatten-llm

[HPCA'21] SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruning
Scala
32
star
41

tinychat-tutorial

C++
28
star
42

pruning-sparsity-publications

14
star
43

iccad-tinyml-open

[ICCAD'22 TinyML Contest] Efficient Heart Stroke Detection on Low-cost Microcontrollers
C
14
star
44

calo-cluster

Jupyter Notebook
5
star
45

ml-blood-pressure

Python
5
star
46

gan-compression-dynamic

Python
3
star
47

data-efficient-gans-dynamic

Python
3
star