目录

PointFormer

PCT-based 3D point cloud classifier for ModelNet40, implemented in Jittor. Trained with SGD, cosine annealing, and label smoothing following the original paper.

Python Jittor CUDA License

Setup

conda create -n jittor python=3.11 -y
conda activate jittor
pip install jittor pyyaml

Requires CUDA >= 10.0. Tested on RTX 4070 Laptop with CUDA 12.2.

Data

Put the ModelNet40 files in data/:

data/
  train_points.npy   # (9843, 2048, 3)
  train_labels.npy   # (9843,)
  test_points.npy    # (2468, 2048, 3)

Usage

# Train from scratch
python train.py --config configs/default.yaml

# Resume from a checkpoint
python train.py --config configs/default.yaml --resume checkpoints/epoch_050.pkl

# Override any config value inline
python train.py --config configs/default.yaml --epochs 300 --lr 0.005

# Run test inference with 10-vote averaging (uses checkpoints/best.pkl by default)
python predict.py --config configs/default.yaml

# Inference with a specific checkpoint
python predict.py --model checkpoints/epoch_100.pkl --out result_epoch100.json

Checkpoints are saved under checkpoints/ every 50 epochs, plus best.pkl for the best accuracy model.

Project Structure

pointformer/
  configs/default.yaml   hyperparameters
  data/                  dataset files (not tracked by git)
  config.py              Config dataclass + YAML loader
  dataset.py             ModelNet40Dataset + augmentations
  model.py               NeighborEmbedding, OffsetAttention, PCT
  train.py               training loop, checkpointing, resume
  predict.py             test inference with 10-vote averaging
关于

PCT-based 3D point cloud classifier for ModelNet40, implemented in Jittor.

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

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