model_zoo.md

September 20, 2021 · View on GitHub

Model Zoo and Benchmarks

PyTorchVideo provides reference implementation of a large number of video understanding approaches. In this document, we also provide comprehensive benchmarks to evaluate the supported models on different datasets using standard evaluation setup. All the models can be downloaded from the provided links.

Kinetics-400

archdepthpretrainframe length x sample ratetop 1top 5Flops (G) x viewsParams (M)Model
C2DR50-8x871.4689.6825.89 x 3 x 1024.33link
I3DR50-8x873.2790.7037.53 x 3 x 1028.04link
SlowR50-4x1672.4090.1827.55 x 3 x 1032.45link
SlowR50-8x874.5891.6354.52 x 3 x 1032.45link
SlowFastR50-4x1675.3491.8936.69 x 3 x 1034.48link
SlowFastR50-8x876.9492.6965.71 x 3 x 1034.57link
SlowFastR101-8x877.9093.27127.20 x 3 x 1062.83link
SlowFastR101-16x878.7093.61215.61 x 3 x 1053.77link
CSNR101-32x277.0092.9075.62 x 3 x 1022.21link
R(2+1)DR50-16x476.0192.2376.45 x 3 x 1028.11link
X3DXS-4x1269.1288.630.91 x 3 x 103.79link
X3DS-13x673.3391.272.96 x 3 x 103.79link
X3DM-16x575.9492.726.72 x 3 x 103.79link
X3DL-16x577.4493.3126.64 x 3 x 106.15link
MViTB-16x478.8593.8570.80 x 1 x 536.61link
MViTB-32x380.3094.69170.37 x 1 x 536.61link

Something-Something V2

archdepthpretrainframe length x sample ratetop 1top 5Flops (G) x viewsParams (M)Model
SlowR50Kinetics 4008x860.0485.1955.10 x 3 x 131.96link
SlowFastR50Kinetics 4008x861.6886.9266.60 x 3 x 134.04link

Charades

archdepthpretrainframe length x sample rateMAPFlops (G) x viewsParams (M)Model
SlowR50Kinetics 4008x834.7255.10 x 3 x 1031.96link
SlowFastR50Kinetics 4008x837.2466.60 x 3 x 1034.00link

AVA (V2.2)

archdepthpretrainframe length x sample rateMAPParams (M)Model
SlowR50Kinetics 4004x1619.531.78link
SlowFastR50Kinetics 4008x824.6733.82link

Using PyTorchVideo model zoo

We provide several different ways to use PyTorchVideo model zoo.

  • The models have been integrated into TorchHub, so could be loaded with TorchHub with or without pre-trained models. Additionally, we provide a tutorial which goes over the steps needed to load models from TorchHub and perform inference.
  • PyTorchVideo models/datasets are also supported in PySlowFast. You can use PySlowFast workflow to train or test PyTorchVideo models/datasets.
  • You can also use PyTorch Lightning to build training/test pipeline for PyTorchVideo models and datasets. Please check this tutorial for more information.

Notes:

  • The above benchmarks are conducted by PySlowFast workflow using PyTorchVideo datasets and models.
  • For more details on the data preparation, you can refer to PyTorchVideo Data Preparation.
  • 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.

PytorchVideo Accelerator Model Zoo

Accelerator model zoo provides a set of efficient models on target device with pretrained checkpoints. To learn more about how to build model, load checkpoint and deploy, please refer to Use PyTorchVideo/Accelerator Model Zoo.

Efficient Models for mobile CPU All top1/top5 accuracies are measured with 10-clip evaluation. Latency is benchmarked on Samsung S8 phone with 1s input clip length.

modelmodel buildertop 1top 5latency (ms)params (M)checkpoint
X3D_XS (fp32)models. accelerator. mobile_cpu. efficient_x3d. EfficientX3d (expansion="XS")68.588.02333.8link
X3D_XS (int8)N/A (Use the TorchScript file in checkpoint link directly)66.987.21653.8link
X3D_S (fp32)models. accelerator. mobile_cpu. efficient_x3d. EfficientX3d (expansion="S")73.090.67643.8link

TorchHub models

We provide a large set of TorchHub models for the above video models with pre-trained weights. So it's easy to construct the networks and load pre-trained weights. Please refer to PytorchVideo TorchHub models for more details.