feat: add PCT implementation for ModelNet40 classification - Implement Point Cloud Transformer (PCT) model for 3D point cloud classification using Jittor framework - Add training script with configuration support and logging - Add evaluation/inference script for generating predictions - Include ModelNet40 dataset loader with data augmentation - Add cosine annealing learning rate scheduler - Configure project with .gitignore, LICENSE, and README.md - Provide default configuration and category mapping for 40 classes
基于 Jittor 框架实现的 PCT (Point Cloud Transformer) 模型,用于 ModelNet40 三维点云形状分类任务。
参考论文: PCT: Point Cloud Transformer (Guo et al., 2021)
pip install -r requirements.txt
data/
data/ ├── train_points.npy # 训练点云 (N_train, 2048, 3) ├── train_labels.npy # 训练标签 (N_train,) ├── test_points.npy # 测试点云 (N_test, 2048, 3) └── categories.txt # 类别名称 (40类)
--data_dir
configs/default.yaml
data.data_dir
python scripts/train.py --config configs/default.yaml
关键参数可通过命令行覆盖配置文件:
python scripts/train.py --config configs/default.yaml --epochs 100 --batch_size 64 --lr 0.001
训练输出(默认保存到 outputs/):
outputs/
pct_model.pkl
config.yaml
command.txt
train.log
python scripts/eval.py --ckpt outputs/pct_model.pkl
输出 result.json,格式为 {"样本编号": 预测类别},其中类别编号 0-39 对应 data/categories.txt 中的 40 个类别。
result.json
{"样本编号": 预测类别}
data/categories.txt
├── README.md ├── LICENSE ├── .gitignore ├── requirements.txt ├── configs/ │ └── default.yaml # 默认训练配置 ├── src/ │ ├── model.py # PCT 模型定义 │ ├── dataset.py # 数据加载与增强 │ └── scheduler.py # 学习率调度器 ├── scripts/ │ ├── train.py # 训练脚本 │ └── eval.py # 评测/推理脚本 ├── data/ │ └── categories.txt # 类别名称 └── outputs/ # 输出目录(不提交)
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
PCT - Point Cloud Transformer for ModelNet40 Classification
基于 Jittor 框架实现的 PCT (Point Cloud Transformer) 模型,用于 ModelNet40 三维点云形状分类任务。
参考论文: PCT: Point Cloud Transformer (Guo et al., 2021)
环境安装
数据准备
data/目录结构如下:--data_dir参数或配置文件configs/default.yaml中的data.data_dir字段指定。训练
关键参数可通过命令行覆盖配置文件:
训练输出(默认保存到
outputs/):pct_model.pkl— 模型权重config.yaml— 本次实际使用的配置command.txt— 本次运行的命令train.log— 训练日志评测 / 推理
输出
result.json,格式为{"样本编号": 预测类别},其中类别编号 0-39 对应data/categories.txt中的 40 个类别。结果说明
项目结构
引用