SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Wang_BEVT_BERT_Pretraining_of_Video_Transformers_CVPR_2022_paper · CVPR · 2022

BEVT: BERT Pretraining of Video Transformers

Rui Wang, Zuxuan Wu, Dongdong Chen, Lu Yuan, Xiyang Dai, Yinpeng Chen, Mengchen Liu, Luowei Zhou, Yu-Gang Jiang

Open in the Atlas

Code that ran

6 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/Wang_BEVT_BERT_Pretraining_of_Video_Transformers_CVPR_2022_paper.json · badge: /api/ran/Wang_BEVT_BERT_Pretraining_of_Video_Transformers_CVPR_2022_paper.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
xyzforever/BEVT canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
get_results_json Ran
ran on a synthesized input
xyzforever/BEVT/demo/long_video_demo.py
code served (permissive licence) · get_code("95ad82b70e901f5c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from collections import deque

torch_manual_seed = __import__('torch').manual_seed(0)

# Construct result_queue as a deque containing results
# Results are tuples of (label, score)
result_queue = deque()
result_queue.append([
    ("cat", 0.95),
    ("dog", 0.78),
    ("bird", 0.15),
])

# text_info is a dict that gets populated or used as fallback
text_info = {}

# thr is a threshold for filtering scores
thr = 0.5

# msg is a default message string
msg = "No results available"

# ind is an index/key for the output dictionary
ind = "sample_1"

# out_json is the output dictionary that gets populated
out_json = {}

ARGS = {
    "result_queue": result_queue,
    "text_info": text_info,
    "thr": thr,
    "msg": msg,
    "ind": ind,
    "out_json": out_json,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_window_size Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xyzforever/BEVT/mmaction/models/backbones/swin_transformer_bevt.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from shiqiyu/opengait, is pointer only (licence: NONE) · get_code("aad0ea11cb13d353")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from shiqiyu/opengait, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

hex2color Ran
ran, honoured the contract we drafted
xyzforever/BEVT/demo/demo_spatiotemporal_det.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from vut-hfut/micro-action, is pointer only (licence: NONE) · get_code("476b2e68d2861ca3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from vut-hfut/micro-action, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

show_results_video Ran
ran on a synthesized input
xyzforever/BEVT/demo/long_video_demo.py
code served (permissive licence) · get_code("8bfa8e676c9b169b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import cv2
import numpy as np
from collections import deque

# Create a minimal video writer mock that has a write method
class MockVideoWriter:
    def write(self, frame):
        pass

# Create a small frame (3-channel BGR image)
frame = np.zeros((480, 640, 3), dtype=np.uint8)

# Create result_queue with deque containing sample results
# Each result is a tuple of (label, score)
result_queue = deque()
result_queue.append([
    ("cat", 0.95),
    ("dog", 0.85),
    ("bird", 0.45)
])

# Initial text_info dictionary
text_info = {}

# Threshold for filtering results
thr = 0.5

# Message to display when no results
msg = "Processing..."

# Video writer object
video_writer = MockVideoWriter()

# Label color (BGR format)
label_color = (255, 255, 255)

# Message color (BGR format)
msg_color = (128, 128, 128)

ARGS = {
    "result_queue": result_queue,
    "text_info": text_info,
    "thr": thr,
    "msg": msg,
    "frame": frame,
    "video_writer": video_writer,
    "label_color": label_color,
    "msg_color": msg_color
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
window_partition Ran
ran on a synthesized input
xyzforever/BEVT/mmaction/models/backbones/swin_transformer_bevt.py
code served (permissive licence) · get_code("76aefac391a1e02c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (8, 16, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from functools import reduce
from operator import mul

torch.manual_seed(0)

# Test case 1: Image input (is_img=True)
# x should be (B, H, W, C) where H and W are divisible by window_size
B, H, W, C = 2, 8, 8, 4
x_img = torch.randn(B, H, W, C)
window_size_img = 4

# Test case 2: Video input (is_img=False)
# x should be (B, D, H, W, C) where D, H, W are divisible by window_size
B_vid, D, H_vid, W_vid, C_vid = 2, 4, 8, 8, 4
x_vid = torch.randn(B_vid, D, H_vid, W_vid, C_vid)
window_size_vid = (2, 4, 4)

# Create ARGS for image case
ARGS = {
    "x": x_img,
    "window_size": window_size_img,
    "is_img": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (8, 16, 4) — shape (8, 16, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
window_reverse Ran
ran on a synthesized input
xyzforever/BEVT/mmaction/models/backbones/swin_transformer_bevt.py
code served (permissive licence) · get_code("7ff604aba4c390a2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 8, 8, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Test case 1: Image mode (is_img=True)
# For is_img=True: windows shape is (B*num_windows, window_size, window_size, C)
# where num_windows = (H/window_size) * (W/window_size)
# Let's use: B=2, H=8, W=8, window_size=4, C=3
# So num_windows = (8/4) * (8/4) = 4
# windows shape should be (2*4, 4, 4, 3) = (8, 4, 4, 3)

windows_img = torch.randn(8, 4, 4, 3)

ARGS = {
    "windows": windows_img,
    "window_size": 4,
    "B": 2,
    "D": 8,
    "H": 8,
    "W": 8,
    "is_img": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 8, 8, 3) — shape (2, 8, 8, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
frame_extraction Not yet run
unverified (harvested, no recorded run)
xyzforever/BEVT/demo/demo_spatiotemporal_det.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from vut-hfut/micro-action, is pointer only (licence: NONE) · get_code("3fd874d90e302675")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from vut-hfut/micro-action, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 5 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_window_size 26 other papers
3 dated earlier, 18 later, 5 same year, order not determinable · 7 only as an assembly brick
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.13230 (2021-06)
Video Swin Transformer
2111.14821 (2021-11)
End-to-End Referring Video Object Segmentation with Multimodal Transformers
and 23 more not named here
hex2color 5 other papers
1 dated earlier, 3 later, 1 same year, order not determinable
2106.13230 (2021-06)
Video Swin Transformer
2209.12797 (2022-09)
Rethinking Resolution in the Context of Efficient Video Recognition
2310.16447 (2023-10)
ChimpACT: A Longitudinal Dataset for Understanding Chimpanzee Behaviors
and 2 more not named here
frame_extraction 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable
2106.13230 (2021-06)
Video Swin Transformer
2209.12797 (2022-09)
Rethinking Resolution in the Context of Efficient Video Recognition
2403.05234 (2024-03)
Benchmarking Micro-action Recognition: Dataset, Methods, and Applications
get_results_json 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable
2106.13230 (2021-06)
Video Swin Transformer
2209.12797 (2022-09)
Rethinking Resolution in the Context of Efficient Video Recognition
2412.21197 (2024-12)
A Large-Scale Study on Video Action Dataset Condensation
show_results_video 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable
2106.13230 (2021-06)
Video Swin Transformer
2209.12797 (2022-09)
Rethinking Resolution in the Context of Efficient Video Recognition
2412.21197 (2024-12)
A Large-Scale Study on Video Action Dataset Condensation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

This paper studies the BERT pretraining of video transformers. It is a straightforward but worth-studying extension given the recent success from BERT pretraining of image transformers. We introduce BEVT which decouples video representation learning into spatial representation learning and temporal dynamics learning. In particular, BEVT first performs masked image modeling on image data, and then conducts masked image modeling jointly with masked video modeling on video data. This design is motivated by two observations: 1) transformers learned on image datasets provide decent spatial priors that can ease the learning of video transformers, which are often times computationally-intensive if trained from scratch; 2) discriminative clues, i.e., spatial and temporal information, needed to make correct predictions vary among different videos due to large intra-class and interclass variations. We conduct extensive experiments on three challenging video benchmarks where BEVT achieves very promising results. On Kinetics 400, for which recognition mostly relies on discriminative spatial representations, BEVT achieves comparable results to strong supervised baselines. On Something-Something-V2 and Diving 48, which contain videos relying on temporal dynamics, BEVT outperforms by clear margins all alternative baselines and achieves state-of-the-art performance with a 71.4% and 87.2% Top-1 accuracy respectively. Code is available at https://github.com/xyzforever/BEVT.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("Wang_BEVT_BERT_Pretraining_of_Video_Transformers_CVPR_2022_paper")
get_code_for_paper("Wang_BEVT_BERT_Pretraining_of_Video_Transformers_CVPR_2022_paper")
have("Wang_BEVT_BERT_Pretraining_of_Video_Transformers_CVPR_2022_paper")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/Wang_BEVT_BERT_Pretraining_of_Video_Transformers_CVPR_2022_paper.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/Wang_BEVT_BERT_Pretraining_of_Video_Transformers_CVPR_2022_paper.svg)](https://syntology.ai/paper/Wang_BEVT_BERT_Pretraining_of_Video_Transformers_CVPR_2022_paper)

Connect an agent — have() is free.