{"id":13444161,"url":"https://github.com/charlesq34/pointnet2","last_synced_at":"2025-05-15T05:07:05.593Z","repository":{"id":38239924,"uuid":"101954297","full_name":"charlesq34/pointnet2","owner":"charlesq34","description":"PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space","archived":false,"fork":false,"pushed_at":"2022-08-26T00:39:24.000Z","size":650,"stargazers_count":3330,"open_issues_count":182,"forks_count":914,"subscribers_count":70,"default_branch":"master","last_synced_at":"2025-05-07T20:18:09.833Z","etag":null,"topics":["3d-shape","classification","deep-learning","point-cloud","segmentation"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charlesq34.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}},"created_at":"2017-08-31T03:18:54.000Z","updated_at":"2025-05-07T11:51:08.000Z","dependencies_parsed_at":"2022-07-12T01:31:11.205Z","dependency_job_id":null,"html_url":"https://github.com/charlesq34/pointnet2","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/charlesq34%2Fpointnet2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesq34%2Fpointnet2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesq34%2Fpointnet2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesq34%2Fpointnet2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charlesq34","download_url":"https://codeload.github.com/charlesq34/pointnet2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"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":["3d-shape","classification","deep-learning","point-cloud","segmentation"],"created_at":"2024-07-31T03:02:20.640Z","updated_at":"2025-05-15T05:07:00.582Z","avatar_url":"https://github.com/charlesq34.png","language":"Python","readme":"### PointNet++: *Deep Hierarchical Feature Learning on Point Sets in a Metric Space*\nCreated by \u003ca href=\"http://charlesrqi.com\" target=\"_blank\"\u003eCharles R. Qi\u003c/a\u003e, \u003ca href=\"http://stanford.edu/~ericyi\"\u003eLi (Eric) Yi\u003c/a\u003e, \u003ca href=\"http://ai.stanford.edu/~haosu/\" target=\"_blank\"\u003eHao Su\u003c/a\u003e, \u003ca href=\"http://geometry.stanford.edu/member/guibas/\" target=\"_blank\"\u003eLeonidas J. Guibas\u003c/a\u003e from Stanford University.\n\n![prediction example](https://github.com/charlesq34/pointnet2/blob/master/doc/teaser.jpg)\n\n### Citation\nIf you find our work useful in your research, please consider citing:\n\n        @article{qi2017pointnetplusplus,\n          title={PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space},\n          author={Qi, Charles R and Yi, Li and Su, Hao and Guibas, Leonidas J},\n          journal={arXiv preprint arXiv:1706.02413},\n          year={2017}\n        }\n\n### Introduction\nThis work is based on our NIPS'17 paper. You can find arXiv version of the paper \u003ca href=\"https://arxiv.org/pdf/1706.02413.pdf\"\u003ehere\u003c/a\u003e or check \u003ca href=\"http://stanford.edu/~rqi/pointnet2\"\u003eproject webpage\u003c/a\u003e for a quick overview. PointNet++ is a follow-up project that builds on and extends \u003ca href=\"https://github.com/charlesq34/pointnet\"\u003ePointNet\u003c/a\u003e. It is version 2.0 of the PointNet architecture.\n\nPointNet (the v1 model) either transforms features of *individual points* independently or process global features of the *entire point set*. However, in many cases there are well defined distance metrics such as Euclidean distance for 3D point clouds collected by 3D sensors or geodesic distance for manifolds like isometric shape surfaces. In PointNet++ we want to respect *spatial localities* of those point sets. PointNet++ learns hierarchical features with increasing scales of contexts, just like that in convolutional neural networks. Besides, we also observe one challenge that is not present in convnets (with images) -- non-uniform densities in natural point clouds. To deal with those non-uniform densities, we further propose special layers that are able to intelligently aggregate information from different scales.\n\nIn this repository we release code and data for our PointNet++ classification and segmentation networks as well as a few utility scripts for training, testing and data processing and visualization.\n\n### Installation\n\nInstall \u003ca href=\"https://www.tensorflow.org/install/\"\u003eTensorFlow\u003c/a\u003e. The code is tested under TF1.2 GPU version and Python 2.7 (version 3 should also work) on Ubuntu 14.04. There are also some dependencies for a few Python libraries for data processing and visualizations like `cv2`, `h5py` etc. It's highly recommended that you have access to GPUs.\n\n#### Compile Customized TF Operators\nThe TF operators are included under `tf_ops`, you need to compile them (check `tf_xxx_compile.sh` under each ops subfolder) first. Update `nvcc` and `python` path if necessary. The code is tested under TF1.2.0. If you are using earlier version it's possible that you need to remove the `-D_GLIBCXX_USE_CXX11_ABI=0` flag in g++ command in order to compile correctly.\n\nTo compile the operators in TF version \u003e=1.4, you need to modify the compile scripts slightly.\n\nFirst, find Tensorflow include and library paths.\n\n        TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')\n        TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')\n        \nThen, add flags of `-I$TF_INC/external/nsync/public -L$TF_LIB -ltensorflow_framework` to the `g++` commands.\n\n### Usage\n\n#### Shape Classification\n\nTo train a PointNet++ model to classify ModelNet40 shapes (using point clouds with XYZ coordinates):\n\n        python train.py\n\nTo see all optional arguments for training:\n\n        python train.py -h\n\nIf you have multiple GPUs on your machine, you can also run the multi-GPU version training (our implementation is similar to the tensorflow \u003ca href=\"https://github.com/tensorflow/models/tree/master/tutorials/image/cifar10\"\u003ecifar10 tutorial\u003c/a\u003e):\n\n        CUDA_VISIBLE_DEVICES=0,1 python train_multi_gpu.py --num_gpus 2\n\nAfter training, to evaluate the classification accuracies (with optional multi-angle voting):\n\n        python evaluate.py --num_votes 12 \n\n\u003ci\u003eSide Note:\u003c/i\u003e For the XYZ+normal experiment reported in our paper: (1) 5000 points are used and (2) a further random data dropout augmentation is used during training (see commented line after `augment_batch_data` in `train.py` and (3) the model architecture is updated such that the `nsample=128` in the first two set abstraction levels, which is suited for the larger point density in 5000-point samplings.\n\nTo use normal features for classification: You can get our sampled point clouds of ModelNet40 (XYZ and normal from mesh, 10k points per shape) \u003ca href=\"https://shapenet.cs.stanford.edu/media/modelnet40_normal_resampled.zip\"\u003ehere (1.6GB)\u003c/a\u003e. Move the uncompressed data folder to `data/modelnet40_normal_resampled`\n\n#### Object Part Segmentation\n\nTo train a model to segment object parts for ShapeNet models:\n\n        cd part_seg\n        python train.py\n\nPreprocessed ShapeNetPart dataset (XYZ, normal and part labels) can be found \u003ca href=\"https://shapenet.cs.stanford.edu/media/shapenetcore_partanno_segmentation_benchmark_v0_normal.zip\"\u003ehere (674MB)\u003c/a\u003e. Move the uncompressed data folder to `data/shapenetcore_partanno_segmentation_benchmark_v0_normal`\n\n#### Semantic Scene Parsing\n\nSee `scannet/README` and `scannet/train.py` for details.\n\n#### Visualization Tools\nWe have provided a handy point cloud visualization tool under `utils`. Run `sh compile_render_balls_so.sh` to compile it and then you can try the demo with `python show3d_balls.py` The original code is from \u003ca href=\"http://github.com/fanhqme/PointSetGeneration\"\u003ehere\u003c/a\u003e.\n\n#### Prepare Your Own Data\nYou can refer to \u003ca href=\"https://github.com/charlesq34/3dmodel_feature/blob/master/io/write_hdf5.py\"\u003ehere\u003c/a\u003e on how to prepare your own HDF5 files for either classification or segmentation. Or you can refer to `modelnet_dataset.py` on how to read raw data files and prepare mini-batches from them. A more advanced way is to use TensorFlow's dataset APIs, for which you can find more documentations \u003ca href=\"https://www.tensorflow.org/programmers_guide/datasets\"\u003ehere\u003c/a\u003e.\n\n### License\nOur code is released under MIT License (see LICENSE file for details).\n\n### Updates\n* 02/23/2018: Added support for multi-gpu training for the classification task.\n* 02/23/2018: Adopted a new way for data loading. No longer require manual data downloading to train a classification network.\n* 02/06/2018: Added sample training code for ScanNet semantic segmentation.\n\n### Related Projects\n\n* \u003ca href=\"http://stanford.edu/~rqi/pointnet\" target=\"_blank\"\u003ePointNet: Deep Learning on Point Sets for 3D Classification and Segmentation\u003c/a\u003e by Qi et al. (CVPR 2017 Oral Presentation). Code and data released in \u003ca href=\"https://github.com/charlesq34/pointnet\"\u003eGitHub\u003c/a\u003e.\n* \u003ca href=\"https://arxiv.org/abs/1711.08488\" target=\"_blank\"\u003eFrustum PointNets for 3D Object Detection from RGB-D Data\u003c/a\u003e by Qi et al. (CVPR 2018) A novel framework for 3D object detection with RGB-D data. Based on 2D boxes from a 2D object detector on RGB images, we extrude the depth maps in 2D boxes to point clouds in 3D space and then realize instance segmentation and 3D bounding box estimation using PointNet/PointNet++. The method proposed has achieved first place on KITTI 3D object detection benchmark on all categories (last checked on 11/30/2017). Code and data release TBD.\n","funding_links":[],"categories":["Python","🚀 Getting Started","3DVision"],"sub_categories":["For Researchers","3D SemanticSeg"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesq34%2Fpointnet2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesq34%2Fpointnet2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesq34%2Fpointnet2/lists"}