- Python >= 3.12.2
- PyTorch >= 1.12.1
- Platforms: Ubuntu 22.04, CUDA 12.1
- conda virtual environment is recommended. Run
conda create -n TBCNet python=3.12.2- Run
pip install -r requirements.txt.
- NTU-RGB+D 60
- NTU-RGB+D 120
- N-UCLA
- PKU-MMD
- Request dataset here
- Download the RGB-only datasets:
- Extract the files of NTU-RGB+D 60 to
./data/dataset/ntu-rgb/ntu-60/ - Extract the files of NTU-RGB+D 120 to
./data/dataset/ntu-rgb/ntu-120/
- Extract the files of NTU-RGB+D 60 to
- Download the RGB-only dataset from here
- Move video files to
./data/dataset/N-UCLA/
- Download the RGB-only dataset from here
- Move video files to
./data/dataset/PKU-MMD/
cd ./data/data_label
# transform .avi to .hdf5
python data_pre.py
The generated files are placed into ./data/dataset_hdf5/
Choose three important parameters: traintype/testtype, dataset, and loss.
- The traintype/testtype includes CS, CV, and CSet(CS=Cross-Subject, CV=Cross-View, CSet=Cross-Setting).
- The dataset includes NTU-RGB+D 60, NTU-RGB+D 120, and PKU-MMD.
- The loss includes c(Cross-Entropy), cv(Cross-Entropy + trunk-branch contrastive Loss), and cvl(Cross-Entropy + weighted trunk-branch contrastive Loss).
The configuration file are placed into
./configs/
python main.py --config ./configs/train/ntu-60_train_CS.yamlpython test.py --config ./configs/test/ntu-60_test_CS.yaml