@inproceedings{gu2018ava,
title={Ava: A video dataset of spatio-temporally localized atomic visual actions},
author={Gu, Chunhui and Sun, Chen and Ross, David A and Vondrick, Carl and Pantofaru, Caroline and Li, Yeqing and Vijayanarasimhan, Sudheendra and Toderici, George and Ricco, Susanna and Sukthankar, Rahul and others},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
pages={6047--6056},
year={2018}
}
@article{duan2020omni,
title={Omni-sourced Webly-supervised Learning for Video Recognition},
author={Duan, Haodong and Zhao, Yue and Xiong, Yuanjun and Liu, Wentao and Lin, Dahua},
journal={arXiv preprint arXiv:2003.13042},
year={2020}
}
@inproceedings{feichtenhofer2019slowfast,
title={Slowfast networks for video recognition},
author={Feichtenhofer, Christoph and Fan, Haoqi and Malik, Jitendra and He, Kaiming},
booktitle={Proceedings of the IEEE international conference on computer vision},
pages={6202--6211},
year={2019}
}
配置文件 | 模态 | 预训练 | 主干网络 | 输入 | GPU 数量 | mAP | log | json | ckpt |
---|---|---|---|---|---|---|---|---|---|
slowfast_kinetics_pretrained_r50_8x8x1_cosine_10e_ava22_rgb | RGB | Kinetics-400 | ResNet50 | 32x2 | 8 | 26.1 | log | json | ckpt |
slowfast_temporal_max_kinetics_pretrained_r50_8x8x1_cosine_10e_ava22_rgb | RGB | Kinetics-400 | ResNet50 | 32x2 | 8 | 26.4 | log | json | ckpt |
slowfast_temporal_max_focal_alpha3_gamma1_kinetics_pretrained_r50_8x8x1_cosine_10e_ava22_rgb | RGB | Kinetics-400 | ResNet50 | 32x2 | 8 | 26.8 | log | json | ckpt |
注:
对于数据集准备的细节,用户可参考 数据准备。
用户可以使用以下指令进行模型训练。
python tools/train.py ${CONFIG_FILE} [optional arguments]
例如:在 AVA 数据集上训练 SlowOnly,并定期验证。
python tools/train.py configs/detection/ava/slowonly_kinetics_pretrained_r50_8x8x1_20e_ava_rgb.py --validate
更多训练细节,可参考 基础教程 中的 训练配置 部分。
用户可以训练 AVA 数据集中的自定义类别。AVA 中不同类别的样本量很不平衡:其中有超过 100000 样本的类别: stand
/listen to (a person)
/talk to (e.g., self, a person, a group)
/watch (a person)
,也有样本较少的类别(半数类别不足 500 样本)。大多数情况下,仅使用样本较少的类别进行训练将在这些类别上得到更好精度。
训练 AVA 数据集中的自定义类别包含 3 个步骤:
custom_classes
域中。其中 0
不表示具体的动作类别,不应被选择。num_classes
设置为 num_classes = len(custom_classes) + 1
。0
仍对应原类别 0
,编号 i
(i > 0) 对应原类别 custom_classes[i-1]
。num_classes
需要修改:model -> roi_head -> bbox_head -> num_classes
, data -> train -> num_classes
, data -> val -> num_classes
.num_classes <= 5
, 配置文件 BBoxHeadAVA
中的 topk
参数应被修改。topk
的默认值为 (3, 5)
,topk
中的所有元素应小于 num_classes
。label_file
中。以 slowonly_kinetics_pretrained_r50_4x16x1_20e_ava_rgb
为例,这一配置文件训练所有 AP 在 (0.1, 0.3)
间的类别(这里的 AP 为 AVA 80 类训出模型的表现),即 [3, 6, 10, 27, 29, 38, 41, 48, 51, 53, 54, 59, 61, 64, 70, 72]
。下表列出了自定义类别训练的模型精度:
训练类别 | mAP (自定义类别) | 配置文件 | log | json | ckpt |
---|---|---|---|---|---|
全部 80 类 | 0.1948 | slowonly_kinetics_pretrained_r50_4x16x1_20e_ava_rgb | log | json | ckpt |
自定义类别 | 0.3311 | slowonly_kinetics_pretrained_r50_4x16x1_20e_ava_rgb_custom_classes | log | json | ckpt |
全部 80 类 | 0.1864 | slowfast_kinetics_pretrained_r50_4x16x1_20e_ava_rgb | log | json | ckpt |
自定义类别 | 0.3785 | slowfast_kinetics_pretrained_r50_4x16x1_20e_ava_rgb_custom_classes | log | json | ckpt |
用户可以使用以下指令进行模型测试。
python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [optional arguments]
例如:在 AVA 上测试 SlowOnly 模型,并将结果存为 csv 文件。
python tools/test.py configs/detection/ava/slowonly_kinetics_pretrained_r50_8x8x1_20e_ava_rgb.py checkpoints/SOME_CHECKPOINT.pth --eval mAP --out results.csv
更多测试细节,可参考 基础教程 中的 测试某个数据集 部分。