目录

PCT_jittor

PCT_jittor

基于计图(Jittor)框架实现的 Point Cloud Transformer(PCT)模型,用于 ModelNet40 三维点云分类任务。

特性

  • 完整的三维数据增强策略(随机旋转、随机抖动、随机缩放、随机翻转)
  • Adam 优化器与余弦退火学习率调度
  • 在 ModelNet40 测试集上达到 85%+ 的分类准确率

环境要求

  • Python >= 3.8
  • Jittor >= 1.3.11
  • NVIDIA GPU(可选,CPU 也可运行)

安装 pip install jittor

数据集 从 Educoder 竞赛页面下载 ModelNet40 数据集: https://www.educoder.net/competitions/Jittor-7

将文件放入 data/ 文件夹: PA3/ pct.py data/ train_points.npy train_labels.npy test_points.npy

使用方法 python3 pct.py –epochs 200 –batch_size 32 –lr 0.001

输出文件: pct_model.pkl - 训练好的模型权重 result.json - 测试集预测结果

模型架构

  • 输入嵌入:两层 Conv1d(3 → 128 → 128)
  • 4 层自注意力模块(offset attention)
  • 特征拼接(每点 512 维)
  • 全局最大池化(1024 维全局特征)
  • 三层分类头(1024 → 512 → 256 → 40)

参考资料


PCT_jittor

A Jittor implementation of Point Cloud Transformer (PCT) for ModelNet40 3D point cloud classification.

Features

  • Full 3D data augmentation (rotation, jitter, scaling, flip)
  • Adam optimizer with cosine annealing learning rate scheduling
  • Achieves 85%+ accuracy on ModelNet40 test set

Requirements

  • Python >= 3.8
  • Jittor >= 1.3.11
  • NVIDIA GPU with CUDA support (optional, CPU also works)

Installation pip install jittor

Dataset Download the ModelNet40 dataset from the Educoder competition page: https://www.educoder.net/competitions/Jittor-7

Place them in a data/ folder: PA3/ pct.py data/ train_points.npy train_labels.npy test_points.npy

Usage python3 pct.py –epochs 200 –batch_size 32 –lr 0.001

Output files: pct_model.pkl - trained model weights result.json - test set predictions

Model Architecture

  • Input Embedding: 2-layer Conv1d (3 to 128 to 128)
  • 4 Self-Attention layers with offset attention
  • Feature concatenation (512-dim per point)
  • Global max pooling (1024-dim global feature)
  • 3-layer classification head (1024 to 512 to 256 to 40)

Reference

关于

基于计图(Jittor)框架实现的 Point Cloud Transformer(PCT)模型, 用于 ModelNet40 三维点云分类任务。 本项目包含完整的数据增强策略(三维随机旋转、随机抖动、随机缩放、随机翻转)、 Adam 优化器与余弦退火学习率调度,在 ModelNet40 测试集上达到 85%+ 的分类准确率。

31.0 KB
邀请码