ONE-PEACE for Video Action Recognition

June 21, 2023 ยท View on GitHub

Pretrained Models

Name batch size epochs frames top1 acc top5 acc download
onepeace_k400 64 30 16 88.0 97.8 model
onepeace_k400 64 30 32 88.1 97.8 model

Installation

pip install -r requirements.txt

Datasets

Following here to prepare Kinetics-400 dataset. Note that we use the AcademicTorrents version. We provide the validation and training annotations.

Evaluation

16 Frame:

python -m torch.distributed.launch --nproc_per_node=8 --nnodes=$NNODES --node_rank=$NODE_RANK --master_addr=$MASTER_ADDR --master_port=12355 --use_env test.py --launcher pytorch configs/recognition/onepeace_k400.py /path/to/onepeace_video_k400.pth --eval top_k_accuracy

Expected results:

top1_acc: 0.8800
top5_acc: 0.9776

32 Frame:

python -m torch.distributed.launch --nproc_per_node=8 --nnodes=$NNODES --node_rank=$NODE_RANK --master_addr=$MASTER_ADDR --master_port=12355 --use_env test.py --launcher pytorch configs/recognition/onepeace_k400_frame32.py /path/to/onepeace_video_k400.pth --eval top_k_accuracy

Expected results:

top1_acc: 0.8810
top5_acc: 0.9785

Training

python -m torch.distributed.launch --nproc_per_node=8 --nnodes=$NNODES --node_rank=$NODE_RANK --master_addr=$MASTER_ADDR --master_port=12355 --use_env train.py --launcher pytorch configs/recognition/onepeace_k400_frame32.py --test-last --validate --cfg-options model.backbone.pretrained=${CHECKPOINT_PATH} work_dir=${OUTPUT_DIR}