SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.06725 · 2018

GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training

arXiv · PDF · Open in the Atlas

Code that ran

19 of 23 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 16 have no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/1805.06725.json · badge: /api/ran/1805.06725.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
danbochman/GANomaly-TF2 community (classifier label)
classifier basis not recorded on the link
7 ran · 2 no recorded run
rickyHong/GANomaly-repl community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
samet-akcay/ganomaly community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
YeongHyeon/GANomaly community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
FunctionStatusWhere it lives
annotation_to_bboxes_ltwh Ran
ran on a synthesized input
danbochman/GANomaly-TF2/dataloader/annotation_utils.py
code served (permissive licence) · get_code("987e51bd5d0d4f05")
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 list, ndim 2, dtype family int; 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 a sample annotation in supervise.ly format
ann = {
    'objects': [
        {
            'classTitle': 'defect',
            'points': {
                'exterior': [
                    [10, 20],
                    [50, 20],
                    [50, 60],
                    [10, 60]
                ]
            }
        },
        {
            'classTitle': 'defect',
            'points': {
                'exterior': [
                    [100, 100],
                    [150, 100],
                    [150, 180],
                    [100, 180]
                ]
            }
        },
        {
            'classTitle': 'roi',
            'points': {
                'exterior': [
                    [200, 200],
                    [250, 200],
                    [250, 250],
                    [200, 250]
                ]
            }
        }
    ]
}

ARGS = {
    'ann': ann,
    'classes': 'defect'
}
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 list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
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
augment Ran
ran on a synthesized input
danbochman/GANomaly-TF2/dataloader/augmentations.py
code served (permissive licence) · get_code("99382519a0bea945")
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 EagerTensor, ndim 4, dtype family int, shape (2, 4, 3, 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 tensorflow as tf
import numpy as np

# Create a small batch of valid images for TensorFlow
# Images should be uint8 or float32 with values in appropriate ranges
# Creating a batch of 2 images with height 4, width 3, channels 3 (RGB)
images = tf.constant(np.random.randint(0, 256, size=(2, 4, 3, 3), dtype=np.uint8))

ARGS = {
    "images": images,
    "prob_to_augment": 0.25,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family int, shape (2, 4, 3, 3) — shape (2, 4, 3, 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
auprc Ran
ran on a synthesized input
rickyHong/GANomaly-repl/lib/evaluate.py
code served (permissive licence) · get_code("784683e6a5654175")
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 float, 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 torch
import numpy as np
from sklearn.metrics import roc_curve, auc, average_precision_score, f1_score

torch.manual_seed(0)

# Create binary labels (0 or 1)
labels = np.array([0, 1, 1, 0, 1, 0])

# Create prediction scores (probabilities between 0 and 1)
scores = np.array([0.1, 0.9, 0.8, 0.2, 0.85, 0.15])

ARGS = {
    "labels": labels,
    "scores": scores
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
auprc Ran
ran on a synthesized input
samet-akcay/ganomaly/lib/evaluate.py
code served (permissive licence) · get_code("0fd8eb2f687fa0dd")
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 float, 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 torch
import numpy as np

torch.manual_seed(0)

# Create small binary classification labels and scores
# labels: binary labels (0 or 1)
# scores: predicted scores/probabilities
labels = torch.tensor([0, 1], dtype=torch.float32)
scores = torch.tensor([0.2, 0.8], dtype=torch.float32)

ARGS = {
    "labels": labels,
    "scores": scores,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
bboxes_included_in_crop Ran
ran on a synthesized input
danbochman/GANomaly-TF2/dataloader/cogwheel_slicer.py
code served (permissive licence) · get_code("46ae5523f95a4bb5")
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 float, 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 torch

# Construct arguments for bboxes_included_in_crop
vertical = 10
horizontal = 20
interval = 50

# List of bboxes in (y, x, width, height) format
# Including one bbox that should be partially inside the crop
bboxes = [
    (15, 25, 30, 40),  # y=15, x=25, width=30, height=40
    (100, 200, 10, 10),  # This bbox is outside the crop
]

partial = True

ARGS = {
    "vertical": vertical,
    "horizontal": horizontal,
    "interval": interval,
    "bboxes": bboxes,
    "partial": partial,
}
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 float, 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
center_and_scale Ran
ran on a synthesized input
danbochman/GANomaly-TF2/dataloader/preprocessing.py
code served (permissive licence) · get_code("dd25489eddcd9d2b")
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 3, dtype family float, shape (2, 4, 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)

# Create a small uint8 image tensor in range [0, 255]
img = torch.randint(0, 256, (2, 4, 3), dtype=torch.uint8)

ARGS = {
    "img": img
}
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 Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
dat2canvas Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YeongHyeon/GANomaly/source/tf_process.py
code served (permissive licence) · get_code("5f267024749fe99d")
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 float, shape (56, 56, 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 math

# Create a small batch of grayscale image data
# Shape: (batch_size, height, width, channels)
# Using small dimensions: 4 images of 28x28 with 1 channel (grayscale)
batch_size = 4
height = 28
width = 28
channels = 1

data = np.random.rand(batch_size, height, width, channels).astype(np.float32)

ARGS = {
    "data": data
}
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 3, dtype family float, shape (56, 56, 3) — shape (56, 56, 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
evaluate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
rickyHong/GANomaly-repl/lib/evaluate.py
code served (permissive licence) · get_code("a32f5b6f251d152b")
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 float, 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

ARGS = {
    'labels': np.array([0, 1, 0, 1, 0, 1]),
    'scores': np.array([0.1, 0.9, 0.2, 0.8, 0.3, 0.7]),
    'metric': 'roc'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, scipy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
evaluate Ran
ran on a synthesized input
samet-akcay/ganomaly/lib/evaluate.py
code served (permissive licence) · get_code("15c45ecba2721176")
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 float, 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 torch
import numpy as np

torch.manual_seed(0)

# Create small binary classification tensors
# labels should be binary (0 or 1)
labels = torch.tensor([0, 1, 1, 0, 1, 1], dtype=torch.float32)

# scores should be probabilities or confidence scores
scores = torch.tensor([0.1, 0.9, 0.8, 0.2, 0.7, 0.85], dtype=torch.float32)

ARGS = {
    'labels': labels,
    'scores': scores,
    'metric': 'roc'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, scipy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
get_cifar_anomaly_dataset Ran
ran on a synthesized input
rickyHong/GANomaly-repl/lib/data.py
code served (permissive licence) · get_code("ed42ab65f58ce81e")
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 tuple. 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 numpy as np

# Create small synthetic CIFAR-like data
np.random.seed(0)

# Training data: 10 samples, 32x32x3 images, 5 classes (0-4)
trn_img = np.random.randint(0, 256, size=(10, 32, 32, 3), dtype=np.uint8)
trn_lbl = np.array([0, 0, 1, 1, 2, 2, 3, 3, 4, 4])

# Test data: 8 samples, 32x32x3 images, 5 classes (0-4)
tst_img = np.random.randint(0, 256, size=(8, 32, 32, 3), dtype=np.uint8)
tst_lbl = np.array([0, 1, 1, 2, 2, 3, 4, 4])

ARGS = {
    'trn_img': trn_img,
    'trn_lbl': trn_lbl,
    'tst_img': tst_img,
    'tst_lbl': tst_lbl,
    'abn_cls_idx': 0,
    'manualseed': -1
}
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 tuple — a tuple output has no array shape of its own; none is 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
get_mnist_anomaly_dataset Ran
ran on a synthesized input
rickyHong/GANomaly-repl/lib/data.py
code served (permissive licence) · get_code("a6ddb2558bc17387")
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 tuple. 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

torch.manual_seed(0)
np.random.seed(0)

# Create small synthetic MNIST-like data
# Images: batch_size x channels x height x width
batch_size_train = 10
batch_size_test = 8
channels = 1
height = 4
width = 4

# Training data
trn_img = torch.randn(batch_size_train, channels, height, width)
trn_lbl = torch.tensor([0, 0, 0, 0, 1, 1, 2, 2, 3, 3])

# Test data
tst_img = torch.randn(batch_size_test, channels, height, width)
tst_lbl = torch.tensor([0, 0, 1, 1, 2, 2, 3, 3])

ARGS = {
    "trn_img": trn_img,
    "trn_lbl": trn_lbl,
    "tst_img": tst_img,
    "tst_lbl": tst_lbl,
    "abn_cls_idx": 0,
    "manualseed": -1
}
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 tuple — a tuple output has no array shape of its own; none is 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
gray2rgb Ran
ran on a synthesized input
YeongHyeon/GANomaly/source/tf_process.py
code served (permissive licence) · get_code("aa166086c035e6eb")
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 float, shape (4, 3, 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

# Create a small grayscale image (2D array with single channel)
# Shape should be (height, width, 1) based on how the function accesses gray[:, :, 0]
gray_image = np.random.rand(4, 3, 1).astype(np.float32)

ARGS = {
    "gray": gray_image
}
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 3, dtype family float, shape (4, 3, 3) — shape (4, 3, 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
img_slice_and_label Ran
ran on a synthesized input
danbochman/GANomaly-TF2/dataloader/cogwheel_slicer.py
code served (permissive licence) · get_code("65c5eb22e03c7d55")
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 tuple. 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 numpy as np
import cv2

# Create a small test image (height=100, width=100, 3 channels for RGB)
img = np.random.randint(0, 255, (100, 100, 3), dtype=np.uint8)

# Create some bboxes in (y, x, width, height) format
# These are small bboxes that will fit within the image
bboxes = [
    (10, 15, 20, 25),    # bbox at y=10, x=15, width=20, height=25
    (50, 60, 15, 18),    # bbox at y=50, x=60, width=15, height=18
]

ARGS = {
    "img": img,
    "crop_size": 32,
    "bboxes": bboxes,
    "resize": False,
}
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 tuple — a tuple output has no array shape of its own; none is 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
l1_loss Ran
ran on a synthesized input
rickyHong/GANomaly-repl/lib/loss.py
code served (permissive licence) · get_code("8a2f4a14a4eff7ff")
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 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 torch

torch.manual_seed(0)

# Create small test tensors
input_tensor = torch.randn(2, 4)
target_tensor = torch.randn(2, 4)

ARGS = {
    "input": input_tensor,
    "target": target_tensor,
}
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 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
l2_loss Ran
ran on a synthesized input
rickyHong/GANomaly-repl/lib/loss.py
code served (permissive licence) · get_code("602022135f879cb7")
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 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 torch

torch.manual_seed(0)

# Create small input and target tensors
# Using batch size 2, dimension 4
input_tensor = torch.randn(2, 4)
target_tensor = torch.randn(2, 4)

ARGS = {
    "input": input_tensor,
    "target": target_tensor,
    "size_average": True,
}
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 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
load_annotation_file Ran
ran on a synthesized input
danbochman/GANomaly-TF2/dataloader/annotation_utils.py
code served (permissive licence) · get_code("22a02f2c65cda9f1")
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 json
import tempfile
import os

# Create a temporary directory and annotation file
temp_dir = tempfile.mkdtemp()
ann_path = os.path.join(temp_dir, "annotation.json")

# Create a valid supervise.ly annotation file
annotation_data = {
    "description": "Test annotation",
    "size": {
        "height": 480,
        "width": 640
    },
    "objects": [
        {
            "id": "obj1",
            "classTitle": "person",
            "description": "",
            "geometry_type": "rectangle",
            "geometry": {
                "x": 100,
                "y": 100,
                "width": 200,
                "height": 300
            }
        }
    ],
    "tags": []
}

# Write the annotation file
with open(ann_path, 'w') as f:
    json.dump(annotation_data, f)

ARGS = {
    "ann_path": ann_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
necessary_overlap_region Ran
ran on a synthesized input
danbochman/GANomaly-TF2/dataloader/cogwheel_slicer.py
code served (permissive licence) · get_code("625a1b73ba18c9b3")
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 int, ndim 0, dtype family int, 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 torch

torch.manual_seed(0)

ARGS = {
    "axis": 512,
    "interval": 128
}
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 int, ndim 0, dtype family int, 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
roc Ran
ran; our contract draft was wrong, not the code
samet-akcay/ganomaly/lib/evaluate.py
code served (permissive licence) · get_code("a2c76c01c3578d6f")
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 float, 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 torch
import numpy as np

torch.manual_seed(0)

# Create small binary classification labels and scores tensors
labels = torch.tensor([0, 1, 0, 1, 1, 0], dtype=torch.float32)
scores = torch.tensor([0.1, 0.9, 0.2, 0.8, 0.7, 0.3], dtype=torch.float32)

ARGS = {
    'labels': labels,
    'scores': scores,
    'saveto': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, scipy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
roc Ran
ran on a synthesized input
rickyHong/GANomaly-repl/lib/evaluate.py
code served (permissive licence) · get_code("726767c6e03cf190")
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 float, 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 os
import tempfile

# Create small binary classification labels and scores
np.random.seed(0)
labels = np.array([0, 1, 0, 1, 1, 0, 1, 0])
scores = np.array([0.1, 0.9, 0.2, 0.85, 0.95, 0.15, 0.88, 0.05])

# Create a temporary directory for saving plots
temp_dir = tempfile.mkdtemp()

ARGS = {
    "labels": labels,
    "scores": scores,
    "saveto": temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, scipy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
display_precision_recall_curve Not yet run
unverified (harvested, no recorded run)
danbochman/GANomaly-TF2/eval_utils/visualization_utils.py
code served (permissive licence) · get_code("0b760551a0644d97")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
rickyHong/GANomaly-repl/lib/data.py
code served (permissive licence) · get_code("3a96b9b27dddc30c")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
samet-akcay/ganomaly/lib/data.py
code served (permissive licence) · get_code("fff66175b188911e")
How it ran

no invocation recorded.

stack_and_expand Not yet run
unverified (harvested, no recorded run)
danbochman/GANomaly-TF2/dataloader/preprocessing.py
code served (permissive licence) · get_code("9d292fa4e629c34e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 23 distinct functions with an identity, 12 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 7 later) and 11 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
dat2canvas 3 other papers
1 dated earlier, 2 later
1703.05921 (2017-03)
Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery
1901.08954 (2019-01)
Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection
1904.02639 (2019-04)
Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection
gray2rgb 3 other papers
1 dated earlier, 2 later
1703.05921 (2017-03)
Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery
1901.08954 (2019-01)
Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection
1904.02639 (2019-04)
Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection
evaluate 2 other papers
2 later
1901.08954 (2019-01)
Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly Detection
l1_loss 2 other papers
2 later
1901.08954 (2019-01)
Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly Detection
l2_loss 2 other papers
2 later
1901.08954 (2019-01)
Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly Detection
roc 2 other papers
2 later
1901.08954 (2019-01)
Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly Detection
annotation_to_bboxes_ltwh 1 other paper
1 dated earlier
1802.06222 (2018-02)
Efficient GAN-Based Anomaly Detection
auprc 1 other paper
1 later
1901.08954 (2019-01)
Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection
center_and_scale 1 other paper
1 dated earlier
1802.06222 (2018-02)
Efficient GAN-Based Anomaly Detection
load_annotation_file 1 other paper
1 dated earlier
1802.06222 (2018-02)
Efficient GAN-Based Anomaly Detection
necessary_overlap_region 1 other paper
1 dated earlier
1802.06222 (2018-02)
Efficient GAN-Based Anomaly Detection
stack_and_expand 1 other paper
1 dated earlier
1802.06222 (2018-02)
Efficient GAN-Based Anomaly Detection

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

Repositories linked to this paper

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

Abstract

Anomaly detection is a classical problem in computer vision, namely the determination of the normal from the abnormal when datasets are highly biased towards one class (normal) due to the insufficient sample size of the other class (abnormal). While this can be addressed as a supervised learning problem, a significantly more challenging problem is that of detecting the unknown/unseen anomaly case that takes us instead into the space of a one-class, semi-supervised learning paradigm. We introduce such a novel anomaly detection model, by using a conditional generative adversarial network that jointly learns the generation of high-dimensional image space and the inference of latent space. Employing encoder-decoder-encoder sub-networks in the generator network enables the model to map the input image to a lower dimension vector, which is then used to reconstruct the generated output image. The use of the additional encoder network maps this generated image to its latent representation. Minimizing the distance between these images and the latent vectors during training aids in learning the data distribution for the normal samples. As a result, a larger distance metric from this learned data distribution at inference time is indicative of an outlier from that distribution - an anomaly. Experimentation over several benchmark datasets, from varying domains, shows the model efficacy and superiority over previous state-of-the-art approaches.

For agents

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

get_harvested_code_for_paper("1805.06725")
get_code_for_paper("1805.06725")
have("1805.06725")

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

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

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

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

Connect an agent — have() is free.