这里是用于视频行为识别任务的 PyTorch 模型库。

提示

训练命令适用于此脚本: 下载 train_ddp_pytorch.py

python train_ddp_pytorch.py --config-file CONFIG

测试脚本 下载 test_ddp_pytorch.py 可用于在各种数据集上进行性能评估。如果您想使用我们模型库中训练好的模型,请在配置文件中设置 MODEL.PRETRAINED = True

python test_ddp_pytorch.py --config-file CONFIG

Kinetics400 数据集

下表列出了我们在 Kinetics400 上训练的模型。

注意

我们的预训练模型复现了近期最先进方法的结果。有关详细信息,请查阅参考文献。

所有模型均使用 224x224 的输入尺寸进行训练,但 R2+1D 模型使用 112x112 的输入尺寸进行训练和评估。

Clip Length(片段长度)是一个输入片段中的帧数。32 (64/2) 意味着我们使用 32 帧,但这些帧实际上是通过从视频中随机选择 64 帧连续帧,然后跳过每隔一帧形成的。这种策略被广泛采用以减少计算和内存成本。

Segment(段)是训练期间使用的段数。对于测试(报告这些数字),按照惯例,我们对 2D 网络使用 250 个视图(25 帧和 10 裁剪),对 3D 网络使用 30 个视图(10 个片段和 3 裁剪)。

r2plus1d_v2_resnet152_kinetics400, ircsn_v2_resnet152_f32s2_kinetics400TPN family 的模型权重移植自 VMZ 和 TPN 仓库。您目前可以忽略这些模型的训练配置。

名称

预训练

片段长度

Top-1

哈希标签

配置

resnet18_v1b_kinetics400 [3]_

ImageNet

7

1

66.73

854b23e4

config

resnet34_v1b_kinetics400 [3]_

ImageNet

7

1

69.85

124a2fa4

config

resnet50_v1b_kinetics400 [3]_

ImageNet

7

1

70.88

9939dbdf

config

resnet101_v1b_kinetics400 [3]_

ImageNet

7

1

72.25

172afa3b

config

resnet152_v1b_kinetics400 [3]_

ImageNet

7

1

72.45

3dedb835

config

r2plus1d_v1_resnet18_kinetics400 [6]_

Scratch

1

16 (32/2)

71.72

340a5952

config

r2plus1d_v1_resnet34_kinetics400 [6]_

Scratch

1

16 (32/2)

72.63

5102fd17

config

r2plus1d_v1_resnet50_kinetics400 [6]_

Scratch

1

16 (32/2)

74.92

9a3b665c

config

r2plus1d_v2_resnet152_kinetics400 [6]_

IG65M

1

16 (32/2)

81.34

42707ffc

config

ircsn_v2_resnet152_f32s2_kinetics400 [10]_

IG65M

1

32 (64/2)

83.18

82855d2c

config

i3d_resnet50_v1_kinetics400 [4]_

ImageNet

1

32 (64/2)

74.87

18545497

config

i3d_resnet101_v1_kinetics400 [4]_

ImageNet

1

32 (64/2)

75.1

a9bb4f89

config

i3d_nl5_resnet50_v1_kinetics400 [7]_

ImageNet

1

32 (64/2)

75.17

9df1e103

config

i3d_nl10_resnet50_v1_kinetics400 [7]_

ImageNet

1

32 (64/2)

75.93

281e1e8a

config

i3d_nl5_resnet101_v1_kinetics400 [7]_

ImageNet

1

32 (64/2)

75.81

2cea8edd

config

i3d_nl10_resnet101_v1_kinetics400 [7]_

ImageNet

1

32 (64/2)

75.93

526a2ed0

config

slowfast_4x16_resnet50_kinetics400 [8]_

Scratch

1

32 (64/2)

75.25

1d1eadb2

config

slowfast_8x8_resnet50_kinetics400 [8]_

Scratch

1

32 (64/2)

76.66

e94e9a57

config

slowfast_8x8_resnet101_kinetics400 [8]_

Scratch

1

32 (64/2)

76.95

db5e9fef

config

i3d_slow_resnet50_f32s2_kinetics400 [8]_

Scratch

1

32 (64/2)

77.89

078c817b

config

i3d_slow_resnet50_f16s4_kinetics400 [8]_

Scratch

1

16 (64/4)

76.36

a3e419f1

config

i3d_slow_resnet50_f8s8_kinetics400 [8]_

Scratch

1

8 (64/8)

74.41

1c3d98a1

config

i3d_slow_resnet101_f32s2_kinetics400 [8]_

Scratch

1

32 (64/2)

78.57

db37cd51

config

i3d_slow_resnet101_f16s4_kinetics400 [8]_

Scratch

1

16 (64/4)

77.11

cb6b78d9

config

i3d_slow_resnet101_f8s8_kinetics400 [8]_

Scratch

1

8 (64/8)

76.15

82e399c1

config

tpn_resnet50_f8s8_kinetics400 [9]_

Scratch

1

8 (64/8)

77.04

368108eb

config

tpn_resnet50_f16s4_kinetics400 [9]_

Scratch

1

16 (64/4)

77.33

6bf899df

config

tpn_resnet50_f32s2_kinetics400 [9]_

Scratch

1

32 (64/2)

78.9

27710ce8

config

tpn_resnet101_f8s8_kinetics400 [9]_

Scratch

1

8 (64/8)

78.1

092c2f7f

config

tpn_resnet101_f16s4_kinetics400 [9]_

Scratch

1

16 (64/4)

79.39

647080df

config

tpn_resnet101_f32s2_kinetics400 [9]_

Scratch

1

32 (64/2)

79.7

a94422a9

config

Kinetics700 数据集

下表列出了我们在 Kinetics700 上训练的模型。

名称

预训练

片段长度

Top-1

哈希标签

配置

i3d_slow_resnet101_f16s4_kinetics700 [8]_

Scratch

1

16 (64/4)

67.65

b5be1a2e

config

Something-Something-V2 数据集

下表列出了我们在 Something-Something-V2 上训练的模型。

注意

我们的预训练模型复现了近期最先进方法的结果。有关详细信息,请查阅参考文献。

名称

预训练

片段长度

Top-1

哈希标签

配置

resnet50_v1b_sthsthv2 [3]_

ImageNet

8

1

35.16

cbb9167b

config

i3d_resnet50_v1_sthsthv2 [4]_

ImageNet

1

16 (32/2)

49.61

e975d989

config