File Exchange

image thumbnail

Classify point clouds using PointNet(点群深層学習による点​群の分類)

version 1.0.1 (23.1 MB) by Kenta
This demo shows how to classify point clouds using a method using deep learning for PointNet.


Updated 27 Nov 2020

View Version History

View License

This example shows how to train a PointNet [1] network for point cloud classification. Point cloud data is acquired by a variety of sensors, such as lidar, radar, depth cameras, and iPad LiDAR. This example trains a PointNet classifier on 3D point clouds scanned by iPad LiDAR. Since this example just aims to show how to implement PointNet claasifier with MatLab, identical point clouds were trained and tested to classify. Please use your data to explore more. Note that this example is created based on the Matlab official document [2].
この例では、3次元点群を深層学習点群学習の手法(PointNet)によって、分類します。PointNet [1]では、点群を入力として、それのカテゴリーを返します。この例はMATLABの公式ドキュメント [2]を参考に作成しています。iPad LiDARにより取得した点群をサンプルデータとして用います。訓練データやテストデータとなる点群はデータストアと呼ばれるものに格納され、メモリを大きく消費することなく、効率よく学習や検証を行うことができます。ここでは点群用の自作のデータストアを利用します。

[1] Charles, R. Qi, Hao Su, Mo Kaichun, and Leonidas J. Guibas. “PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation.” In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 77–85. Honolulu, HI: IEEE, 2017.
[2] Point Cloud Classification Using PointNet Deep Learning
[3] He, Kaiming, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. “Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification.” In 2015 IEEE International Conference on Computer Vision (ICCV), 1026–34. Santiago, Chile: IEEE, 2015.

Cite As

Kenta (2021). Classify point clouds using PointNet(点群深層学習による点群の分類) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Ry Zen


@Amzar O
Thanks for your update. Oh, ASCII and Binary cannot be mixed up... I will fix it, thanks.

Amzar O

Hi thank you for your input. I managed to run the framework, ASCII and Binary form of PLY data samples can't be mixed up btw.


pls run the code using "Run" or run by section

Amzar O

I was placing this in the command prompt with all the training and testing files already in my directory. I guess it is a helper/local function and can't be run in live script.


>> rng(0)
[G,classes] = findgroups(labels);
numObservations = splitapply(@numel,labels,G);
desiredNumObservationsPerClass = max(numObservations);
for i=1:numel(classes)
if i==1
targetFiles = {dsTrain.Files{1:numObservations(i)}};
targetFiles = {dsTrain.Files{numObservations(i-1)+1:sum(numObservations(1:i))}};
% Randomly replicate the point clouds belonging to the infrequent classes
files = randReplicateFiles(targetFiles,desiredNumObservationsPerClass);
filesOverSample = vertcat(filesOverSample,files');

Do you know how I could apply this for my dataset? Thank you.


@Amzar O
Thanks for your comment. Do you run the code using ctrl+enter or RUN button? The function is a helper function that is in the end of the live script. It returns an error when running the code which includes a helper function using "copy and paste to the command prompt".

Amzar O

Hi, I'm having an error on 'randReplicateFiles' on the Oversampling section. It says 'Unrecognized function or variable'. Do you have a solution?


MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!