{"id":15032249,"url":"https://github.com/yanx27/pointnet_pointnet2_pytorch","last_synced_at":"2025-04-13T02:00:05.451Z","repository":{"id":37432179,"uuid":"173759577","full_name":"yanx27/Pointnet_Pointnet2_pytorch","owner":"yanx27","description":"PointNet and PointNet++ implemented by pytorch (pure python) and on ModelNet, ShapeNet and S3DIS.","archived":false,"fork":false,"pushed_at":"2024-04-24T17:21:53.000Z","size":70425,"stargazers_count":4055,"open_issues_count":160,"forks_count":941,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-13T01:59:31.350Z","etag":null,"topics":["classification","modelnet","point-cloud","pointcloud","pointnet","pointnet2","pytorch","s3dis","segmentation","shapenet","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yanx27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-04T14:24:30.000Z","updated_at":"2025-04-11T07:14:24.000Z","dependencies_parsed_at":"2022-08-08T20:15:53.160Z","dependency_job_id":"8a279c67-1351-4272-91e0-b6f69feca872","html_url":"https://github.com/yanx27/Pointnet_Pointnet2_pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanx27%2FPointnet_Pointnet2_pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanx27%2FPointnet_Pointnet2_pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanx27%2FPointnet_Pointnet2_pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanx27%2FPointnet_Pointnet2_pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanx27","download_url":"https://codeload.github.com/yanx27/Pointnet_Pointnet2_pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654046,"owners_count":21140235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classification","modelnet","point-cloud","pointcloud","pointnet","pointnet2","pytorch","s3dis","segmentation","shapenet","visualization"],"created_at":"2024-09-24T20:17:49.401Z","updated_at":"2025-04-13T02:00:05.427Z","avatar_url":"https://github.com/yanx27.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pytorch Implementation of PointNet and PointNet++ \n\nThis 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.\n\n## Update\n**2021/03/27:** \n\n(1) Release pre-trained models for semantic segmentation, where PointNet++ can achieve **53.5\\%** mIoU.\n\n(2) Release pre-trained models for classification and part segmentation in `log/`.\n\n**2021/03/20:** Update codes for classification, including:\n\n(1) Add codes for training **ModelNet10** dataset. Using setting of ``--num_category 10``. \n\n(2) Add codes for running on CPU only. Using setting of ``--use_cpu``. \n\n(3) Add codes for offline data preprocessing to accelerate training. Using setting of ``--process_data``. \n\n(4) Add codes for training with uniform sampling. Using setting of ``--use_uniform_sample``. \n\n**2019/11/26:**\n\n(1) Fixed some errors in previous codes and added data augmentation tricks. Now classification by only 1024 points can achieve **92.8\\%**! \n\n(2) Added testing codes, including classification and segmentation, and semantic segmentation with visualization. \n\n(3) Organized all models into `./models` files for easy using.\n\n## Install\nThe latest codes are tested on Ubuntu 16.04, CUDA10.1, PyTorch 1.6 and Python 3.7:\n```shell\nconda install pytorch==1.6.0 cudatoolkit=10.1 -c pytorch\n```\n\n## Classification (ModelNet10/40)\n### Data Preparation\nDownload alignment **ModelNet** [here](https://shapenet.cs.stanford.edu/media/modelnet40_normal_resampled.zip) and save in `data/modelnet40_normal_resampled/`.\n\n### Run\nYou can run different modes with following codes. \n* 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/`.\n* If you want to train on ModelNet10, you can use `--num_category 10`.\n```shell\n# ModelNet40\n## Select different models in ./models \n\n## e.g., pointnet2_ssg without normal features\npython train_classification.py --model pointnet2_cls_ssg --log_dir pointnet2_cls_ssg\npython test_classification.py --log_dir pointnet2_cls_ssg\n\n## e.g., pointnet2_ssg with normal features\npython train_classification.py --model pointnet2_cls_ssg --use_normals --log_dir pointnet2_cls_ssg_normal\npython test_classification.py --use_normals --log_dir pointnet2_cls_ssg_normal\n\n## e.g., pointnet2_ssg with uniform sampling\npython train_classification.py --model pointnet2_cls_ssg --use_uniform_sample --log_dir pointnet2_cls_ssg_fps\npython test_classification.py --use_uniform_sample --log_dir pointnet2_cls_ssg_fps\n\n# ModelNet10\n## Similar setting like ModelNet40, just using --num_category 10\n\n## e.g., pointnet2_ssg without normal features\npython train_classification.py --model pointnet2_cls_ssg --log_dir pointnet2_cls_ssg --num_category 10\npython test_classification.py --log_dir pointnet2_cls_ssg --num_category 10\n```\n\n### Performance\n| Model | Accuracy |\n|--|--|\n| PointNet (Official) |  89.2|\n| PointNet2 (Official) | 91.9 |\n| PointNet (Pytorch without normal) |  90.6|\n| PointNet (Pytorch with normal) |  91.4|\n| PointNet2_SSG (Pytorch without normal) |  92.2|\n| PointNet2_SSG (Pytorch with normal) |  92.4|\n| PointNet2_MSG (Pytorch with normal) |  **92.8**|\n\n## Part Segmentation (ShapeNet)\n### Data Preparation\nDownload 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/`.\n### Run\n```\n## Check model in ./models \n## e.g., pointnet2_msg\npython train_partseg.py --model pointnet2_part_seg_msg --normal --log_dir pointnet2_part_seg_msg\npython test_partseg.py --normal --log_dir pointnet2_part_seg_msg\n```\n### Performance\n| Model | Inctance avg IoU| Class avg IoU \n|--|--|--|\n|PointNet (Official)\t|83.7|80.4\t\n|PointNet2 (Official)|85.1\t|81.9\t\n|PointNet (Pytorch)|\t84.3\t|81.1|\t\n|PointNet2_SSG (Pytorch)|\t84.9|\t81.8\t\n|PointNet2_MSG (Pytorch)|\t**85.4**|\t**82.5**\t\n\n\n## Semantic Segmentation (S3DIS)\n### Data Preparation\nDownload 3D indoor parsing dataset (**S3DIS**) [here](http://buildingparser.stanford.edu/dataset.html)  and save in `data/s3dis/Stanford3dDataset_v1.2_Aligned_Version/`.\n```\ncd data_utils\npython collect_indoor3d_data.py\n```\nProcessed data will save in `data/stanford_indoor3d/`.\n### Run\n```\n## Check model in ./models \n## e.g., pointnet2_ssg\npython train_semseg.py --model pointnet2_sem_seg --test_area 5 --log_dir pointnet2_sem_seg\npython test_semseg.py --log_dir pointnet2_sem_seg --test_area 5 --visual\n```\nVisualization results will save in `log/sem_seg/pointnet2_sem_seg/visual/` and you can visualize these .obj file by [MeshLab](http://www.meshlab.net/).\n\n### Performance\n|Model  | Overall Acc |Class avg IoU | Checkpoint \n|--|--|--|--|\n| PointNet (Pytorch) | 78.9 | 43.7| [40.7MB](log/sem_seg/pointnet_sem_seg) |\n| PointNet2_ssg (Pytorch) | **83.0** | **53.5**| [11.2MB](log/sem_seg/pointnet2_sem_seg) |\n\n## Visualization\n### Using show3d_balls.py\n```\n## build C++ code for visualization\ncd visualizer\nbash build.sh \n## run one example \npython show3d_balls.py\n```\n![](/visualizer/pic.png)\n### Using MeshLab\n![](/visualizer/pic2.png)\n\n\n## Reference By\n[halimacc/pointnet3](https://github.com/halimacc/pointnet3)\u003cbr\u003e\n[fxia22/pointnet.pytorch](https://github.com/fxia22/pointnet.pytorch)\u003cbr\u003e\n[charlesq34/PointNet](https://github.com/charlesq34/pointnet) \u003cbr\u003e\n[charlesq34/PointNet++](https://github.com/charlesq34/pointnet2)\n\n\n## Citation\nIf you find this repo useful in your research, please consider citing it and our other works:\n```\n@article{Pytorch_Pointnet_Pointnet2,\n      Author = {Xu Yan},\n      Title = {Pointnet/Pointnet++ Pytorch},\n      Journal = {https://github.com/yanx27/Pointnet_Pointnet2_pytorch},\n      Year = {2019}\n}\n```\n```\n@InProceedings{yan2020pointasnl,\n  title={PointASNL: Robust Point Clouds Processing using Nonlocal Neural Networks with Adaptive Sampling},\n  author={Yan, Xu and Zheng, Chaoda and Li, Zhen and Wang, Sheng and Cui, Shuguang},\n  journal={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},\n  year={2020}\n}\n```\n```\n@InProceedings{yan2021sparse,\n  title={Sparse Single Sweep LiDAR Point Cloud Segmentation via Learning Contextual Shape Priors from Scene Completion},\n  author={Yan, Xu and Gao, Jiantao and Li, Jie and Zhang, Ruimao, and Li, Zhen and Huang, Rui and Cui, Shuguang},\n  journal={AAAI Conference on Artificial Intelligence ({AAAI})},\n  year={2021}\n}\n```\n```\n@InProceedings{yan20222dpass,\n      title={2DPASS: 2D Priors Assisted Semantic Segmentation on LiDAR Point Clouds}, \n      author={Xu Yan and Jiantao Gao and Chaoda Zheng and Chao Zheng and Ruimao Zhang and Shuguang Cui and Zhen Li},\n      year={2022},\n      journal={ECCV}\n}\n```\n## Selected Projects using This Codebase\n* [PointConv: Deep Convolutional Networks on 3D Point Clouds, CVPR'19](https://github.com/Young98CN/pointconv_pytorch)\n* [On Isometry Robustness of Deep 3D Point Cloud Models under Adversarial Attacks, CVPR'20](https://github.com/skywalker6174/3d-isometry-robust)\n* [Label-Efficient Learning on Point Clouds using Approximate Convex Decompositions, ECCV'20](https://github.com/matheusgadelha/PointCloudLearningACD)\n* [PCT: Point Cloud Transformer](https://github.com/MenghaoGuo/PCT)\n* [PSNet: Fast Data Structuring for Hierarchical Deep Learning on Point Cloud](https://github.com/lly007/PointStructuringNet)\n* [Stratified Transformer for 3D Point Cloud Segmentation, CVPR'22](https://github.com/dvlab-research/stratified-transformer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanx27%2Fpointnet_pointnet2_pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanx27%2Fpointnet_pointnet2_pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanx27%2Fpointnet_pointnet2_pytorch/lists"}