OpenSTL Checkpoints: TaxiBJ crowd flow (4 β†’ 4 frames)

License Paper Code Checkpoints

  • Benchmark: TaxiBJ crowd flow, 4 to 4 frames
  • Checkpoints: 23
  • Task: spatiotemporal predictive learning
  • Source: OpenSTL GitHub release taxibj-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 taxibj-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. TaxiBJ (Zhang, Zheng and Qi, ST-ResNet, AAAI 2017).

Task. Predict 4 future 32x32 inflow/outflow maps of Beijing taxi traffic from 4 observed maps.

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.

Problems in the upstream release

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

  • taxibj_prednet_cos_ep50.pth is a SimVP network: its own log shows method: simvp with config_file: ../configs/taxibj/PredNet.py, and the weights load strictly as SimVP. Treat the PredNet row of the TaxiBJ table accordingly.

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 traffic benchmark results on the popular TaxiBJ dataset using $4\rightarrow 4$ frames prediction setting. Metrics (MSE, MAE, SSIM, pSNR) of the best models are reported in three trials. Parameters (M), FLOPs (G), and V100 inference FPS (s) are also reported for all methods. All methods are trained by Adam optimizer with Cosine Annealing scheduler (5 epochs warmup and min lr is 1e-6) and single GPU.

STL Benchmarks on TaxiBJ

For a fair comparison of different methods, we report the best results when models are trained to convergence. We provide config files in configs/taxibj.

Method Setting Params FLOPs FPS MSE MAE SSIM PSNR Download
ConvLSTM-S 50 epoch 14.98M 20.74G 815 0.3358 15.32 0.9836 39.45 model | log
E3D-LSTM* 50 epoch 50.99M 98.19G 60 0.3427 14.98 0.9842 39.64 model | log
PhyDNet 50 epoch 3.09M 5.60G 982 0.3622 15.53 0.9828 39.46 model | log
PredNet 50 epoch 12.5M 0.85G 5031 0.3516 15.91 0.9828 39.29 model | log
PredRNN 50 epoch 23.66M 42.40G 416 0.3194 15.31 0.9838 39.51 model | log
MIM 50 epoch 37.86M 64.10G 275 0.3110 14.96 0.9847 39.65 model | log
MAU 50 epoch 4.41M 6.02G 540 0.3268 15.26 0.9834 39.52 model | log
PredRNN++ 50 epoch 38.40M 62.95G 301 0.3348 15.37 0.9834 39.47 model | log
PredRNN.V2 50 epoch 23.67M 42.63G 378 0.3834 15.55 0.9826 39.49 model | log
DMVFN 50 epoch 3.54M 0.057G 6347 3.3954 45.52 0.8321 31.14 model | log
SimVP+IncepU 50 epoch 13.79M 3.61G 533 0.3282 15.45 0.9835 39.45 model | log
SimVP+gSTA-S 50 epoch 9.96M 2.62G 1217 0.3246 15.03 0.9844 39.71 model | log
TAU 50 epoch 9.55M 2.49G 1268 0.3108 14.93 0.9848 39.74 model | log

Benchmark of MetaFormers on SimVP (MetaVP)

Similar to Moving MNIST Benchmarks, we benchmark popular Metaformer architectures on SimVP with training times of 50-epoch. We provide config files in configs/taxibj/simvp.

MetaFormer Setting Params FLOPs FPS MSE MAE SSIM PSNR Download
SimVP+IncepU 50 epoch 13.79M 3.61G 533 0.3282 15.45 0.9835 39.45 model | log
SimVP+gSTA-S 50 epoch 9.96M 2.62G 1217 0.3246 15.03 0.9844 39.71 model | log
ViT 50 epoch 9.66M 2.80G 1301 0.3171 15.15 0.9841 39.64 model | log
Swin Transformer 50 epoch 9.66M 2.56G 1506 0.3128 15.07 0.9847 39.65 model | log
Uniformer 50 epoch 9.52M 2.71G 1333 0.3268 15.16 0.9844 39.64 model | log
MLP-Mixer 50 epoch 8.24M 2.18G 1974 0.3206 15.37 0.9841 39.49 model | log
ConvMixer 50 epoch 0.84M 0.23G 4793 0.3634 15.63 0.9831 39.41 model | log
Poolformer 50 epoch 7.75M 2.06G 1827 0.3273 15.39 0.9840 39.46 model | log
ConvNeXt 50 epoch 7.84M 2.08G 1918 0.3106 14.90 0.9845 39.76 model | log
VAN 50 epoch 9.48M 2.49G 1273 0.3125 14.96 0.9848 39.72 model | log
HorNet 50 epoch 9.68M 2.54G 1350 0.3186 15.01 0.9843 39.66 model | log
MogaNet 50 epoch 9.96M 2.61G 1005 0.3114 15.06 0.9847 39.70 model | log
TAU 50 epoch 9.55M 2.49G 1268 0.3108 14.93 0.9848 39.74 model | log

(back to top)

Structure

OpenSTL-TaxiBJ/
β”œβ”€β”€ taxibj_tau_cos_ep50/
β”‚   β”œβ”€β”€ model.safetensors        # weights (safetensors)
β”‚   β”œβ”€β”€ taxibj_tau_cos_ep50.pth   # original checkpoint, unchanged
β”‚   └── taxibj_tau_cos_ep50.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-TaxiBJ", "openstl_hub.py", local_dir=".")
from openstl_hub import load_openstl

method, args = load_openstl("dronefreak/OpenSTL-TaxiBJ", "taxibj_tau_cos_ep50")
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

Collections including dronefreak/OpenSTL-TaxiBJ

Papers for dronefreak/OpenSTL-TaxiBJ