SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.08361 · 2022

Stitch it in Time: GAN-Based Facial Editing of Real Videos

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 2 have no contract verdict; 2 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.08361.json · badge: /api/ran/2201.08361.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
rotemtzaban/STIT canonical (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
FunctionStatusWhere it lives
calc_mask Ran
ran on a synthesized input
rotemtzaban/STIT/edit_video.py
code served (permissive licence) · get_code("a63832da3a38acee")
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, 1, 1024, 1024) 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
from torch import nn
from torch.nn import functional as F
from torchvision import transforms

torch.manual_seed(0)

# Create a minimal segmentation model that outputs class predictions
class MinimalSegmentationModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Simple model that takes normalized input and outputs segmentation logits
        self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
        self.conv2 = nn.Conv2d(16, 19, kernel_size=3, padding=1)  # 19 classes for ADE20K-like
    
    def forward(self, x):
        # x shape: (batch, 3, 512, 512)
        x = F.relu(self.conv1(x))
        x = self.conv2(x)
        # Return as list with single element containing logits
        # Shape: (batch, 19, 512, 512)
        return [x]

# Create inversion tensor
# Shape: (batch=2, channels=3, height=256, width=256)
inversion = torch.randn(2, 3, 256, 256)

# Create segmentation model
segmentation_model = MinimalSegmentationModel()

ARGS = {
    'inversion': inversion,
    'segmentation_model': segmentation_model
}
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 Tensor, ndim 4, dtype family float, shape (2, 1, 1024, 1024) — shape (2, 1, 1024, 1024) 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
rotemtzaban/STIT/models/seg_model_2.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
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 lixiaotong97/DSU, 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.

create_dump_file Ran
ran on a synthesized input
rotemtzaban/STIT/edit_video_stitching_tuning.py
code served (permissive licence) · get_code("3224f38ddf152a3c")
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 numpy as np
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create small PIL images for testing
def create_test_image(size=(64, 48), mode='RGB', color=(100, 150, 200)):
    """Create a simple test PIL image"""
    return Image.new(mode, size, color)

def create_test_mask_image(size=(64, 48)):
    """Create a simple test mask image in grayscale"""
    return Image.new('L', size, 128)

# Create test images
orig_image = create_test_image(size=(64, 48), mode='RGB', color=(100, 150, 200))
optimized_image = create_test_image(size=(64, 48), mode='RGB', color=(110, 160, 210))
edited_image = create_test_image(size=(64, 48), mode='RGB', color=(120, 170, 220))
crop = create_test_image(size=(32, 24), mode='RGB', color=(80, 120, 180))
inner_mask_image = create_test_mask_image(size=(64, 48))
full_mask_image = create_test_mask_image(size=(64, 48))
border_mask_image = create_test_mask_image(size=(64, 48))

# Create inverse_transform as a numpy array (common for affine transforms)
inverse_transform = np.array([
    [1.0, 0.0, 0.0],
    [0.0, 1.0, 0.0],
    [0.0, 0.0, 1.0]
])

# Create quad as a list of coordinate tuples
quad = [(0, 0), (64, 0), (64, 48), (0, 48)]

ARGS = {
    'border_mask_image': border_mask_image,
    'crop': crop,
    'full_mask_image': full_mask_image,
    'inner_mask_image': inner_mask_image,
    'inverse_transform': inverse_transform,
    'optimized_image': optimized_image,
    'orig_image': orig_image,
    'quad': quad,
    'edited_image': edited_image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, 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
create_layer_basic Ran
ran; our contract draft was wrong, not the code
rotemtzaban/STIT/models/seg_model_2.py
pointer only (licence: MIT); the stored copy get_code serves, from vladhondru25/DF-MoE, is pointer only (licence: NOASSERTION) · get_code("325b8d54f52e2421")
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 vladhondru25/DF-MoE, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

zeroshot_classifier Not yet run
unverified (harvested, no recorded run)
rotemtzaban/STIT/editings/styleclip_global_utils.py
code served (permissive licence) · get_code("ef8f8ee42f9bf8a7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 2 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
conv3x3 686 other papers
363 dated earlier, 4 the same month, 308 later, 11 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
create_layer_basic 18 other papers
5 dated earlier, 13 later
1904.07399 (2019-04)
Adaptive Wing Loss for Robust Face Alignment via Heatmap Regression
1911.09070 (2019-11)
EfficientDet: Scalable and Efficient Object Detection
2011.00844 (2020-11)
Do 2D GANs Know 3D Shape? Unsupervised 3D shape reconstruction from 2D Image GANs
and 15 more not named here

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

The ability of Generative Adversarial Networks to encode rich semantics within their latent space has been widely adopted for facial image editing. However, replicating their success with videos has proven challenging. Sets of high-quality facial videos are lacking, and working with videos introduces a fundamental barrier to overcome - temporal coherency. We propose that this barrier is largely artificial. The source video is already temporally coherent, and deviations from this state arise in part due to careless treatment of individual components in the editing pipeline. We leverage the natural alignment of StyleGAN and the tendency of neural networks to learn low frequency functions, and demonstrate that they provide a strongly consistent prior. We draw on these insights and propose a framework for semantic editing of faces in videos, demonstrating significant improvements over the current state-of-the-art. Our method produces meaningful face manipulations, maintains a higher degree of temporal consistency, and can be applied to challenging, high quality, talking head videos which current methods struggle with.

For agents

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

get_harvested_code_for_paper("2201.08361")
get_code_for_paper("2201.08361")
have("2201.08361")

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

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

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

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

Connect an agent — have() is free.