此存储库是Pytorch中PointNet和PointNet ++的实现。
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文件中,以便于使用。
最新代码在Ubuntu 16.04,Cuda10.1,Pytorch 1.6和Python 3.7上进行了测试:
conda install pytorch==1.6.0 cudatoolkit=10.1 -c pytorch在此处下载Alignment ModelNet并保存在data/modelnet40_normal_resampled/ 。
您可以使用以下代码运行不同的模式。
--process_data 。您可以在此处下载预处理数据,然后将其保存在data/modelnet40_normal_resampled/ 。--num_category 10 。 # 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| 模型 | 准确性 |
|---|---|
| Pointnet(官方) | 89.2 |
| PointNet2(官方) | 91.9 |
| 点网(没有正常的pytorch) | 90.6 |
| PointNet(pytorch at an Formal) | 91.4 |
| pointnet2_ssg(pytorch没有正常) | 92.2 |
| pointnet2_ssg(pytorch的正常) | 92.4 |
| pointnet2_msg(pytorch的正常) | 92.8 |
在此处下载对齐塑形并保存在data/shapenetcore_partanno_segmentation_benchmark_v0_normal/ 。
## 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
| 模型 | 不可能的avg iou | avg class iou |
|---|---|---|
| Pointnet(官方) | 83.7 | 80.4 |
| PointNet2(官方) | 85.1 | 81.9 |
| Pointnet(Pytorch) | 84.3 | 81.1 |
| pointnet2_ssg(pytorch) | 84.9 | 81.8 |
| pointnet2_msg(pytorch) | 85.4 | 82.5 |
在此处下载3D室内解析数据集( S3DIS ),然后保存在data/s3dis/Stanford3dDataset_v1.2_Aligned_Version/ 。
cd data_utils
python collect_indoor3d_data.py
处理后的数据将保存在data/stanford_indoor3d/ 。
## 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
可视化结果将保存在log/sem_seg/pointnet2_sem_seg/visual/中,您可以通过meshlab可视化这些.obj文件。
| 模型 | 总体ACC | avg class iou | 检查点 |
|---|---|---|---|
| Pointnet(Pytorch) | 78.9 | 43.7 | 40.7MB |
| pointnet2_ssg(pytorch) | 83.0 | 53.5 | 11.2MB |
## build C++ code for visualization
cd visualizer
bash build.sh
## run one example
python show3d_balls.py


halimacc/pointnet3
fxia22/pointnet.pytorch
charlesq34/pointnet
charlesq34/pointnet ++
如果您发现此存储库对您的研究有用,请考虑引用它和我们的其他作品:
@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}
}