All Projects → intel-isl → Open3d Pointnet2 Semantic3d

intel-isl / Open3d Pointnet2 Semantic3d

Licence: other
Semantic3D segmentation with Open3D and PointNet++

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Open3d Pointnet2 Semantic3d

Pointnet
PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation
Stars: ✭ 3,517 (+928.36%)
Mutual labels:  classification, point-cloud
Pointnet Keras
Keras implementation for Pointnet
Stars: ✭ 110 (-67.84%)
Mutual labels:  classification, point-cloud
Pointcnn
PointCNN: Convolution On X-Transformed Points (NeurIPS 2018)
Stars: ✭ 1,120 (+227.49%)
Mutual labels:  classification, point-cloud
Grid Gcn
Grid-GCN for Fast and Scalable Point Cloud Learning
Stars: ✭ 143 (-58.19%)
Mutual labels:  classification, point-cloud
Pointnet2
PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space
Stars: ✭ 2,197 (+542.4%)
Mutual labels:  classification, point-cloud
Point2Sequence
Point2Sequence: Learning the Shape Representation of 3D Point Clouds with an Attention-based Sequence to Sequence Network
Stars: ✭ 34 (-90.06%)
Mutual labels:  point-cloud, classification
Pointclouddatasets
3D point cloud datasets in HDF5 format, containing uniformly sampled 2048 points per shape.
Stars: ✭ 80 (-76.61%)
Mutual labels:  classification, point-cloud
Dgcnn.pytorch
A PyTorch implementation of Dynamic Graph CNN for Learning on Point Clouds (DGCNN)
Stars: ✭ 153 (-55.26%)
Mutual labels:  classification, point-cloud
Pointasnl
PointASNL: Robust Point Clouds Processing using Nonlocal Neural Networks with Adaptive Sampling (CVPR 2020)
Stars: ✭ 159 (-53.51%)
Mutual labels:  classification, point-cloud
3d Pointcloud
Papers and Datasets about Point Cloud.
Stars: ✭ 179 (-47.66%)
Mutual labels:  classification, point-cloud
sp segmenter
Superpixel-based semantic segmentation, with object pose estimation and tracking. Provided as a ROS package.
Stars: ✭ 33 (-90.35%)
Mutual labels:  point-cloud, classification
Pywick
High-level batteries-included neural network training library for Pytorch
Stars: ✭ 320 (-6.43%)
Mutual labels:  classification
Lidr
R package for airborne LiDAR data manipulation and visualisation for forestry application
Stars: ✭ 310 (-9.36%)
Mutual labels:  point-cloud
Mlstm Fcn
Multivariate LSTM Fully Convolutional Networks for Time Series Classification
Stars: ✭ 309 (-9.65%)
Mutual labels:  classification
Adversarial autoencoder
A wizard's guide to Adversarial Autoencoders
Stars: ✭ 339 (-0.88%)
Mutual labels:  classification
Malheur
A Tool for Automatic Analysis of Malware Behavior
Stars: ✭ 313 (-8.48%)
Mutual labels:  classification
Go Deep
Artificial Neural Network
Stars: ✭ 303 (-11.4%)
Mutual labels:  classification
So Net
SO-Net: Self-Organizing Network for Point Cloud Analysis, CVPR2018
Stars: ✭ 297 (-13.16%)
Mutual labels:  point-cloud
Pycaret
An open-source, low-code machine learning library in Python
Stars: ✭ 4,594 (+1243.27%)
Mutual labels:  classification
Pointmvsnet
Code for "Point-based Multi-view Stereo Network" (ICCV 2019 Oral) & "Visibility-aware Point-based Multi-view Stereo Network" (TPAMI)
Stars: ✭ 339 (-0.88%)
Mutual labels:  point-cloud

Semantic3D semantic segmentation with Open3D and PointNet++

Intro

Demo project for Semantic3D (semantic-8) segmentation with Open3D and PointNet++. The purpose of this project is to showcase the usage of Open3D in deep learning pipelines and provide a clean baseline implementation for semantic segmentation on Semantic3D dataset. Here's our entry on the semantic-8 test benchmark page.

Open3D is an open-source library that supports rapid development of software that deals with 3D data. The Open3D frontend exposes a set of carefully selected data structures and algorithms in both C++ and Python. The backend is highly optimized and is set up for parallelization. We welcome contributions from the open-source community.

In this project, Open3D was used for

  • Point cloud data loading, writing, and visualization. Open3D provides efficient implementations of various point cloud manipulation methods.
  • Data pre-processing, in particular, voxel-based down-sampling.
  • Point cloud interpolation, in particular, fast nearest neighbor search for label interpolation.
  • And more.

This project is forked from Mathieu Orhan and Guillaume Dekeyser's repo, which, is forked from the original PointNet2. We thank the original authors for sharing their methods.

Usage

1. Download

Download the dataset Semantic3D and extract it by running the following commands:

cd dataset/semantic_raw.

bash download_semantic3d.sh.

Open3D-PointNet2-Semantic3D/dataset/semantic_raw
├── bildstein_station1_xyz_intensity_rgb.labels
├── bildstein_station1_xyz_intensity_rgb.txt
├── bildstein_station3_xyz_intensity_rgb.labels
├── bildstein_station3_xyz_intensity_rgb.txt
├── ...

2. Convert txt to pcd file

Run

python preprocess.py

Open3D is able to read .pcd files much more efficiently.

Open3D-PointNet2-Semantic3D/dataset/semantic_raw
├── bildstein_station1_xyz_intensity_rgb.labels
├── bildstein_station1_xyz_intensity_rgb.pcd (new)
├── bildstein_station1_xyz_intensity_rgb.txt
├── bildstein_station3_xyz_intensity_rgb.labels
├── bildstein_station3_xyz_intensity_rgb.pcd (new)
├── bildstein_station3_xyz_intensity_rgb.txt
├── ...

3. Downsample

Run

python downsample.py

The downsampled dataset will be written to dataset/semantic_downsampled. Points with label 0 (unlabled) are excluded during downsampling.

Open3D-PointNet2-Semantic3D/dataset/semantic_downsampled
├── bildstein_station1_xyz_intensity_rgb.labels
├── bildstein_station1_xyz_intensity_rgb.pcd
├── bildstein_station3_xyz_intensity_rgb.labels
├── bildstein_station3_xyz_intensity_rgb.pcd
├── ...

4. Compile TF Ops

We need to build TF kernels in tf_ops. First, activate the virtualenv and make sure TF can be found with current python. The following line shall run without error.

python -c "import tensorflow as tf"

Then build TF ops. You'll need CUDA and CMake 3.8+.

cd tf_ops
mkdir build
cd build
cmake ..
make

After compilation the following .so files shall be in the build directory.

Open3D-PointNet2-Semantic3D/tf_ops/build
├── libtf_grouping.so
├── libtf_interpolate.so
├── libtf_sampling.so
├── ...

Verify that that the TF kernels are working by running

cd .. # Now we're at Open3D-PointNet2-Semantic3D/tf_ops
python test_tf_ops.py

5. Train

Run

python train.py

By default, the training set will be used for training and the validation set will be used for validation. To train with both training and validation set, use the --train_set=train_full flag. Checkpoints will be output to log/semantic.

6. Predict

Pick a checkpoint and run the predict.py script. The prediction dataset is configured by --set. Since PointNet2 only takes a few thousand points per forward pass, we need to sample from the prediction dataset multiple times to get a good coverage of the points. Each sample contains the few thousand points required by PointNet2. To specify the number of such samples per scene, use the --num_samples flag.

python predict.py --ckpt log/semantic/best_model_epoch_040.ckpt \
                  --set=validation \
                  --num_samples=500

The prediction results will be written to result/sparse.

Open3D-PointNet2-Semantic3D/result/sparse
├── sg27_station4_intensity_rgb.labels
├── sg27_station4_intensity_rgb.pcd
├── sg27_station5_intensity_rgb.labels
├── sg27_station5_intensity_rgb.pcd
├── ...

7. Interpolate

The last step is to interpolate the sparse prediction to the full point cloud. We use Open3D's K-NN hybrid search with specified radius.

python interpolate.py

The prediction results will be written to result/dense.

Open3D-PointNet2-Semantic3D/result/dense
├── sg27_station4_intensity_rgb.labels
├── sg27_station5_intensity_rgb.labels
├── ...

8. Submission

Finally, if you're submitting to Semantic3D benchmark, we've included a handy tools to rename the submission file names.

python renamer.py

Summary of directories

  • dataset/semantic_raw: Raw Semantic3D data, .txt and .labels files. Also contains the .pcd file generated by preprocess.py.
  • dataset/semantic_downsampled: Generated from downsample.py. Downsampled data, contains .pcd and .labels files.
  • result/sparse: Generated from predict.py. Sparse predictions, contains .pcd and .labels files.
  • result/dense: Dense predictions, contains .labels files.
  • result/dense_label_colorized: Dense predictions with points colored by label type.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].