SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.07778 · 2022

Spatial-then-Temporal Self-Supervised Learning for Video Correspondence

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 5 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2209.07778.json · badge: /api/ran/2209.07778.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
qianduoduolr/Spa-then-Temp canonical (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
FunctionStatusWhere it lives
db_eval_boundary Ran
ran on a synthesized input
qianduoduolr/Spa-then-Temp/vcl/core/evaluation/metrics.py
code served (permissive licence) · get_code("a17c03f2d460cb0c")
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 (2,) 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 math

np.random.seed(0)

# Create simple binary masks for testing
# Using distinct dimensions: 4 rows, 3 columns for clarity
height, width = 4, 3

# annotation (gt_mask) - ground truth binary mask
annotation_2d = np.random.randint(0, 2, size=(height, width, 1)).astype(np.uint8)

# segmentation (foreground_mask) - predicted binary mask
segmentation_2d = np.random.randint(0, 2, size=(height, width, 1)).astype(np.uint8)

# void_pixels - optional mask for void pixels
void_pixels_2d = np.zeros((height, width, 1), dtype=np.uint8)

# Test with 3D tensors (multiple frames)
n_frames = 2
annotation_3d = np.random.randint(0, 2, size=(n_frames, height, width)).astype(np.uint8)
segmentation_3d = np.random.randint(0, 2, size=(n_frames, height, width)).astype(np.uint8)
void_pixels_3d = np.zeros((n_frames, height, width), dtype=np.uint8)

ARGS = {
    "annotation": annotation_3d,
    "segmentation": segmentation_3d,
    "void_pixels": void_pixels_3d,
    "bound_th": 0.008
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, skimage — 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 (2,) — shape (2,) 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
db_eval_iou Ran
ran on a synthesized input
qianduoduolr/Spa-then-Temp/vcl/core/evaluation/metrics.py
code served (permissive licence) · get_code("3247aae8655f6cc7")
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 float64, ndim 0, 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.

import numpy as np

# Create small binary annotation map (4x3 shape for distinctness)
annotation = np.random.randint(0, 2, size=(4, 3)).astype(np.uint8)

# Create small binary segmentation map (same shape as annotation)
segmentation = np.random.randint(0, 2, size=(4, 3)).astype(np.uint8)

# Create optional void_pixels mask (same shape)
void_pixels = np.random.randint(0, 2, size=(4, 3)).astype(np.uint8)

ARGS = {
    "annotation": annotation,
    "segmentation": segmentation,
    "void_pixels": void_pixels,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
qianduoduolr/Spa-then-Temp/vcl/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
f_measure Ran
ran on a synthesized input
qianduoduolr/Spa-then-Temp/vcl/core/evaluation/metrics.py
code served (permissive licence) · get_code("25aa01d11ecc71f5")
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 float64, ndim 0, 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.

import numpy as np
import cv2

# Create small binary segmentation masks
# foreground_mask: binary segmentation image
foreground_mask = np.array([
    [[0], [1], [1], [0]],
    [[1], [1], [0], [1]],
    [[0], [1], [1], [1]],
    [[1], [0], [1], [0]]
], dtype=np.uint8)

# gt_mask: binary annotated ground truth image
gt_mask = np.array([
    [[0], [1], [1], [1]],
    [[1], [1], [1], [0]],
    [[0], [1], [0], [1]],
    [[1], [0], [1], [1]]
], dtype=np.uint8)

# void_pixels: optional mask with void pixels (same shape as foreground_mask)
void_pixels = np.array([
    [[0], [0], [0], [0]],
    [[0], [0], [1], [0]],
    [[0], [0], [0], [0]],
    [[0], [0], [0], [0]]
], dtype=np.uint8)

# bound_th: boundary threshold (can be float between 0 and 1, or integer >= 1)
bound_th = 0.008

ARGS = {
    "foreground_mask": foreground_mask,
    "gt_mask": gt_mask,
    "void_pixels": void_pixels,
    "bound_th": bound_th
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
qianduoduolr/Spa-then-Temp/vcl/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
tensor2img Ran
ran; our contract draft was wrong, not the code
qianduoduolr/Spa-then-Temp/vcl/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)
qianduoduolr/Spa-then-Temp/vcl/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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 1 later) and 3 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
tensor2img 3 other papers
2 dated earlier, 1 later
2204.04216 (2022-04)
Learning Trajectory-Aware Transformer for Video Super-Resolution
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
dgaussian 2 other papers
2 dated earlier
2204.04216 (2022-04)
Learning Trajectory-Aware Transformer for Video Super-Resolution
2208.03012 (2022-08)
Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
gauss_filter 2 other papers
2 dated earlier
2204.04216 (2022-04)
Learning Trajectory-Aware Transformer for Video Super-Resolution
2208.03012 (2022-08)
Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
gaussian 2 other papers
2 dated earlier
2204.04216 (2022-04)
Learning Trajectory-Aware Transformer for Video Super-Resolution
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

In low-level video analyses, effective representations are important to derive the correspondences between video frames. These representations have been learned in a self-supervised fashion from unlabeled images or videos, using carefully designed pretext tasks in some recent studies. However, the previous work concentrates on either spatial-discriminative features or temporal-repetitive features, with little attention to the synergy between spatial and temporal cues. To address this issue, we propose a spatial-then-temporal self-supervised learning method. Specifically, we firstly extract spatial features from unlabeled images via contrastive learning, and secondly enhance the features by exploiting the temporal cues in unlabeled videos via reconstructive learning. In the second step, we design a global correlation distillation loss to ensure the learning not to forget the spatial cues, and a local correlation distillation loss to combat the temporal discontinuity that harms the reconstruction. The proposed method outperforms the state-of-the-art self-supervised methods, as established by the experimental results on a series of correspondence-based video analysis tasks. Also, we performed ablation studies to verify the effectiveness of the two-step design as well as the distillation losses.

For agents

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

get_harvested_code_for_paper("2209.07778")
get_code_for_paper("2209.07778")
have("2209.07778")

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

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

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

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

Connect an agent — have() is free.