# Pytorch Implementation of PointNet and PointNet++
This repo is implementation for [PointNet](http://openaccess.thecvf.com/content_cvpr_2017/papers/Qi_PointNet_Deep_Learning_CVPR_2017_paper.pdf) and [PointNet++](http://papers.nips.cc/paper/7095-pointnet-deep-hierarchical-feature-learning-on-point-sets-in-a-metric-space.pdf) in pytorch.
## Update
**2021/03/27:**
(1) Release pre-trained models for semantic segmentation, where PointNet++ can achieve **53.5\%** mIoU.
(2) Release pre-trained models for classification and part segmentation in `log/`.
**2021/03/20:** Update codes for classification, including:
(1) Add codes for training **ModelNet10** 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 achieve **92.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:
```shell
conda install pytorch==1.6.0 cudatoolkit=10.1 -c pytorch
```
## Classification (ModelNet10/40)
### Data Preparation
Download alignment **ModelNet** [here](https://shapenet.cs.stanford.edu/media/modelnet40_normal_resampled.zip) and save in `data/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 data [here](https://drive.google.com/drive/folders/1_fBYbDO3XSdRt3DSbEBe41r5l9YpIGWF?usp=sharing) and save it in `data/modelnet40_normal_resampled/`.
* If you want to train on ModelNet10, you can use `--num_category 10`.
```shell
# ModelNet40
## Select different models in ./models
## e.g., pointnet2_ssg without normal features
python train_classification.py --model pointnet2_cls_ssg --log_dir pointnet2_cls_ssg
python test_classification.py --log_dir pointnet2_cls_ssg
## e.g., pointnet2_ssg with normal features
python train_classification.py --model pointnet2_cls_ssg --use_normals --log_dir pointnet2_cls_ssg_normal
python test_classification.py --use_normals --log_dir pointnet2_cls_ssg_normal
## e.g., pointnet2_ssg with uniform sampling
python train_classification.py --model pointnet2_cls_ssg --use_uniform_sample --log_dir pointnet2_cls_ssg_fps
python 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 features
python train_classification.py --model pointnet2_cls_ssg --log_dir pointnet2_cls_ssg --num_category 10
python test_classification.py --log_dir pointnet2_cls_ssg --num_category 10
```
### Performance
| Model | Accuracy |
|--|--|
| 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 alignment **ShapeNet** [here](https://shapenet.cs.stanford.edu/media/shapenetcore_partanno_segmentation_benchmark_v0_normal.zip) and save in `data/shapenetcore_partanno_segmentation_benchmark_v0_normal/`.
### Run
```
## Check model in ./models
## e.g., pointnet2_msg
python train_partseg.py --model pointnet2_part_seg_msg --normal --log_dir pointnet2_part_seg_msg
python test_partseg.py --normal --log_dir pointnet2_part_seg_msg
```
### Performance
| Model | Inctance avg IoU| Class avg IoU
|--|--|--|
|PointNet (Official) |83.7|80.4
|PointNet2 (Official)|85.1 |81.9
|PointNet (Pytorch)| 84.3 |81.1|
|PointNet2_SSG (Pytorch)| 84.9| 81.8
|PointNet2_MSG (Pytorch)| **85.4**| **82.5**
## Semantic Segmentation (S3DIS)
### Data Preparation
Download 3D indoor parsing dataset (**S3DIS**) [here](http://buildingparser.stanford.edu/dataset.html) and save in `data/s3dis/Stanford3dDataset_v1.2_Aligned_Version/`.
```
cd data_utils
python collect_indoor3d_data.py
```
Processed data will save in `data/stanford_indoor3d/`.
### Run
```
## Check model in ./models
## e.g., pointnet2_ssg
python train_semseg.py --model pointnet2_sem_seg --test_area 5 --log_dir pointnet2_sem_seg
python test_semseg.py --log_dir pointnet2_sem_seg --test_area 5 --visual
```
Visualization results will save in `log/sem_seg/pointnet2_sem_seg/visual/` and you can visualize these .obj file by [MeshLab](http://www.meshlab.net/).
### Performance
|Model | Overall Acc |Class avg IoU | Checkpoint
|--|--|--|--|
| PointNet (Pytorch) | 78.9 | 43.7| [40.7MB](log/sem_seg/pointnet_sem_seg) |
| PointNet2_ssg (Pytorch) | **83.0** | **53.5**| [11.2MB](log/sem_seg/pointnet2_sem_seg) |
## Visualization
### Using show3d_balls.py
```
## build C++ code for visualization
cd visualizer
bash build.sh
## run one example
python show3d_balls.py
```

### Using MeshLab

## Reference By
[halimacc/pointnet3](https://github.com/halimacc/pointnet3)<br>
[fxia22/pointnet.pytorch](https://github.com/fxia22/pointnet.pytorch)<br>
[charlesq34/PointNet](https://github.com/charlesq34/pointnet) <br>
[charlesq34/PointNet++](https://github.com/charlesq34/pointnet2)
## 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
* [PointConv: Deep Convolutional Networks on 3D Point Clouds, CVPR'19](https://github.com/Young98CN/pointconv_pytorch)
* [On Isometry Robustness of Deep 3D Point Cloud Models under Adversarial Attacks, CVPR'20](https://github.com/skywalker6174/3d-isometry-robust)
* [Label-Efficient Learning on Point Clouds using Approximate Convex Decompositions, ECCV'20](https://github.com/matheusgadelha/PointCloudLearningACD)
* [PCT: Point Cloud Transformer](https://github.com/MenghaoGuo/PCT)
* [PSNet: Fast Data Structuring for Hierarchical Deep Learning on Point Cloud](https://github.com/lly007/PointStructuringNet)
* [Stratified Transformer for 3D Point Cloud Segmentation, CVPR'22](https://github.com/dvlab-research/stratified-transformer)
没有合适的资源?快使用搜索试试~ 我知道了~
PointNet和PointNet++的Pytorch实现

共81个文件
py:47个
txt:16个
pth:10个

需积分: 39 45 下载量 38 浏览量
2022-08-31
18:14:08
上传
评论 9
收藏 130.98MB RAR 举报
温馨提示
更新 2021/03/27: (1)发布语义分割的预训练模型,其中PointNet++可以达到53.5%的mIoU。 (2) 发布预训练模型用于分类和部分分割log/。 2021/03/20:更新分类代码,包括: (1) 添加训练ModelNet10数据集的代码。使用--num_category 10. (2) 添加仅在 CPU 上运行的代码。使用--use_cpu. (3) 增加离线数据预处理代码,加速训练。使用--process_data. (4) 添加用于均匀采样训练的代码。使用--use_uniform_sample. 2019/11/26: (1) 修复了之前代码中的一些错误并增加了数据增强技巧。现在只用1024分就可以达到92.8%! (2) 增加了测试代码,包括分类和分割,以及可视化的语义分割。 (3) 将所有模型整理成./models文件,方便使用。
资源详情
资源评论
资源推荐
收起资源包目录






























































































































共 81 条
- 1



























拉姆哥的小屋
- 粉丝: 8439
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 毕设&课设:智慧型报告厅——我的毕业设计项目.zip
- 毕设&课设:智慧校园之家长子系统.,计算机毕业设计,毕设,Java毕业设计,SpringBoot,SSM,小程序.zip
- 中国软件杯赛事中的计算机视觉前端框架
- 【自然语言处理】基于中文分词的文本相似度动态规划算法优化:高效准确的论文防抄袭系统设计与实现(论文复现含详细代码及解释)
- 这篇文章详细介绍了针对室内3D物体检测的主动学习框架,旨在解决室内场景下3D物体检测面临的独特挑战,包括样本少、类别多、类别不平衡严重以及场景类型和类内差异大的问题(论文复现含详细代码及解释)
- 【电力电子与控制工程】基于准PR+改进重复控制的光伏逆变器谐波抑制与动态响应优化:复合控制策略的MATLAB仿真及硬件实现(论文复现含详细代码及解释)
- 机器学习与深度学习 Python实现基于PSO-Transformer粒子群优化算法(PSO)优化Transformer编码器进行多特征分类预测的详细项目实例(含完整的程序,GUI设计和代码详解)
- 【神经网络同步与稳定性】几类比例时滞神经网络的同步性和稳定性研究:理论分析、MATLAB代码复现及应用示例(论文复现含详细代码及解释)
- 详细研究了交错并联Buck变换器的工作原理、性能优势及其仿真实现(论文复现含详细代码及解释)
- 相似性搜索及其应用进展
- 深度学习与计算机视觉:从入门到精通之路详解
- 电力电子交错并联双向Buck/Boost集成LLC谐振型三端口直流变换器设计与仿真:新能源微电网高效功率转换系统(论文复现含详细代码及解释)
- 电力电子交错并联型光伏储能双向DC-DC变换器研究:解决电流不均与提高系统稳定性(论文复现含详细代码及解释)
- 变化检测-基于全卷积孪生网络实现的变化检测算法-附项目源码-优质项目源码.zip
- 基于计算机视觉技术的辅助驾驶软件杯项目
- 2019 年度广东工业大学计算机视觉课程作业
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0