In this repository, we will implement the PointNet architecture for point clouds classification. This architecture was introduced in the paper titled PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation by Charles R. Qi, et al at the Neural Information Processing Systems (NeurIPS) conference in 2016.
This project is for learning purposes. The code I used in this repository is heavily based on the post by Keras Team (David Griffiths) in this notebook and web page.
We use the Princeton 3D Shapenets data of 10 classes (ModelNet10) which consists of daily objects such as chair, table, and plane. The link to the dataset can be found here.
Dataset: 3D Shapenets (ModelNet10)
- Size: 4.9k samples
- Classes: 10
- Download Link: [3D Shapenets Dataset](https://3dshapenets.cs.princeton.edu/)
PointNet is a neural network architecture designed for processing and analyzing point clouds. It employs a shared multi-layer perceptron (MLP) to process each point independently to capture local features. It also introduces a symmetric function to aggregate information from all points, ensuring the network is permutation-invariant, meaning it produces the same output regardless of the order of input points. Figure 1 displays the PointNet architecture diagram.
PointNet is effective in recognizing and classifying objects in 3D space. It is used for tasks like segmentation and classification, as shown by Figure 2.
-
First, you need to clone the repository:
git clone https://github.com/arief25ramadhan/pointnet-classification.git cd pointnet-classification
-
Then, install dependencies:
pip install -r requirements.txt
- Visit this link to download the dataset, and press the download button of the ModelNet10.zip.
- Extract the downloaded zip file.
- Define your dataset folder path in the dataset.py file.
To train the model, run this command:
python train.py
Once you have the dataset and trained model, you can perform inference by running:
python inference.py
Make sure you define the model path and test path correctly.
After training the model for 20 epochs, the models achieved an accuracy of 80% on the validation set. Note that this project is only for learning purposes. Creating the most accurate model, which requires a lot of tuning and training, is not our priority. Visually, the inference result of the model is shown by Figure 3 below.
-
Qi, Charles R., et al. "Pointnet: Deep learning on point sets for 3d classification and segmentation." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2017.
-
Original notebook by David Griffiths: https://colab.research.google.com/github/keras-team/keras-io/blob/master/examples/vision/ipynb/pointnet.ipynb#scrollTo=GqHrVYP5bQKn
-
Original tutorial by David Griffiths: https://keras.io/examples/vision/pointnet/