SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.06374 · CVPR · 2022

RestoreFormer: High-Quality Blind Face Restoration from Undegraded Key-Value Pairs

Jiawei Zhang, Ping Luo, Runjian Chen, Wenping Wang, Zhouxia Wang

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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 0 have no contract verdict; 3 failures 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/2201.06374.json · badge: /api/ran/2201.06374.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
wzhouxiff/restoreformer marked official in Papers with Code
Papers with Code archive
2 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
get_obj_from_str Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from LIAGM/DAEFR
pointer only; the stored copy get_code serves, from LIAGM/DAEFR, is pointer only (licence: NONE) · get_code("4e4f3bef7e8672e8")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

get_roi_regions Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformer/RestoreFormer/models/vqgan_v1.py
code served (permissive licence) · get_code("5b42007bdd25d563")
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 torch
from torchvision.ops import roi_align

torch.manual_seed(0)

# Batch size: 2, Channels: 3, Height: 64, Width: 64
batch_size = 2
channels = 3
height = 64
width = 64

# Create dummy feature maps
gt = torch.randn(batch_size, channels, height, width)
output = torch.randn(batch_size, channels, height, width)

# Create location tensors for eyes and mouths
# Each location is [x1, y1, x2, y2] format for roi_align
# Batch size: 2
loc_left_eyes = torch.tensor([
    [10.0, 10.0, 25.0, 30.0],
    [15.0, 12.0, 28.0, 32.0]
], dtype=torch.float32)

loc_right_eyes = torch.tensor([
    [40.0, 10.0, 55.0, 30.0],
    [45.0, 12.0, 58.0, 32.0]
], dtype=torch.float32)

loc_mouths = torch.tensor([
    [25.0, 45.0, 40.0, 60.0],
    [28.0, 48.0, 42.0, 62.0]
], dtype=torch.float32)

ARGS = {
    'gt': gt,
    'output': output,
    'loc_left_eyes': loc_left_eyes,
    'loc_right_eyes': loc_right_eyes,
    'loc_mouths': loc_mouths,
    'face_ratio': 1.0,
    'eye_out_size': 80,
    'mouth_out_size': 120
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — 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
instantiate_from_config Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformer/RestoreFormer/models/vqgan_v1.py
code served (permissive licence) · get_code("ba07a5ae5fe07704")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal stand-in class for a target that uses basicsr.data
class MockBasicSRDataset:
    def __init__(self, params):
        self.params = params

# Create a minimal stand-in class for FFHQDegradationDataset
class MockFFHQDegradationDataset:
    def __init__(self, params):
        self.params = params

# Create a minimal nn.Module for a non-basicsr target
class MockModel(nn.Module):
    def __init__(self, hidden_dim=8):
        super().__init__()
        self.linear = nn.Linear(hidden_dim, hidden_dim)
    
    def forward(self, x):
        return self.linear(x)

# Test config 1: basicsr.data target (should pass config dict directly)
config_basicsr = {
    'target': 'builtins.dict',
    'params': {'key': 'value'}
}

# Test config 2: FFHQDegradationDataset target (should pass config dict directly)
config_ffhq = {
    'target': 'builtins.dict',
    'params': {'degradation': 'gaussian'}
}

# Test config 3: Standard target with params (should unpack params as kwargs)
config_standard = {
    'target': 'builtins.dict',
    'params': {'a': 1, 'b': 2}
}

# Test config 4: Target without params
config_no_params = {
    'target': 'builtins.dict'
}

ARGS = {
    'config': config_standard
}
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 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
RestoreFormerModel Not yet run
unverified (harvested, no recorded run)
wzhouxiff/restoreformer/RestoreFormer/models/vqgan_v1.py
code served (permissive licence) · get_code("50e59b7f29e90581")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 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_obj_from_str
brick of this paper's assembly: helper
54 other papers
3 dated earlier, 51 later · 12 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
and 51 more not named here
get_roi_regions
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2308.07314 (2023-08)
Dual Associated Encoder for Face Restoration

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

SenseTime Research Input DFDNet [24] Wan et al. [35] PULSE [29], PSFRGAN [5] GFP-GAN [37] RestoreFormer real-world ECCV 20 CVPR 20 CVPR 20 CVPR 21 CVPR 21 Ours Figure 1. Comparisons with state-of-the-art face restoration methods on some degraded real-world images. The restored results of our RestoreFormer contain more texture details and complete structures which make our results more natural and authentic.

For agents

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

get_harvested_code_for_paper("2201.06374")
get_code_for_paper("2201.06374")
have("2201.06374")

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

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

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

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

Connect an agent — have() is free.