# Pointnet_Pointnet2_pytorch **Repository Path**: professor__yang/Pointnet_Pointnet2_pytorch ## Basic Information - **Project Name**: Pointnet_Pointnet2_pytorch - **Description**: PointNet and PointNet++ implemented by pytorch (pure python) and on ModelNet, ShapeNet and S3DIS. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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 **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. ## Classification ### Data Preparation Download alignment **ModelNet** [here](https://shapenet.cs.stanford.edu/media/modelnet40_normal_resampled.zip) and save in `data/modelnet40_normal_resampled/`. ### Run ``` ## Check model in ./models ## E.g. pointnet2_msg python train_cls.py --model pointnet2_cls_msg --normal --log_dir pointnet2_cls_msg python test_cls.py --normal --log_dir pointnet2_cls_msg ``` ### 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 ### 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 ### Data Preparation Download 3D indoor parsing dataset (**S3DIS**) [here](http://buildingparser.stanford.edu/dataset.html) and save in `data/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 on sub-points of raw dataset (processed by official PointNet [Link](https://shapenet.cs.stanford.edu/media/indoor3d_sem_seg_hdf5_data.zip)) |Model | Class avg IoU | |--|--| | PointNet (Official) | 41.1| | PointNet (Pytorch) | 48.9| | PointNet2 (Official) |N/A | | PointNet2_ssg (Pytorch) | **53.2**| ### Performance on raw dataset still on testing... ## Visualization ### Using show3d_balls.py ``` ## build C++ code for visualization cd visualizer bash build.sh ## run one example python show3d_balls.py ``` ![](/visualizer/pic.png) ### Using MeshLab ![](/visualizer/pic2.png) ## Reference By [halimacc/pointnet3](https://github.com/halimacc/pointnet3)
[fxia22/pointnet.pytorch](https://github.com/fxia22/pointnet.pytorch)
[charlesq34/PointNet](https://github.com/charlesq34/pointnet)
[charlesq34/PointNet++](https://github.com/charlesq34/pointnet2) ## Environments Ubuntu 16.04
Python 3.6.7
Pytorch 1.1.0