PyTorch
Safetensors
video-prediction
spatiotemporal-forecasting
openstl
kth
human-motion

OpenSTL Checkpoints: KTH Actions (10 β†’ 20 frames)

License Paper Code Checkpoints

  • Benchmark: KTH Actions, 10 to 20 frames
  • Checkpoints: 23
  • Task: spatiotemporal predictive learning
  • Source: OpenSTL GitHub release kth20-weights
  • License: Apache-2.0

Unofficial mirror. These are the pretrained weights and training logs that the OpenSTL authors (CAIRI AI Lab, Westlake University) published as GitHub release assets, re-hosted here with safetensors copies so they stay available. All credit belongs to the original authors.

Disclaimer

This repo is not affiliated with or endorsed by the OpenSTL authors. The weights come from the kth20-weights release of https://github.com/chengtan9907/OpenSTL, which is licensed under Apache-2.0 (Copyright 2022-2023 CAIRI AI Lab). The model zoo tables come from docs/en/model_zoos. Several methods are OpenSTL re-implementations of other authors' work (ConvLSTM, PredNet, PredRNN family, E3D-LSTM, MIM, CrevNet, PhyDNet, MAU, DMVFN); please credit them too. If you are an author and want this mirror changed or removed, open a discussion on this repo.

Training data. KTH Actions (SchΓΌldt, Laptev and Caputo, ICPR 2004). The KTH authors state the dataset is free for non-commercial use, so check those terms before any commercial use of these weights.

Task. Predict 20 future frames of KTH Actions video from 10 observed frames, 128x128 grayscale.

Changes from the Official Release

  • Added model.safetensors next to every original .pth (23 checkpoints). Tensors are bit-identical to the original state dicts.
  • Grouped each checkpoint with its training log in one folder named after the original file.
  • Rewrote the model-zoo links to point at this repo. 28 links in the upstream docs use the wrong file names (moganet vs moga, mlpmixer vs mlp, dmvfn vs dmfvn, mfmnist_ vs fmnist_); here they resolve to the files that actually exist.
  • Added openstl_hub.py, a loader that rebuilds each architecture from its training log.
  • Added the upstream visualisation GIFs (visualizations/) and a banner made from six of them.
  • Removed the module. (DDP) key prefix in model.safetensors for 19 checkpoint(s); the .pth files are unchanged.

Problems in the upstream release

Found while verifying the files. They are documented here and left as they are.

  • kth20_simvp_vit_one_ep100: the docs list 12.7M parameters for the ViT row, the checkpoint has 15.33M.
  • kth20_simvp_uniformer_one_ep100: the docs list 11.8M parameters for the Uniformer row, the checkpoint has 14.42M.

Model Zoo

Results, parameter counts, FLOPs and FPS are copied from the OpenSTL docs; they were not re-measured here. model and log link to the files in this repo.

We provide long-term prediction benchmark results on KTH Action dataset using $10\rightarrow 20$ frames prediction setting. Metrics (MSE, MAE, SSIM, pSNR, LPIPS) of the best models are reported in three trials. Parameters (M), FLOPs (G), and V100 inference FPS (s) are also reported for all methods. The default training setup is trained 100 epochs by Adam optimizer with a batch size of 16 and Onecycle scheduler on single GPU or 4GPUs, and we report the used GPU setups for each method (also shown in the config).

STL Benchmarks on KTH

For a fair comparison of different methods, we report the best results when models are trained to convergence. We provide config files in configs/kth. Notice that 4xbs4 indicates 4GPUs DDP training with the batch size of 4 on each GPU.

Method Setting GPUs Params FLOPs FPS MSE MAE SSIM PSNR LPIPS Download
ConvLSTM-S 100 epoch 1xbs16 14.9M 1368.0G 16 47.65 445.5 0.8977 26.99 0.26686 model | log
E3D-LSTM 100 epoch 2xbs8 53.5M 217.0G 17 136.40 892.7 0.8153 21.78 0.48358 model | log
PredNet 100 epoch 1xbs16 12.5M 3.4G 399 152.11 783.1 0.8094 22.45 0.32159 model | log
PhyDNet 100 epoch 1xbs16 3.1M 93.6G 58 91.12 765.6 0.8322 23.41 0.50155 model | log
MAU 100 epoch 1xbs16 20.1M 399.0G 8 51.02 471.2 0.8945 26.73 0.25442 model | log
MIM 100 epoch 1xbs16 39.8M 1099.0G 17 40.73 380.8 0.9025 27.78 0.18808 model | log
PredRNN 100 epoch 1xbs16 23.6M 2800.0G 7 41.07 380.6 0.9097 27.95 0.21892 model | log
PredRNN++ 100 epoch 1xbs16 38.3M 4162.0G 5 39.84 370.4 0.9124 28.13 0.19871 model | log
PredRNN.V2 100 epoch 1xbs16 23.6M 2815.0G 7 39.57 368.8 0.9099 28.01 0.21478 model | log
DMVFN 100 epoch 1xbs16 3.5M 0.88G 727 59.61 413.2 0.8976 26.65 0.12842 model | log
SimVP+IncepU 100 epoch 2xbs8 12.2M 62.8G 77 41.11 397.1 0.9065 27.46 0.26496 model | log
SimVP+gSTA-S 100 epoch 4xbs4 15.6M 76.8G 53 45.02 417.8 0.9049 27.04 0.25240 model | log
TAU 100 epoch 4xbs4 15.0M 73.8G 55 45.32 421.7 0.9086 27.10 0.22856 model | log

Benchmark of MetaFormers Based on SimVP (MetaVP)

Since the hidden Translator in SimVP can be replaced by any Metaformer block which achieves token mixing and channel mixing, we benchmark popular Metaformer architectures on SimVP with 100-epoch training. We provide config files in configs/kth/simvp.

MetaFormer Setting GPUs Params FLOPs FPS MSE MAE SSIM PSNR LPIPS Download
IncepU (SimVPv1) 100 epoch 2xbs8 12.2M 62.8G 77 41.11 397.1 0.9065 27.46 0.26496 model | log
gSTA (SimVPv2) 100 epoch 2xbs8 15.6M 76.8G 53 45.02 417.8 0.9049 27.04 0.25240 model | log
ViT 100 epoch 2xbs8 12.7M 112.0G 28 56.57 459.3 0.8947 26.19 0.27494 model | log
Swin Transformer 100 epoch 2xbs8 15.3M 75.9G 65 45.72 405.7 0.9039 27.01 0.25178 model | log
Uniformer 100 epoch 2xbs8 11.8M 78.3G 43 44.71 404.6 0.9058 27.16 0.24174 model | log
MLP-Mixer 100 epoch 2xbs8 20.3M 66.6G 34 57.74 517.4 0.8886 25.72 0.28799 model | log
ConvMixer 100 epoch 2xbs8 1.5M 18.3G 175 47.31 446.1 0.8993 26.66 0.28149 model | log
Poolformer 100 epoch 2xbs8 12.4M 63.6G 67 45.44 400.9 0.9065 27.22 0.24763 model | log
ConvNeXt 100 epoch 2xbs8 12.5M 63.9G 72 45.48 428.3 0.9037 26.96 0.26253 model | log
VAN 100 epoch 2xbs8 14.9M 73.8G 55 45.05 409.1 0.9074 27.07 0.23116 model | log
HorNet 100 epoch 2xbs8 15.3M 75.3G 58 46.84 421.2 0.9005 26.80 0.26921 model | log
MogaNet 100 epoch 2xbs8 15.6M 76.7G 48 42.98 418.7 0.9065 27.16 0.25146 model | log
TAU 100 epoch 2xbs8 15.0M 73.8G 55 45.32 421.7 0.9086 27.10 0.22856 model | log

(back to top)

Structure

OpenSTL-KTH/
β”œβ”€β”€ kth20_tau_one_ep100/
β”‚   β”œβ”€β”€ model.safetensors        # weights (safetensors)
β”‚   β”œβ”€β”€ kth20_tau_one_ep100.pth   # original checkpoint, unchanged
β”‚   └── kth20_tau_one_ep100.log   # original training log (hyper-parameters + test metrics)
β”œβ”€β”€ ...                          # 23 checkpoint folders in total
β”œβ”€β”€ visualizations/*.gif         # upstream ground-truth vs prediction GIFs
β”œβ”€β”€ openstl_hub.py               # loader
└── assets/demo_banner.mp4

Usage

The checkpoints need the OpenSTL code they were trained with (branch OpenSTLv0.3.0). openstl_hub.py rebuilds the network from the hyper-parameters in the checkpoint's own log and loads the weights strictly.

git clone -b OpenSTLv0.3.0 https://github.com/chengtan9907/OpenSTL
pip install -e OpenSTL "timm<=0.6.11" huggingface_hub safetensors
import torch
from huggingface_hub import hf_hub_download

hf_hub_download("dronefreak/OpenSTL-KTH", "openstl_hub.py", local_dir=".")
from openstl_hub import load_openstl

method, args = load_openstl("dronefreak/OpenSTL-KTH", "kth20_tau_one_ep100")
T, C, H, W = args.in_shape
x = torch.rand(1, args.pre_seq_length, C, H, W)   # observed frames, values in [0, 1]
y = torch.zeros(1, args.aft_seq_length, C, H, W)  # placeholder for the frames to predict
with torch.no_grad():
    pred = method._predict(x, y)                    # (1, aft_seq_length, C, H, W)

method.model is the plain torch.nn.Module. RNN-type methods (ConvLSTM, PredRNN family, MIM, MAU, E3D-LSTM) take the target tensor only for its shape at test time. For DMVFN the loader returns only the network (its training wrapper downloads VGG19 for a loss); it predicts one frame: method.model(torch.cat([x, y], 1), training=False)[-1]. CrevNet's code calls .cuda() internally; on CPU run it inside with openstl_hub.cuda_to_cpu():. CrevNet also reads the whole 20-frame clip (torch.cat([x_all_10, y], 1) with x of length in_shape[0]) and its recurrent state is sized for the training batch, so call it with batches of args.batch_size (16).

To use the weights without OpenSTL's loader: safetensors.torch.load_file("<name>/model.safetensors") gives a state dict for the matching OpenSTL model class.

Verification

  • All 23 release checkpoints downloaded and size-checked against the GitHub API.
  • model.safetensors round trip: same keys, dtypes, shapes and raw bytes as the .pth for all 23 checkpoints. A perturbed tensor is detected as a negative control.
  • Functional check: every checkpoint was rebuilt from its own log with OpenSTL v0.3.0, loaded with strict=True, and ran a CPU forward pass with the expected output shape and finite values. A corrupted state dict is rejected as a negative control. These steps run through the same openstl_hub.py that ships here.
  • Parameter counts of the loaded networks were cross-checked against the Params column of the docs. Any disagreement is listed above.
  • Accuracy metrics were not re-evaluated; the table numbers are the authors'.

Citation

@inproceedings{tan2023openstl,
  title={OpenSTL: A Comprehensive Benchmark of Spatio-Temporal Predictive Learning},
  author={Tan, Cheng and Li, Siyuan and Gao, Zhangyang and Guan, Wenfei and Wang, Zedong and Liu, Zicheng and Wu, Lirong and Li, Stan Z},
  booktitle={Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
  year={2023}
}

Please also cite the paper of the method you use (links in the table above).

License

The weights, logs and visualisations are redistributed under the Apache License 2.0 of the OpenSTL repository (Copyright 2022-2023 CAIRI AI Lab). The training data has its own terms (see Training data above), which may restrict some uses of the models.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train dronefreak/OpenSTL-KTH

Collections including dronefreak/OpenSTL-KTH

Papers for dronefreak/OpenSTL-KTH