目录

PCT Jittor for ModelNet40

This repository contains a Jittor implementation of Point Cloud Transformer (PCT) for the ModelNet40 point cloud classification task in PA3.

Environment

Tested environment:

  • Python 3.9
  • Jittor 1.3.11
  • NumPy
  • Linux with CUDA

Install dependencies:

pip install -r requirements.txt

If CUDA compilation fails because the system GCC is too new, use a GCC 11 toolchain before running:

export PATH=~/gcc11-bin:$PATH
export CC=gcc
export CXX=g++
export CUDAHOSTCXX=/usr/bin/g++-11
export DISABLE_MULTIPROCESSING=1

Data Preparation

Place the preprocessed ModelNet40 files under data/:

data/
  train_points.npy
  train_labels.npy
  test_points.npy
  categories.txt

The .npy data files are not included in this repository. They should be downloaded from the official competition/course release.

Training

Recommended baseline-style training:

bash scripts/train_baseline.sh

Aggressive training used in the final experiment:

bash scripts/train_aggressive.sh

Equivalent direct command:

python src/pct.py \
  --data_dir data \
  --epochs 80 \
  --lr 0.02 \
  --warmup_epochs 8 \
  --scale_low 0.85 \
  --scale_high 1.15 \
  --jitter_sigma 0.007 \
  --jitter_clip 0.015

Inference And Outputs

The training script saves:

  • pct_model.pkl: trained model checkpoint
  • result.json: prediction file for the test set

Both files are generated in the repository root. They are ignored by git because they are training artifacts.

Results

The script reports training accuracy during training. With seed 42, the local 80-epoch aggressive run reached:

  • first epoch over 80% train accuracy: epoch 63
  • best train accuracy: 81.60%
  • final train accuracy at epoch 80: 81.60%

Online accuracy may differ from local training accuracy because the platform evaluates the generated result.json on hidden labels.

Reproducibility

The main script exposes a --seed argument and sets NumPy and Jittor seeds. Important hyperparameters are available as command line arguments:

  • --data_dir
  • --n_points
  • --batch_size
  • --epochs
  • --lr
  • --warmup_epochs
  • --scale_low
  • --scale_high
  • --jitter_sigma
  • --jitter_clip

Run logs can be redirected to outputs/ or another local directory. Logs, checkpoints, result files, and raw data are intentionally ignored by git.

Acknowledgement

This project is based on the course/competition starter code for Jittor PA3 and implements the PCT model for ModelNet40 classification.

关于

第六届计图人工智能挑战赛开源项目 题目:热身题2 战队:请输入队伍名称 作者:清华大学 马愿博

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

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