SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.01865 · 2019

StarGAN v2: Diverse Image Synthesis for Multiple Domains

arXiv · PDF · Open in the Atlas

Code that ran

3 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; 1 failure of our instrument; 2 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/1912.01865.json · badge: /api/ran/1912.01865.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
taki0112/StarGAN_v2-Tensorflow community (classifier label)
classifier basis not recorded on the link
2 ran · 2 no recorded run
UdonDa/StarGAN-v2-pytorch-nonofficial community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
get_loader Ran
ran on a synthesized input
UdonDa/StarGAN-v2-pytorch-nonofficial/data_loader.py
code served (permissive licence) · get_code("5ab14f9a150cfbc0")
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 DataLoader. 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 tempfile
import os
from PIL import Image
from torchvision.datasets import ImageFolder

torch.manual_seed(0)

# Create a temporary directory with dummy image data
temp_dir = tempfile.mkdtemp()
train_dir = os.path.join(temp_dir, 'train')
os.makedirs(train_dir, exist_ok=True)

# Create class subdirectories
class_dir = os.path.join(train_dir, 'class_0')
os.makedirs(class_dir, exist_ok=True)

# Create dummy images
for i in range(4):
    img = Image.new('RGB', (256, 256), color=(i*60, i*60, i*60))
    img.save(os.path.join(class_dir, f'image_{i}.jpg'))

ARGS = {
    'image_dir': train_dir,
    'crop_size': 178,
    'image_size': 128,
    'batch_size': 2,
    'mode': 'train',
    'num_workers': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
load_test_image Ran
ran on a synthesized input
taki0112/StarGAN_v2-Tensorflow/utils.py
code served (permissive licence) · get_code("562021bdb7164a5d")
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 4, dtype family float, shape (1, 48, 64, 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 numpy as np
import cv2
import tempfile
import os

# Create a temporary test image file
temp_dir = tempfile.mkdtemp()
image_path = os.path.join(temp_dir, "test_image.jpg")

# Create a small dummy image and save it
dummy_image = np.random.randint(0, 256, (100, 100, 3), dtype=np.uint8)
cv2.imwrite(image_path, dummy_image)

ARGS = {
    "image_path": image_path,
    "img_width": 64,
    "img_height": 48,
    "img_channel": 3
}
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 ndarray, ndim 4, dtype family float, shape (1, 48, 64, 3) — shape (1, 48, 64, 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
save_images Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
taki0112/StarGAN_v2-Tensorflow/utils.py
code served (permissive licence) · get_code("9d2adbb5b1cd4527")
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 bool, ndim 0, dtype family float, shape () 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

torch.manual_seed(0)

# Analyze the function:
# save_images(images, size, image_path)
# - images: passed to inverse_transform, which does (images + 1.0) / 2 * 255.0
#           then to imsave which calls merge(images, size)
#           merge expects images.shape[1] and images.shape[2] to exist (h, w)
#           and iterates over images with enumerate, so needs shape[0] (batch dimension)
#           expects shape (batch, height, width, 3) based on the merge logic
# - size: passed to merge as size[0] and size[1], so a tuple/list with 2 elements
# - image_path: passed to cv2.imwrite, just needs to be a string path

# Create tiny images tensor: (batch=2, height=4, width=3, channels=3)
# Values in [-1, 1] range so inverse_transform produces valid [0, 255] range
images = np.random.uniform(-1, 1, size=(2, 4, 3, 3)).astype(np.float32)

# Size tuple for merging: (rows, cols) - 2x1 grid means 2 rows, 1 column
size = (2, 1)

# Image path - use a simple string (function will try to write, but we accept that)
image_path = "/tmp/test_output.png"

ARGS = {
    "images": images,
    "size": size,
    "image_path": image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () 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
augmentation Not yet run
unverified (harvested, no recorded run)
taki0112/StarGAN_v2-Tensorflow/utils.py
code served (permissive licence) · get_code("d04b4ce2d0d02c25")
How it ran

no invocation recorded.

flatten Not yet run
unverified (harvested, no recorded run)
taki0112/StarGAN_v2-Tensorflow/ops.py
code served (permissive licence) · get_code("d29bc3068b3eae3f")
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 1 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
save_images 7 other papers
4 dated earlier, 3 later
1703.03208 (2017-03)
Compressed Sensing using Generative Models
1802.08406 (2018-02)
Solving Linear Inverse Problems Using GAN Priors: An Algorithm with Provable Guarantees
1811.03205 (2018-11)
Robustness of Conditional GANs to Noisy Labels
and 4 more not named here
flatten 5 other papers
5 dated earlier
1804.04732 (2018-04)
Multimodal Unsupervised Image-to-Image Translation
1807.00734 (2018-07)
The relativistic discriminator: a key element missing from standard GAN
1812.09912 (2018-12)
Image-to-Image Translation via Group-wise Deep Whitening-and-Coloring Transformation
and 2 more not named here
load_test_image 1 other paper
1 dated earlier
1909.07083 (2019-09)
Controllable Text-to-Image Generation

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

A good image-to-image translation model should learn a mapping between different visual domains while satisfying the following properties: 1) diversity of generated images and 2) scalability over multiple domains. Existing methods address either of the issues, having limited diversity or multiple models for all domains. We propose StarGAN v2, a single framework that tackles both and shows significantly improved results over the baselines. Experiments on CelebA-HQ and a new animal faces dataset (AFHQ) validate our superiority in terms of visual quality, diversity, and scalability. To better assess image-to-image translation models, we release AFHQ, high-quality animal faces with large inter- and intra-domain differences. The code, pretrained models, and dataset can be found at https://github.com/clovaai/stargan-v2.

For agents

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

get_harvested_code_for_paper("1912.01865")
get_code_for_paper("1912.01865")
have("1912.01865")

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

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

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

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

Connect an agent — have() is free.