目录

PCT Jittor for ModelNet40 Classification

This project implements a Point Cloud Transformer (PCT) classifier with Jittor for the PA3 ModelNet40 point-cloud classification task.

Files

  • pct.py: training and prediction script.
  • data/train_points.npy: training point clouds.
  • data/train_labels.npy: training labels.
  • data/test_points.npy: test point clouds.
  • data/categories.txt: category names.

Environment

Recommended Linux GPU environment:

  • Python >= 3.7
  • g++ >= 5.4
  • NVIDIA CUDA >= 10.0 with a working nvcc
  • Jittor
  • NumPy

Install dependencies:

python -m pip install -U pip
python -m pip install jittor numpy
python -m jittor.test.test_example
python -m jittor.test.test_cuda

Training And Prediction

From the project root:

python pct.py --data_dir ./data --epochs 200 --batch_size 32 --n_points 1024 --lr 0.01

The script saves:

  • pct_model.pkl: trained model checkpoint.
  • result.json: test-set predictions in {sample_id: class_id} format.

If GPU memory is insufficient, reduce the batch size:

python pct.py --data_dir ./data --epochs 200 --batch_size 16 --n_points 1024 --lr 0.01

Generate predictions from an existing checkpoint:

python pct.py --data_dir ./data --eval_only --model_path pct_model.pkl --result_path result.json
关于

A Jittor implementation of Point Cloud Transformer (PCT) for ModelNet40 classification.

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

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