How to Implement Grid-GCN for Fast and Scalable Point Cloud Learning

Jul 23, 2023 | Data Science

Welcome to the world of point cloud learning! In this article, we will explore the grid-based Graph Convolutional Network (Grid-GCN) developed for efficiently handling point cloud data. Our focus will be on implementation guidelines specifically using MXNET version 1.5.0, along with data preparation, training, and testing steps. Let’s dive in!

Requirements

Before we start, make sure your environment meets the following requirements:

  • MXNET 1.5.0
  • GCC version compatible with MXNET 1.5.0

Installing CUDA Modules to MXNET Library

To set up Grid-GCN, you need to install CUDA modules to the MXNET library. Follow these steps:

  • Open your terminal and navigate to the gridifyop directory:
  • cd gridifyop
  • Edit the Makefile:
  • vim Makefile
  • Change mx_home to your mxnet-apache directory and adjust the nvcc command according to your GPU model and CUDA version. For instance, use compute power 61 and 75 for GeForce GTX 1080 Ti and 2080 Ti. Save your changes.
  • Go back to the previous directory:
  • cd ..

Data Preparation

Now that your environment is set up, it’s time to prepare your data for classification and segmentation:

Classification

ModelNet40

Refer to the PointNet repository to download ModelNet40:

cd data
wget https://shapenet.cs.stanford.edu/media/modelnet40_ply_hdf5_2048.zip
unzip modelnet40_ply_hdf5_2048.zip

Ensure that this data is placed inside the data directory.

ModelNet10

Here, you can either refer to the PointNet++ GitHub or download modelnet40_normal_resampled:

cd data
wget https://github.com/charlesq34/pointnet2/blob/master/modelnet40_normal_resampled.zip
unzip modelnet40_normal_resampled.zip

Use modelnet10_train.txt and modelnet10_test.txt to extract necessary files, or you can use the normal resampled version directly. Adjust the configuration file configs_10.yaml with new: True - False.

Segmentation

For segmentation, download ScanNet data with PointNet++:

cd data
wget https://shapenet.cs.stanford.edu/media/scannet_data_pointnet2.zip
unzip scannet_data_pointnet2.zip
mv data scannet

Training

Let’s go ahead and train our models:

Classification

ModelNet40

cd classification
nohup python -u train/train_gpu_ggcn_mdl40.py > mdl40.log &

ModelNet10

cd classification
nohup python -u train/train_gpu_ggcn_mdl10.py > mdl10.log &

Segmentation

cd segmentation
# Adjust configs.yaml for model points
nohup python -u train_test/train_ggcn_scannet.py > train.log &

Testing

For testing the segmentation:

cd segmentation
# Adjust configs.yaml and load_model_prefix
nohup python -u train_test/test_ggcn_scannet.py > test.log &

Understanding the Code with an Analogy

Imagine you’re in a vast library, with millions of books representing the point cloud data. Each book has its unique characteristics and structure. The Grid-GCN is like a skilled librarian who organizes and processes the information efficiently.

Just like the librarian sorts books based on various attributes (like genre, author, and language), Grid-GCN organizes the point cloud data by identifying the relationships between points to create a more structured representation that allows for faster learning. Instead of piecing together information from every book independently, the librarian (or Grid-GCN) recognizes patterns and similarities, optimizing the learning process for efficiency.

Troubleshooting

If you encounter issues while implementing Grid-GCN, here are some helpful troubleshooting tips:

  • Ensure your CUDA and MXNET versions are fully compatible.
  • Check that all libraries are properly installed and can be accessed by your Python environment.
  • Verify the paths in the Makefile to confirm they are pointing to the correct directories.
  • If facing any performance issues, consider monitoring GPU utilization and adjusting the batch size accordingly.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox