Implement PCT for ModelNet40 classification
This project implements a Point Cloud Transformer (PCT) classifier with Jittor for the PA3 ModelNet40 point-cloud classification task.
pct.py
data/train_points.npy
data/train_labels.npy
data/test_points.npy
data/categories.txt
Recommended Linux GPU environment:
nvcc
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
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
result.json
{sample_id: class_id}
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.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
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:
nvccInstall dependencies:
Training And Prediction
From the project root:
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:
Generate predictions from an existing checkpoint: