目录

PCT_jittor

A Jittor implementation of Point Cloud Transformer (PCT) for ModelNet40 classification.

Introduction

This repository provides a clean and efficient implementation of the Point Cloud Transformer (PCT) framework using Jittor, a high-performance deep learning framework. The model is designed for 3D point cloud classification tasks and is evaluated on the standard ModelNet40 dataset.

Environment Requirements

To run this project, you need to set up a Python environment with Jittor installed. For detailed Jittor installation instructions, please refer to the official tutorial.

  • Python >= 3.8
  • GCC >= 11 (For Jittor JIT compilation)
  • Jittor >= 1.3.10

Dataset

This project uses the ModelNet40 dataset. You can download the required dataset files from this link. Please download categories.txt, train_points.npy, train_labels.npy, test_points.npy and place them in the ./data/ directory.

Pipeline & Implementation Details

The codebase encompasses dataset loading, PCT model definition, training, model saving, and exporting test set prediction results.

  • Training Process: During training, we iterate through the point cloud samples and their corresponding category labels in the training set. The point cloud tensors are reshaped to (B, 3, N) before being fed into the network. After the forward pass, the network outputs logits for 40 categories. The classification error is calculated using the cross-entropy loss function, followed by backpropagation to update the model parameters. The optimizer used is SGD, combined with a cosine annealing learning rate scheduling strategy.
  • Inference & Evaluation: Once training is complete, the program saves the model parameters as pct_model.pkl. Subsequently, the trained model is used to predict the test set point clouds. The prediction results are exported and saved into a result.json file, formatted as a mapping dictionary from sample IDs to their predicted categories.

Usage

To train the model, simply run:

python pct.py

Results

The model achieves an overall accuracy of 82.62% on the ModelNet40 test set.

关于

A Jittor implementation of Point Cloud Transformer (PCT) for ModelNet40 classification

31.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号