A Jittor implementation of Point Cloud Transformer (PCT) for ModelNet40 classification in the Jittor competition assignment.
Project Overview
This project trains a PCT classifier on ModelNet40 point clouds and exports test predictions in the required result.json format. The repository keeps only code and documentation needed for reproduction; datasets, checkpoints, reports, and generated results are intentionally excluded from version control.
result.json: test-set prediction dictionary, mapping sample index to predicted class id
Method Summary
This implementation includes:
ModelNet40Dataset for loading and random point sampling
training-time data augmentation with random Y-axis rotation, scaling, and jitter
SA_Layer self-attention block with Query, Key, and Value projection
PCT classification backbone
SGD optimizer with cosine annealing learning-rate scheduling
Result Notes
Training metrics printed by pct.py are training loss and training accuracy. Final online evaluation scores may differ from local runs because the official score is computed on the hidden test-set labels after submission.
Reproducibility
This project provides:
command-line arguments for all important hyperparameters
--seed to control randomness
clear dataset layout requirements
a one-command training and inference entry point
License
This repository is released under the MIT License.
关于
A Jittor implementation of Point Cloud Transformer(PCT) for ModelNet40 classification
PCT_jittor
A Jittor implementation of Point Cloud Transformer (PCT) for ModelNet40 classification in the Jittor competition assignment.
Project Overview
This project trains a PCT classifier on ModelNet40 point clouds and exports test predictions in the required
result.jsonformat. The repository keeps only code and documentation needed for reproduction; datasets, checkpoints, reports, and generated results are intentionally excluded from version control.Project Structure
Local files not tracked by git may include:
data/train_points.npydata/train_labels.npydata/test_points.npydata/categories.txtpct_model.pklresult.jsonREPORT.pdfEnvironment Setup
Recommended environment: WSL2 Ubuntu 24.04 + Miniconda + Jittor.
Python version:
Example setup:
If you use CUDA in WSL, make sure Jittor CUDA compilation tests pass before training.
Data Preparation
Place the dataset files under
data/:The script also supports the older
data/data/layout, but the current repository usesdata/.Training
Run training from the project root:
Important arguments:
--data_dir: dataset root directory--epochs: training epochs--batch_size: batch size--lr: initial learning rate--seed: random seed for reproducibility--model_path: output checkpoint path--result_path: output prediction json pathEvaluation / Inference
The script trains the model, saves
pct_model.pkl, and then predicts labels for the test set automatically:Output files:
pct_model.pkl: trained checkpointresult.json: test-set prediction dictionary, mapping sample index to predicted class idMethod Summary
This implementation includes:
ModelNet40Datasetfor loading and random point samplingSA_Layerself-attention block with Query, Key, and Value projectionPCTclassification backboneResult Notes
Training metrics printed by
pct.pyare training loss and training accuracy. Final online evaluation scores may differ from local runs because the official score is computed on the hidden test-set labels after submission.Reproducibility
This project provides:
--seedto control randomnessLicense
This repository is released under the MIT License.