SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.04538 · 2019

DeepPrivacy: A Generative Adversarial Network for Face Anonymization

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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 8 have no contract verdict; 0 failures 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/1909.04538.json · badge: /api/ran/1909.04538.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
hukkelas/DeepPrivacy canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
denormalize_img Ran
ran on a synthesized input
hukkelas/DeepPrivacy/deep_privacy/torch_utils.py
code served (permissive licence) · get_code("68f0d45d38e187f2")
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, 3, 4, 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 torch

torch.manual_seed(0)

# The function denormalize_img takes an image tensor and applies:
# 1. (image + 1) / 2 normalization
# 2. torch.clamp to [0, 1] range
# 3. .float() conversion
# It expects a tensor input

# Create a small test tensor with values in a typical range for normalized images
# (typically in [-1, 1] range before denormalization)
image = torch.randn(2, 3, 4, 4)  # batch=2, channels=3, height=4, width=4

ARGS = {
    "image": image
}
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 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
expand_bounding_box Ran
ran on a synthesized input
hukkelas/DeepPrivacy/deep_privacy/box_utils.py
code served (permissive licence) · get_code("11bf9a7ac7642586")
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 int, 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

# The function expand_bounding_box takes:
# - bbox: a bounding box (used with .copy() and indexing)
# - percentage: a float for expansion percentage
# - imshape: image shape tuple (height, width, channels)

# Create a simple bounding box as a numpy array [x0, y0, x1, y1]
bbox = np.array([50, 50, 150, 120], dtype=np.int32)

# Percentage for expansion
percentage = 0.1

# Image shape (height, width, channels)
imshape = (400, 500, 3)

ARGS = {
    'bbox': bbox,
    'percentage': percentage,
    'imshape': imshape
}
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 int, 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
find_all_files Ran
ran on a synthesized input
hukkelas/DeepPrivacy/deep_privacy/file_util.py
code served (permissive licence) · get_code("29e1fd2ff2ba23c5")
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 1, 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 pathlib
import tempfile
import os

# Create a temporary directory with some test image files
temp_dir = tempfile.mkdtemp()
temp_path = pathlib.Path(temp_dir)

# Create dummy image files with various suffixes
(temp_path / "image1.png").touch()
(temp_path / "image2.jpg").touch()
(temp_path / "image3.jpeg").touch()
(temp_path / "document.txt").touch()
(temp_path / "image4.png").touch()

ARGS = {
    "directory": temp_path,
    "suffixes": ['png', 'jpg', 'jpeg']
}
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 list, ndim 1, dtype family float — 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
image_to_numpy Ran
ran on a synthesized input
hukkelas/DeepPrivacy/deep_privacy/torch_utils.py
code served (permissive licence) · get_code("bdd86e5f69084a00")
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 (2, 4, 5, 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 sample image tensor
# Shape: (batch=2, channels=3, height=4, width=5)
# Values in range [-1, 1] for denormalization
images = torch.randn(2, 3, 4, 5)

ARGS = {
    "images": images,
    "to_uint8": False,
    "denormalize": False,
}
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 4, dtype family float, shape (2, 4, 5, 3) — shape (2, 4, 5, 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
is_keypoint_within_bbox Ran
ran on a synthesized input
hukkelas/DeepPrivacy/deep_privacy/box_utils.py
code served (permissive licence) · get_code("4e4cd9d9012b2b7b")
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

# Construct arguments for is_keypoint_within_bbox
# The function expects:
# x0, y0, x1, y1: scalar bbox coordinates
# keypoint: array where keypoint[:, :3] extracts first 3 columns,
#           then keypoint[0, :] and keypoint[1, :] access first two rows

# Create a small keypoint array with shape (2, 3)
# This will be indexed as keypoint[0, :] (X coordinates) and keypoint[1, :] (Y coordinates)
keypoint = np.array([
    [10.0, 15.0, 12.0],  # X coordinates of 3 keypoints
    [20.0, 25.0, 22.0]   # Y coordinates of 3 keypoints
])

# Bounding box coordinates where all keypoints should fit within
x0 = 5.0
y0 = 10.0
x1 = 30.0
y1 = 35.0

ARGS = {
    "x0": x0,
    "y0": y0,
    "x1": x1,
    "y1": y1,
    "keypoint": keypoint
}
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 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
is_same_shape Ran
ran on a synthesized input
hukkelas/DeepPrivacy/mask_infer.py
code served (permissive licence) · get_code("09eca444e69f1dc6")
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 typing

# Create test images as numpy arrays with the same shape
image1 = np.random.rand(4, 3, 32)
image2 = np.random.rand(4, 3, 32)
image3 = np.random.rand(4, 3, 32)

ARGS = {
    "images": [image1, image2, image3]
}
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 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
number_of_parameters Ran
ran on a synthesized input
hukkelas/DeepPrivacy/deep_privacy/torch_utils.py
code served (permissive licence) · get_code("d936eb0280a67fbe")
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 int64, 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
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        self.conv1 = nn.Conv1d(2, 5, kernel_size=3)
    
    def forward(self, x):
        return x

module = SimpleModule()

ARGS = {
    "module": module
}
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 int64, 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
quadratic_bounding_box Ran
ran on a synthesized input
hukkelas/DeepPrivacy/deep_privacy/box_utils.py
code served (permissive licence) · get_code("3ff4fe0e75091713")
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, ndim 1, 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 torch
import numpy as np

# Analyze the function:
# - x0, y0: integer coordinates (top-left corner)
# - width, height: integer dimensions
# - imshape: tuple/sequence with at least 2 elements (height, width of image)
# The function creates a quadratic (square) bounding box within image bounds

# Test case 1: Simple case with rectangular bounding box that needs squaring
x0 = 10
y0 = 20
width = 50
height = 30
imshape = (200, 300)  # (height, width) of image

ARGS = {
    "x0": x0,
    "y0": y0,
    "width": width,
    "height": height,
    "imshape": imshape
}
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, ndim 1, dtype family int — a tuple 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
find_matching_files Not yet run
unverified (harvested, no recorded run)
hukkelas/DeepPrivacy/deep_privacy/file_util.py
code served (permissive licence) · get_code("1c705399b03ec6ed")
How it ran

no invocation recorded.

read_images Not yet run
unverified (harvested, no recorded run)
hukkelas/DeepPrivacy/deep_privacy/file_util.py
code served (permissive licence) · get_code("4d957316504de4ac")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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

We propose a novel architecture which is able to automatically anonymize faces in images while retaining the original data distribution. We ensure total anonymization of all faces in an image by generating images exclusively on privacy-safe information. Our model is based on a conditional generative adversarial network, generating images considering the original pose and image background. The conditional information enables us to generate highly realistic faces with a seamless transition between the generated face and the existing background. Furthermore, we introduce a diverse dataset of human faces, including unconventional poses, occluded faces, and a vast variability in backgrounds. Finally, we present experimental results reflecting the capability of our model to anonymize images while preserving the data distribution, making the data suitable for further training of deep learning models. As far as we know, no other solution has been proposed that guarantees the anonymization of faces while generating realistic images.

For agents

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

get_harvested_code_for_paper("1909.04538")
get_code_for_paper("1909.04538")
have("1909.04538")

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

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

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

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

Connect an agent — have() is free.