SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.04216 · CVPR · 2022

Learning Trajectory-Aware Transformer for Video Super-Resolution

Jianlong Fu, Huan Yang, Xueming Qian, Chengxu Liu

arXiv · PDF · 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; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2204.04216.json · badge: /api/ran/2204.04216.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
researchmm/TTVSR canonical (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
FunctionStatusWhere it lives
bbox2mask Ran
ran; our contract draft was wrong, not the code
researchmm/TTVSR/mmedit/core/mask.py
pointer only (licence: MIT); the stored copy get_code serves, from thu-ml/DiffusionBridge, is pointer only (licence: NONE) · get_code("d538533133adaba1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from thu-ml/DiffusionBridge, 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.

brush_stroke_mask Ran
ran on a synthesized input
researchmm/TTVSR/mmedit/core/mask.py
code served (permissive licence) · get_code("a728ca5bee3c4984")
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 ndarray, ndim 3, dtype family int, shape (256, 384, 1) 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 math
import numpy as np
from PIL import Image, ImageDraw

ARGS = {
    'img_shape': (256, 384),
    'num_vertexes': (4, 12),
    'mean_angle': 2 * math.pi / 5,
    'angle_range': 2 * math.pi / 15,
    'brush_width': (12, 40),
    'max_loops': 4,
    'dtype': 'uint8'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (256, 384, 1) — shape (256, 384, 1) 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
dgaussian Ran
ran on a synthesized input
researchmm/TTVSR/mmedit/core/evaluation/metric_utils.py
code served (permissive licence) · get_code("da019d97d47ae83c")
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 ndarray, ndim 1, dtype family float, shape (5,) 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 numpy as np
import torch

# Set random seed for reproducibility
torch.manual_seed(0)

# Define ARGS dict with all parameters for dgaussian function
ARGS = {
    "x": np.array([-2.0, -1.0, 0.0, 1.0, 2.0]),
    "sigma": 1.5
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
gaussian Ran
ran on a synthesized input
researchmm/TTVSR/mmedit/core/evaluation/metric_utils.py
code served (permissive licence) · get_code("9e2a94b2a4a36877")
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 ndarray, ndim 1, dtype family float, shape (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 numpy as np

# For gaussian function:
# - x: array_like (can be scalar, list, or numpy array)
# - sigma: float (standard deviation parameter)

# Create test values
x_value = np.array([0.0, 1.0, 2.0, -1.5])  # array of x values
sigma_value = 1.5  # standard deviation as float

ARGS = {
    "x": x_value,
    "sigma": sigma_value,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
pad_sequence Ran
ran on a synthesized input
researchmm/TTVSR/mmedit/apis/restoration_video_inference.py
code served (permissive licence) · get_code("a593a9e8aabde3eb")
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 2, dtype family float, shape (2, 12) 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

torch.manual_seed(0)

# Construct valid arguments for pad_sequence
# The function expects:
# - data: a 2D tensor (batch_size, sequence_length)
# - window_size: an integer

# Create a small 2D tensor with batch_size=2 and sequence_length=8
data = torch.randn(2, 8)

# window_size should be a positive integer
# The function uses window_size // 2 for padding calculation
# Let's use window_size=4 so padding=2
window_size = 4

ARGS = {
    "data": data,
    "window_size": window_size
}
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 2, dtype family float, shape (2, 12) — shape (2, 12) 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
tensor2img Ran
ran; our contract draft was wrong, not the code
researchmm/TTVSR/mmedit/core/misc.py
code served (permissive licence) · get_code("828da151bdfbb726")
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 ndarray, ndim 3, dtype family int, shape (14, 9, 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 numpy as np

torch.manual_seed(0)

# Test case 1: Single 4D tensor (batch of images)
tensor_4d = torch.rand(2, 3, 4, 5)  # (N=2, C=3, H=4, W=5)

# Test case 2: Single 3D tensor (one image)
tensor_3d = torch.rand(3, 4, 5)  # (C=3, H=4, W=5)

# Test case 3: Single 2D tensor (grayscale)
tensor_2d = torch.rand(4, 5)  # (H=4, W=5)

# Test case 4: List of tensors
tensor_list = [torch.rand(3, 4, 5), torch.rand(3, 4, 5)]

ARGS = {
    'tensor': tensor_4d,
    'out_type': np.uint8,
    'min_max': (0, 1)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (14, 9, 3) — shape (14, 9, 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
gauss_filter Not yet run
unverified (harvested, no recorded run)
researchmm/TTVSR/mmedit/core/evaluation/metric_utils.py
code served (permissive licence) · get_code("6140a018695b3869")
How it ran

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, 7 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 7 later) and 0 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
bbox2mask 6 other papers
6 later
2208.03012 (2022-08)
Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
2303.09757 (2023-03)
Video Dehazing via a Multi-Range Temporal Alignment Network with Physical Prior
2311.12052 (2023-11)
MagicPose: Realistic Human Poses and Facial Expressions Retargeting with Identity-aware Diffusion
and 3 more not named here
tensor2img 3 other papers
3 later
2208.03012 (2022-08)
Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
2209.07778 (2022-09)
Spatial-then-Temporal Self-Supervised Learning for Video Correspondence
2303.09757 (2023-03)
Video Dehazing via a Multi-Range Temporal Alignment Network with Physical Prior
dgaussian 2 other papers
2 later
2208.03012 (2022-08)
Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
2209.07778 (2022-09)
Spatial-then-Temporal Self-Supervised Learning for Video Correspondence
gauss_filter 2 other papers
2 later
2208.03012 (2022-08)
Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
2209.07778 (2022-09)
Spatial-then-Temporal Self-Supervised Learning for Video Correspondence
gaussian 2 other papers
2 later
2208.03012 (2022-08)
Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
2209.07778 (2022-09)
Spatial-then-Temporal Self-Supervised Learning for Video Correspondence
brush_stroke_mask 1 other paper
1 later
2208.03012 (2022-08)
Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
pad_sequence 1 other paper
1 later
2208.03012 (2022-08)
Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution

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-22.

Repositories linked to this paper

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

Abstract

Video super-resolution (VSR) aims to restore a sequence of high-resolution (HR) frames from their low-resolution (LR) counterparts. Although some progress has been made, there are grand challenges to effectively utilize temporal dependency in entire video sequences. Existing approaches usually align and aggregate video frames from limited adjacent frames (e.g., 5 or 7 frames), which prevents these approaches from satisfactory results. In this paper, we take one step further to enable effective spatio-temporal learning in videos. We propose a novel Trajectory-aware Transformer for Video Super-Resolution (TTVSR). In particular, we formulate video frames into several pre-aligned trajectories which consist of continuous visual tokens. For a query token, self-attention is only learned on relevant visual tokens along spatio-temporal trajectories. Compared with vanilla vision Transformers, such a design significantly reduces the computational cost and enables Transformers to model long-range features. We further propose a cross-scale feature tokenization module to overcome scale-changing problems that often occur in longrange videos. Experimental results demonstrate the superiority of the proposed TTVSR over state-of-the-art models, by extensive quantitative and qualitative evaluations in four widely-used video super-resolution benchmarks. Both code and pre-trained models can be downloaded at https://github.com/researchmm/TTVSR.

For agents

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

get_harvested_code_for_paper("2204.04216")
get_code_for_paper("2204.04216")
have("2204.04216")

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

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

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

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

Connect an agent — have() is free.