Support PyTorchVideo in PySlowFast

May 28, 2021 · View on GitHub

Introduction

PyTorchVideo is a new deeplearning library with a focus on video understanding work, which provides reusable, modular and efficient components for video understanding. In PySlowFast, we add the support to incorporate PyTorchVideo components, including standard video datasets and state-of-the-art video models. Thus, we could use standard PySlowFast workflow to train and test PyTorchVideo datasets and models.

We add PySlowFast wrapper for different PyTorchVideo models and datasets. So we can easily construct PyTorchVideo datasets and models using PySlowFast config system. Right now, the supported PyTorchVideo models includes:

The supported PyTorchVideo datasets includes:

  • Kinetics
  • Charades
  • Something-something v2

PyTorchVideo Model Zoo

We also provide a comprehensive PyTorchVideo Model Zoo using standard PySlowFast workflow and training recipe for PyTorchVideo datasets and models.

Kinetics-400

archdepthpretrainframe length x sample ratetop 1top 5Flops (G) x viewsParams (M)Modelconfig
C2DR50-8x871.4689.6825.89 x 3 x 1024.33linkKinetics/pytorchvideo/C2D_8x8_R50
I3DR50-8x873.2790.7037.53 x 3 x 1028.04linkKinetics/pytorchvideo/I3D_8x8_R50
SlowR50-4x1672.4090.1827.55 x 3 x 1032.45linkKinetics/pytorchvideo/SLOW_4x16_R50
SlowR50-8x874.5891.6354.52 x 3 x 1032.45linkKinetics/pytorchvideo/SLOW_8x8_R50
SlowFastR50-4x1675.3491.8936.69 x 3 x 1034.48linkKinetics/pytorchvideo/SLOWFAST_4x16_R50
SlowFastR50-8x876.9492.6965.71 x 3 x 1034.57linkKinetics/pytorchvideo/SLOWFAST_8x8_R50
SlowFastR101-8x877.9093.27127.20 x 3 x 1062.83linkKinetics/pytorchvideo/SLOWFAST_8x8_R101
SlowFastR101-16x878.7093.61215.61 x 3 x 1053.77linkKinetics/pytorchvideo/SLOWFAST_16x8_R101_50_50
CSNR101-32x277.0092.9075.62 x 3 x 1022.21linkKinetics/pytorchvideo/CSN_32x2_R101
R(2+1)DR50-16x476.0192.2376.45 x 3 x 1028.11linkKinetics/pytorchvideo/R2PLUS1D_16x4_R50
X3DXS-4x1269.1288.630.91 x 3 x 103.79linkKinetics/pytorchvideo/X3D_XS
X3DS-13x673.3391.272.96 x 3 x 103.79linkKinetics/pytorchvideo/X3D_S
X3DM-16x575.9492.726.72 x 3 x 103.79linkKinetics/pytorchvideo/X3D_M
X3DL-16x577.4493.3126.64 x 3 x 106.15linkKinetics/pytorchvideo/X3D_L

Something-Something V2

archdepthpretrainframe length x sample ratetop 1top 5Flops (G) x viewsParams (M)Modelconfig
SlowR50Kinetics 4008x860.0485.1955.10 x 3 x 131.96linkSSv2/pytorchvideo/SLOW_8x8_R50
SlowFastR50Kinetics 4008x861.6886.9266.60 x 3 x 134.04linkSSv2/pytorchvideo/SLOWFAST_8x8_R50

Charades

archdepthpretrainframe x intervalMAPFlops (G) x viewsParams (M)Modelconfig
SlowR50Kinetics 4008x834.7255.10 x 3 x 1031.96linkCharades/pytorchvideo/SLOW_8x8_R50
SlowFastR50Kinetics 4008x837.2466.60 x 3 x 1034.00linkCharades/pytorchvideo/SLOWFAST_8x8_R50

Notes:

  • The above model weights has slightly difference with these in PyTorchVideo official model zoo. The layer names of above model weights will contain the additional prefix of model. due to the model wrapper in PySlowFast.
  • For Flops x views column, we report the inference cost with a single “view" × the number of views (FLOPs × space_views × time_views). For example, we take 3 spatial crops for 10 temporal clips on Kinetics.