{"id":13444153,"url":"https://github.com/isl-org/Open3D-PointNet2-Semantic3D","last_synced_at":"2025-03-20T18:31:16.691Z","repository":{"id":37515290,"uuid":"156669119","full_name":"isl-org/Open3D-PointNet2-Semantic3D","owner":"isl-org","description":"Semantic3D segmentation with Open3D and PointNet++","archived":true,"fork":false,"pushed_at":"2024-07-29T21:00:05.000Z","size":1509,"stargazers_count":509,"open_issues_count":40,"forks_count":113,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-10-28T08:39:32.941Z","etag":null,"topics":["classification","open3d","point-cloud","pointnet","pointnet2","tensorflow"],"latest_commit_sha":null,"homepage":"","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/isl-org.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":"2018-11-08T07:45:26.000Z","updated_at":"2024-10-22T09:58:21.000Z","dependencies_parsed_at":"2024-10-28T06:51:50.837Z","dependency_job_id":"bbd3ee0a-efd5-4fb9-8e47-008d0b7c5847","html_url":"https://github.com/isl-org/Open3D-PointNet2-Semantic3D","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isl-org%2FOpen3D-PointNet2-Semantic3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isl-org%2FOpen3D-PointNet2-Semantic3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isl-org%2FOpen3D-PointNet2-Semantic3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isl-org%2FOpen3D-PointNet2-Semantic3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isl-org","download_url":"https://codeload.github.com/isl-org/Open3D-PointNet2-Semantic3D/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244670092,"owners_count":20490916,"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","open3d","point-cloud","pointnet","pointnet2","tensorflow"],"created_at":"2024-07-31T03:02:20.434Z","updated_at":"2025-03-20T18:31:16.384Z","avatar_url":"https://github.com/isl-org.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## Moved to https://github.com/isl-org/Open3D-ML\n\n# Semantic3D semantic segmentation with Open3D and PointNet++\n\n## Intro\n\nDemo project for Semantic3D (semantic-8) segmentation with\n[Open3D](https://github.com/IntelVCL/Open3D) and PointNet++. The\npurpose of this project is to showcase the usage of Open3D in deep learning pipelines\nand provide a clean baseline implementation for semantic segmentation on Semantic3D\ndataset.  Here's\n[our entry](http://www.semantic3d.net/view_method_detail.php?method=PointNet2_Demo)\non the semantic-8 test benchmark page.\n\n\n[Open3D](https://github.com/IntelVCL/Open3D) is an open-source library that supports\nrapid development of software that deals with 3D data. The Open3D frontend exposes a\nset of carefully selected data structures and algorithms in both C++ and Python. The\nbackend is highly optimized and is set up for parallelization. We welcome contributions\nfrom the open-source community.\n\nIn this project, Open3D was used for\n- Point cloud data loading, writing, and visualization. Open3D provides efficient\n  implementations of various point cloud manipulation methods.\n- Data pre-processing, in particular, voxel-based down-sampling.\n- Point cloud interpolation, in particular, fast nearest neighbor search for label\n  interpolation.\n- And more.\n\nThis project is forked from Mathieu Orhan and Guillaume Dekeyser's\n[repo](https://github.com/mathieuorhan/pointnet2_semantic), which, is forked\nfrom the original [PointNet2](https://github.com/charlesq34/pointnet2). We thank the\noriginal authors for sharing their methods.\n\n## Usage\n\n### 1. Download\n\nDownload the dataset [Semantic3D](http://www.semantic3d.net/view_dbase.php) and extract it by running the following commands: \n\n`cd dataset/semantic_raw`.\n\n`bash download_semantic3d.sh`.\n\n```shell\nOpen3D-PointNet2-Semantic3D/dataset/semantic_raw\n├── bildstein_station1_xyz_intensity_rgb.labels\n├── bildstein_station1_xyz_intensity_rgb.txt\n├── bildstein_station3_xyz_intensity_rgb.labels\n├── bildstein_station3_xyz_intensity_rgb.txt\n├── ...\n```\n\n### 2. Convert txt to pcd file\n\nRun\n\n```shell\npython preprocess.py\n```\n\nOpen3D is able to read `.pcd` files much more efficiently.\n\n```shell\nOpen3D-PointNet2-Semantic3D/dataset/semantic_raw\n├── bildstein_station1_xyz_intensity_rgb.labels\n├── bildstein_station1_xyz_intensity_rgb.pcd (new)\n├── bildstein_station1_xyz_intensity_rgb.txt\n├── bildstein_station3_xyz_intensity_rgb.labels\n├── bildstein_station3_xyz_intensity_rgb.pcd (new)\n├── bildstein_station3_xyz_intensity_rgb.txt\n├── ...\n```\n\n### 3. Downsample\n\nRun\n\n```shell\npython downsample.py\n```\n\nThe downsampled dataset will be written to `dataset/semantic_downsampled`. Points with\nlabel 0 (unlabled) are excluded during downsampling.\n\n```shell\nOpen3D-PointNet2-Semantic3D/dataset/semantic_downsampled\n├── bildstein_station1_xyz_intensity_rgb.labels\n├── bildstein_station1_xyz_intensity_rgb.pcd\n├── bildstein_station3_xyz_intensity_rgb.labels\n├── bildstein_station3_xyz_intensity_rgb.pcd\n├── ...\n```\n\n### 4. Compile TF Ops\nWe need to build TF kernels in `tf_ops`. First, activate the virtualenv and make\nsure TF can be found with current python. The following line shall run without\nerror.\n\n```shell\npython -c \"import tensorflow as tf\"\n```\n\nThen build TF ops. You'll need CUDA and CMake 3.8+.\n\n```shell\ncd tf_ops\nmkdir build\ncd build\ncmake ..\nmake\n```\n\nAfter compilation the following `.so` files shall be in the `build` directory.\n\n```shell\nOpen3D-PointNet2-Semantic3D/tf_ops/build\n├── libtf_grouping.so\n├── libtf_interpolate.so\n├── libtf_sampling.so\n├── ...\n```\n\nVerify that that the TF kernels are working by running\n\n```shell\ncd .. # Now we're at Open3D-PointNet2-Semantic3D/tf_ops\npython test_tf_ops.py\n```\n\n### 5. Train\n\nRun\n\n```shell\npython train.py\n```\n\nBy default, the training set will be used for training and the validation set\nwill be used for validation. To train with both training and validation set,\nuse the `--train_set=train_full` flag. Checkpoints will be output to\n`log/semantic`.\n\n### 6. Predict\n\nPick a checkpoint and run the `predict.py` script. The prediction dataset is\nconfigured by `--set`. Since PointNet2 only takes a few thousand points per\nforward pass, we need to sample from the prediction dataset multiple times to\nget a good coverage of the points. Each sample contains the few thousand points\nrequired by PointNet2. To specify the number of such samples per scene, use the\n`--num_samples` flag.\n\n```shell\npython predict.py --ckpt log/semantic/best_model_epoch_040.ckpt \\\n                  --set=validation \\\n                  --num_samples=500\n```\n\nThe prediction results will be written to `result/sparse`.\n\n```\nOpen3D-PointNet2-Semantic3D/result/sparse\n├── sg27_station4_intensity_rgb.labels\n├── sg27_station4_intensity_rgb.pcd\n├── sg27_station5_intensity_rgb.labels\n├── sg27_station5_intensity_rgb.pcd\n├── ...\n```\n\n### 7. Interpolate\n\nThe last step is to interpolate the sparse prediction to the full point cloud.\nWe use Open3D's K-NN hybrid search with specified radius.\n\n```shell\npython interpolate.py\n```\n\nThe prediction results will be written to `result/dense`.\n\n```shell\nOpen3D-PointNet2-Semantic3D/result/dense\n├── sg27_station4_intensity_rgb.labels\n├── sg27_station5_intensity_rgb.labels\n├── ...\n```\n\n### 8. Submission\n\nFinally, if you're submitting to Semantic3D benchmark, we've included a handy\ntools to rename the submission file names.\n\n```shell\npython renamer.py\n```\n\n### Summary of directories\n\n- `dataset/semantic_raw`: Raw Semantic3D data, .txt and .labels files. Also contains the\n  .pcd file generated by `preprocess.py`.\n- `dataset/semantic_downsampled`: Generated from `downsample.py`. Downsampled data,\n   contains .pcd and .labels files.\n- `result/sparse`: Generated from `predict.py`. Sparse predictions, contains .pcd and\n   .labels files.\n- `result/dense`: Dense predictions, contains .labels files.\n- `result/dense_label_colorized`: Dense predictions with points colored by label type.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisl-org%2FOpen3D-PointNet2-Semantic3D","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisl-org%2FOpen3D-PointNet2-Semantic3D","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisl-org%2FOpen3D-PointNet2-Semantic3D/lists"}