How azzh1/purls works
PURLS is a research implementation for zero-shot skeleton action recognition, aligning skeleton representations with language-class descriptions. The main workflow in main.py loads split labels, prepares seen-class training/validation and unseen-class test data, constructs the model, optionally trains it, then evaluates zero-shot performance. MInterface manages training and evaluation steps; Purls implements part-aware representations and contrastive learning. The README also describes configurable dataset splits and visual/language embedding choices. Some integrations are dynamically selected or documented without sampled implementation, so uncertain links are omitted or marked unverified.
Main entry points: purls.py PURLS model · main.py Experiment runner · model_interface.py Model interface · data_interface.py Data module
Components 19
Experiment workflow
- Experiment runner
main.py - Train and test
main.py
Data and splits
- Split labels
data/utils.py - Data module
data/data_interface.py - NTU-120 dataset
data/ntu_120.py - NTU-60 dataset
data/ntu_60.py - Skeleton preprocessing
data/utils.py
Representation learning
- Model interface
model/model_interface.py - PURLS model
model/purls.py - Model base
model/base.py
Model components
- Part attention
model/utils/attention.py - Contrastive loss
model/utils/losses.py - Projection layers
model/utils/layers.py - Prompt tools
model/utils/prompt_tools.py - Prediction metrics
model/utils/losses.py
Other components
- Researcher
- Skeleton features
- CLIP text encoder
- Recognition results
Connections 19
- Researcher → Experiment runner: configures and starts
README.md - Experiment runner → Split labels: loads split labels
main.py - Experiment runner → Data module: constructs and sets up
main.py - Data module → NTU-120 dataset: dynamically selects
data/data_interface.py - Data module → NTU-60 dataset: dynamically selects
data/data_interface.py - NTU-120 dataset → Skeleton features: loads feature arrays
data/ntu_120.py - NTU-120 dataset → Skeleton preprocessing: uses splits and interpolation
data/ntu_120.py - Experiment runner → Train and test: fits and tests
main.py - Train and test → Data module: requests data loaders
main.py - Train and test → Model interface: trains and evaluates
main.py - Model interface → PURLS model: dynamically instantiates
model/model_interface.py - PURLS model → Model base: extends
model/purls.py - PURLS model → CLIP text encoder: encodes class text
model/purls.py - PURLS model → Part attention: computes part features
model/purls.py - PURLS model → Contrastive loss: calculates alignment loss
model/purls.py - Projection layers → Prompt tools: uses prompt adapter
model/utils/layers.py - Model interface → PURLS model: passes batches and labels
model/model_interface.py - Model interface → Recognition results: reports test accuracy
- Contrastive loss → Prediction metrics: computes predictions and accuracy
model/utils/losses.py