A Jittor implementation of Point Cloud Transformer (PCT) for ModelNet40 point
cloud classification.
Files
pct.py: training and prediction script.
train_points.npy: training point clouds, shape (M, N, 3) or compatible.
train_labels.npy: training labels, shape (M,).
test_points.npy: test point clouds, shape (T, N, 3) or compatible.
pct_model.pkl: trained model generated by pct.py.
result.json: test prediction result generated by pct.py.
The three .npy data files are expected to be placed in the project root by
the competition platform or by the user. If they are placed in ./data,
pct.py detects that directory automatically. The script also accepts
competition-style aliases such as --data_dir, --batch_size, and
--n_points.
Environment
Jittor currently supports Linux and Windows/WSL. For installation, follow the
official guide:
The output result.json is a JSON dictionary whose keys are test sample
indices and whose values are predicted ModelNet40 class IDs.
When --votes is greater than 1, later voting passes resample points and apply
Y-axis rotation before averaging logits.
Model
The network follows the PA3 requirement:
two pointwise Conv1d embedding layers: 3 -> 128 -> 128;
four self-attention layers for global point relation modeling;
concatenation of the four attention outputs into 512 channels;
fusion Conv1d from 512 -> 1024;
global max pooling over points;
three fully connected classification layers producing 40 logits;
cross-entropy loss, SGD optimizer, and cosine annealing learning rate.
Training data augmentation includes random rotation around the Y axis.
Submission Checklist
Run python3 pct.py in a supported Jittor environment.
Alternatively run ./run_pa3.sh.
Confirm pct_model.pkl is generated.
Confirm result.json is generated and has one entry per test sample.
Run python3 verify_submission.py and resolve every local FAIL.
Submit to the Educoder competition page and keep the passing screenshot.
Record the Educoder evaluation ID.
Create the Gitlink project with a Jittor-related name, description, README,
.gitignore, and source code.
After creating an empty Gitlink project, push this repository with
./publish_gitlink.sh <gitlink-remote-url>.
Add report_assets/educoder_pass.png, report_assets/gitlink_home.png, and
a real report_metadata.json.
Build the report with python3 build_report.py, or fill the report template
and export it as REPORT.pdf.
Optional report dependencies are listed in requirements-report.txt.
Run python3 check_report_inputs.py to check the report source artifacts.
Run python3 audit_pa3_submission.py for a requirement-by-requirement audit
against the PA3 handout.
The same checks are available as make verify, make report-check,
make audit, make final-check, and their *-late variants.
See PLATFORM_SUBMISSION_STEPS.md for the exact Educoder, Gitlink, and
report artifact handoff.
See ARTIFACTS.md for hashes of generated local artifacts.
If submitting late, run ./package_late_submission.sh after pct.py,
pct_model.pkl, result.json, and REPORT.pdf are present. Build the
late report with python3 build_report.py --late and audit it with
python3 audit_pa3_submission.py --late.
关于
Jittor implementation of PCT for ModelNet40 point cloud classification.
PCT_jittor
A Jittor implementation of Point Cloud Transformer (PCT) for ModelNet40 point cloud classification.
Files
pct.py: training and prediction script.train_points.npy: training point clouds, shape(M, N, 3)or compatible.train_labels.npy: training labels, shape(M,).test_points.npy: test point clouds, shape(T, N, 3)or compatible.pct_model.pkl: trained model generated bypct.py.result.json: test prediction result generated bypct.py.The three
.npydata files are expected to be placed in the project root by the competition platform or by the user. If they are placed in./data,pct.pydetects that directory automatically. The script also accepts competition-style aliases such as--data_dir,--batch_size, and--n_points.Environment
Jittor currently supports Linux and Windows/WSL. For installation, follow the official guide:
https://cg.cs.tsinghua.edu.cn/jittor/download/
Minimal Python dependencies:
Download the official PA3 ModelNet40 point-cloud data:
Usage
Train PCT, save
pct_model.pkl, and exportresult.json:Or use the wrapper script, which detects
.or./data, runs training and prediction, then launches the local verifier:Run with common options:
Save periodic checkpoints or resume a long run:
Run prediction with test-time voting:
If CUDA is unavailable or incompatible, use CPU mode:
Only run prediction with an existing model:
The output
result.jsonis a JSON dictionary whose keys are test sample indices and whose values are predicted ModelNet40 class IDs. When--votesis greater than 1, later voting passes resample points and apply Y-axis rotation before averaging logits.Model
The network follows the PA3 requirement:
Conv1dembedding layers:3 -> 128 -> 128;Conv1dfrom512 -> 1024;Training data augmentation includes random rotation around the Y axis.
Submission Checklist
python3 pct.pyin a supported Jittor environment../run_pa3.sh.pct_model.pklis generated.result.jsonis generated and has one entry per test sample.python3 verify_submission.pyand resolve every localFAIL..gitignore, and source code../publish_gitlink.sh <gitlink-remote-url>.report_assets/educoder_pass.png,report_assets/gitlink_home.png, and a realreport_metadata.json.python3 build_report.py, or fill the report template and export it asREPORT.pdf. Optional report dependencies are listed inrequirements-report.txt.python3 check_report_inputs.pyto check the report source artifacts.python3 audit_pa3_submission.pyfor a requirement-by-requirement audit against the PA3 handout.make verify,make report-check,make audit,make final-check, and their*-latevariants.PLATFORM_SUBMISSION_STEPS.mdfor the exact Educoder, Gitlink, and report artifact handoff.ARTIFACTS.mdfor hashes of generated local artifacts../package_late_submission.shafterpct.py,pct_model.pkl,result.json, andREPORT.pdfare present. Build the late report withpython3 build_report.py --lateand audit it withpython3 audit_pa3_submission.py --late.