Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PointNet and PointNet++ implemented by pytorch (pure python) and on ModelNet, ShapeNet and S3DIS.

License

NotificationsYou must be signed in to change notification settings

yanx27/Pointnet_Pointnet2_pytorch

Repository files navigation

This repo is implementation forPointNet andPointNet++ in pytorch.

Update

2021/03/27:

(1) Release pre-trained models for semantic segmentation, where PointNet++ can achieve53.5% mIoU.

(2) Release pre-trained models for classification and part segmentation inlog/.

2021/03/20: Update codes for classification, including:

(1) Add codes for trainingModelNet10 dataset. Using setting of--num_category 10.

(2) Add codes for running on CPU only. Using setting of--use_cpu.

(3) Add codes for offline data preprocessing to accelerate training. Using setting of--process_data.

(4) Add codes for training with uniform sampling. Using setting of--use_uniform_sample.

2019/11/26:

(1) Fixed some errors in previous codes and added data augmentation tricks. Now classification by only 1024 points can achieve92.8%!

(2) Added testing codes, including classification and segmentation, and semantic segmentation with visualization.

(3) Organized all models into./models files for easy using.

Install

The latest codes are tested on Ubuntu 16.04, CUDA10.1, PyTorch 1.6 and Python 3.7:

conda install pytorch==1.6.0 cudatoolkit=10.1 -c pytorch

Classification (ModelNet10/40)

Data Preparation

Download alignmentModelNethere and save indata/modelnet40_normal_resampled/.

Run

You can run different modes with following codes.

  • If you want to use offline processing of data, you can use--process_data in the first run. You can download pre-processd datahere and save it indata/modelnet40_normal_resampled/.
  • If you want to train on ModelNet10, you can use--num_category 10.
# ModelNet40## Select different models in ./models## e.g., pointnet2_ssg without normal featurespython train_classification.py --model pointnet2_cls_ssg --log_dir pointnet2_cls_ssgpython test_classification.py --log_dir pointnet2_cls_ssg## e.g., pointnet2_ssg with normal featurespython train_classification.py --model pointnet2_cls_ssg --use_normals --log_dir pointnet2_cls_ssg_normalpython test_classification.py --use_normals --log_dir pointnet2_cls_ssg_normal## e.g., pointnet2_ssg with uniform samplingpython train_classification.py --model pointnet2_cls_ssg --use_uniform_sample --log_dir pointnet2_cls_ssg_fpspython test_classification.py --use_uniform_sample --log_dir pointnet2_cls_ssg_fps# ModelNet10## Similar setting like ModelNet40, just using --num_category 10## e.g., pointnet2_ssg without normal featurespython train_classification.py --model pointnet2_cls_ssg --log_dir pointnet2_cls_ssg --num_category 10python test_classification.py --log_dir pointnet2_cls_ssg --num_category 10

Performance

ModelAccuracy
PointNet (Official)89.2
PointNet2 (Official)91.9
PointNet (Pytorch without normal)90.6
PointNet (Pytorch with normal)91.4
PointNet2_SSG (Pytorch without normal)92.2
PointNet2_SSG (Pytorch with normal)92.4
PointNet2_MSG (Pytorch with normal)92.8

Part Segmentation (ShapeNet)

Data Preparation

Download alignmentShapeNethere and save indata/shapenetcore_partanno_segmentation_benchmark_v0_normal/.

Run

## Check model in ./models ## e.g., pointnet2_msgpython train_partseg.py --model pointnet2_part_seg_msg --normal --log_dir pointnet2_part_seg_msgpython test_partseg.py --normal --log_dir pointnet2_part_seg_msg

Performance

ModelInctance avg IoUClass avg IoU
PointNet (Official)83.780.4
PointNet2 (Official)85.181.9
PointNet (Pytorch)84.381.1
PointNet2_SSG (Pytorch)84.981.8
PointNet2_MSG (Pytorch)85.482.5

Semantic Segmentation (S3DIS)

Data Preparation

Download 3D indoor parsing dataset (S3DIS)here and save indata/s3dis/Stanford3dDataset_v1.2_Aligned_Version/.

cd data_utilspython collect_indoor3d_data.py

Processed data will save indata/stanford_indoor3d/.

Run

## Check model in ./models ## e.g., pointnet2_ssgpython train_semseg.py --model pointnet2_sem_seg --test_area 5 --log_dir pointnet2_sem_segpython test_semseg.py --log_dir pointnet2_sem_seg --test_area 5 --visual

Visualization results will save inlog/sem_seg/pointnet2_sem_seg/visual/ and you can visualize these .obj file byMeshLab.

Performance

ModelOverall AccClass avg IoUCheckpoint
PointNet (Pytorch)78.943.740.7MB
PointNet2_ssg (Pytorch)83.053.511.2MB

Visualization

Using show3d_balls.py

## build C++ code for visualizationcd visualizerbash build.sh ## run one example python show3d_balls.py

Using MeshLab

Reference By

halimacc/pointnet3
fxia22/pointnet.pytorch
charlesq34/PointNet
charlesq34/PointNet++

Citation

If you find this repo useful in your research, please consider citing it and our other works:

@article{Pytorch_Pointnet_Pointnet2,      Author = {Xu Yan},      Title = {Pointnet/Pointnet++ Pytorch},      Journal = {https://github.com/yanx27/Pointnet_Pointnet2_pytorch},      Year = {2019}}
@InProceedings{yan2020pointasnl,  title={PointASNL: Robust Point Clouds Processing using Nonlocal Neural Networks with Adaptive Sampling},  author={Yan, Xu and Zheng, Chaoda and Li, Zhen and Wang, Sheng and Cui, Shuguang},  journal={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},  year={2020}}
@InProceedings{yan2021sparse,  title={Sparse Single Sweep LiDAR Point Cloud Segmentation via Learning Contextual Shape Priors from Scene Completion},  author={Yan, Xu and Gao, Jiantao and Li, Jie and Zhang, Ruimao, and Li, Zhen and Huang, Rui and Cui, Shuguang},  journal={AAAI Conference on Artificial Intelligence ({AAAI})},  year={2021}}
@InProceedings{yan20222dpass,      title={2DPASS: 2D Priors Assisted Semantic Segmentation on LiDAR Point Clouds},       author={Xu Yan and Jiantao Gao and Chaoda Zheng and Chao Zheng and Ruimao Zhang and Shuguang Cui and Zhen Li},      year={2022},      journal={ECCV}}

Selected Projects using This Codebase

About

PointNet and PointNet++ implemented by pytorch (pure python) and on ModelNet, ShapeNet and S3DIS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp