update README
基于 Jittor 框架的 Point Cloud Transformer (PCT) 实现,用于 ModelNet40 三维点云形状分类任务。本项目支持配置化实验管理、多种数据增强策略、优化器与学习率调度器的灵活切换,以及训练过程的可视化。
rotate_y
jitter
scale
jitter_scale
. ├── pct.py # 主训练与推理脚本 ├── configs/ │ ├── default.yaml # 默认基线配置 │ ├── aug_jitter.yaml # 数据增强实验配置 │ ├── opt_adam.yaml # 优化器实验配置 │ ├── sched_step.yaml # 调度器实验配置 │ ├── exp08_jitter_v2.yaml │ └── phase1/ # Phase 1: 优化器与学习率搜索(8组) │ └── phase2/ # Phase 2: 数据增强搜索(6组) ├── utils/ │ └── visualize.py # 训练曲线可视化工具 ├── docs/ │ ├── DESIGN.md # 实验设计文档 │ └── REPORT.md # 实验报告模板 ├── data/ # 数据集(已忽略) │ ├── train_points.npy │ ├── train_labels.npy │ └── test_points.npy └── exp/ # 实验输出目录(已忽略)
# 克隆项目 git clone <your-repo-url> cd PointCloud # 安装依赖 pip install jittor numpy matplotlib pyyaml tqdm # 准备数据 # 将 data.zip 解压到 ./data/ 目录,确保包含: # data/train_points.npy # data/train_labels.npy # data/test_points.npy
使用默认配置直接训练:
python pct.py
所有实验参数通过 YAML 配置文件管理。默认配置位于 configs/default.yaml:
configs/default.yaml
wandb: name: "exp001" # 实验名,决定输出文件夹名 training: epochs: 200 batch_size: 32 lr: 0.01 seed: 42 augment: strategy: "rotate_y" # none | rotate_y | jitter | scale | jitter_scale params: jitter_std: 0.01 scale_min: 0.9 scale_max: 1.1 optimizer: type: "sgd" # sgd | adam | adamw scheduler: type: "cosine" # cosine | step
python pct.py --config configs/default.yaml python pct.py --config configs/phase1/exp08.yaml python pct.py --config configs/phase2/exp01.yaml
bash run_phase1.sh
bash run_phase2.sh
每个实验的结果自动归档到 exp/{实验名}/ 目录下:
exp/{实验名}/
pct_model.pkl
result.json
config.yaml
training_curves.png
本实验分为两个阶段:
详细实验过程与结果填写见 docs/REPORT.md。
docs/REPORT.md
最终提交模型:exp/phase2_exp01_no_aug/
exp/phase2_exp01_no_aug/
欢迎提交 Issue 和 Pull Request。如有问题,请在项目仓库中开启讨论。
本项目仅供学术交流与课程作业使用。
A Jittor implementation of Point Cloud Transformer(PCT) for ModelNet40 classification, by yiqing du at 2026 spring Computer Graphics class
Point Cloud Transformer (PCT) for ModelNet40 Classification
基于 Jittor 框架的 Point Cloud Transformer (PCT) 实现,用于 ModelNet40 三维点云形状分类任务。本项目支持配置化实验管理、多种数据增强策略、优化器与学习率调度器的灵活切换,以及训练过程的可视化。
Table of Contents
Features
rotate_y、jitter、scale、jitter_scale及其组合,参数可控Project Structure
Installation
Requirements
Setup
Usage
Quick Start
使用默认配置直接训练:
Configuration
所有实验参数通过 YAML 配置文件管理。默认配置位于
configs/default.yaml:Running Experiments
单实验运行
批量运行 Phase 1
批量运行 Phase 2
输出说明
每个实验的结果自动归档到
exp/{实验名}/目录下:pct_model.pkl— 训练好的模型权重result.json— 测试集预测结果config.yaml— 该实验的完整配置快照training_curves.png— Loss / Acc / LR 训练曲线Experimental Results
本实验分为两个阶段:
详细实验过程与结果填写见
docs/REPORT.md。最终提交模型:
exp/phase2_exp01_no_aug/Contributing
欢迎提交 Issue 和 Pull Request。如有问题,请在项目仓库中开启讨论。
License
本项目仅供学术交流与课程作业使用。