SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.03373 · CVPR · 2022

Adversarial Texture for Fooling Person Detectors in the Physical World

Siyuan Huang, Xiaolin Hu, Fuchun Sun, Bo Zhang, Zhanhao Hu, Xiaopei Zhu

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 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 9 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/2203.03373.json · badge: /api/ran/2203.03373.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
WhoTHU/Adversarial_Texture canonical (classifier label)
classifier basis not recorded on the link
10 ran · 2 no recorded run
FunctionStatusWhere it lives
calc_gradient_penalty Ran
ran on a synthesized input
WhoTHU/Adversarial_Texture/generator_dim.py
code served (permissive licence) · get_code("3ec68f4651c396a2")
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
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal discriminator network that takes interpolates and returns scores
class SimpleDiscriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 8)
        self.fc2 = nn.Linear(8, 1)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create instances
net = SimpleDiscriminator()

# Create real_data: batch_size=2, feature_dim=4
real_data = torch.randn(2, 4, dtype=torch.float32)

ARGS = {
    "net": net,
    "real_data": real_data,
}
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
compute_partial_repr Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
WhoTHU/Adversarial_Texture/tps_grid_gen.py
pointer only (licence: MIT); the stored copy get_code serves, from WarBean/tps_stn_pytorch, is pointer only (licence: NONE) · get_code("e1814689377a5c82")
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 WarBean/tps_stn_pytorch, 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.

gauss_kernel Ran
ran on a synthesized input
WhoTHU/Adversarial_Texture/utils.py
code served (permissive licence) · get_code("c3819a0a3c702ec5")
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 2, dtype family float, shape (5, 5) 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 = {
    "ksize": 5,
    "sigma": None,
    "conv": False,
    "dtype": np.float32,
}
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 2, dtype family float, shape (5, 5) — shape (5, 5) 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_cfgs Ran
ran on a synthesized input
WhoTHU/Adversarial_Texture/cfg.py
code served (permissive licence) · get_code("69099cbbe51b9f29")
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 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 torch
import numpy as np
from easydict import EasyDict

torch.manual_seed(0)

# Setup for get_cfgs function
net_name = 'yolov2'
method_name = 'RCA'
mode = 'training'

ARGS = {
    'net_name': net_name,
    'method_name': method_name,
    'mode': mode
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
easydict, 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 float — 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
grid_sample Ran
ran on a synthesized input
WhoTHU/Adversarial_Texture/tps_grid_gen.py
code served (permissive licence) · get_code("3699342b51411d76")
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, 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 torch
import torch.nn.functional as F
from torch.autograd import Variable

torch.manual_seed(0)

# Construct input tensor: (batch=2, channels=4, height=3, width=3)
input = torch.randn(2, 4, 3, 3)

# Construct grid tensor: (batch=2, height=3, width=3, 2)
# Grid values should be in range [-1, 1] for grid_sample
grid = torch.rand(2, 3, 3, 2) * 2 - 1

# Construct canvas tensor (optional, same shape as expected output)
# Output of F.grid_sample will be (batch=2, channels=4, height=3, width=3)
canvas = torch.randn(2, 4, 3, 3)

ARGS = {
    "input": input,
    "grid": grid,
    "canvas": canvas
}
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, 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
label_filter Ran
ran on a synthesized input
WhoTHU/Adversarial_Texture/evaluation_texture.py
code served (permissive licence) · get_code("047a65d91b059ef1")
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 2, dtype family float, shape (2, 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)

# Create a tensor with shape (batch=2, features=4)
# Each element in truths should be a tensor where truths[i][0] is indexable via .item()
truths = torch.tensor([
    [1, 2, 3, 4],
    [5, 6, 7, 8]
], dtype=torch.float32)

# labels is a list/set of valid label values to filter by
labels = [1, 5]

ARGS = {
    "truths": truths,
    "labels": labels
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
load_conv Ran
ran on a synthesized input
WhoTHU/Adversarial_Texture/yolo2/cfg.py
code served (permissive licence) · get_code("2329e9023f218b7e")
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
import numpy as np
import torch.nn as nn

torch.manual_seed(0)

# Create a small Conv2d model
conv_model = nn.Conv2d(
    in_channels=3,
    out_channels=4,
    kernel_size=2,
    bias=True
)

# Create a buffer with random values (numpy array)
num_w = conv_model.weight.numel()
num_b = conv_model.bias.numel()
buf = np.random.randn(num_b + num_w).astype(np.float32)

# Define arguments
ARGS = {
    "buf": buf,
    "start": 0,
    "conv_model": conv_model
}
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 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
load_conv_bn Ran
ran on a synthesized input
WhoTHU/Adversarial_Texture/yolo2/cfg.py
code served (permissive licence) · get_code("bff835defe62db44")
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
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a small Conv2d model
conv_model = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=2)

# Create a small BatchNorm2d model
bn_model = nn.BatchNorm2d(num_features=4)

# Create a buffer with numpy data
# The buffer needs to contain:
# - bn_bias: 4 elements
# - bn_weight: 4 elements
# - bn_running_mean: 4 elements
# - bn_running_var: 4 elements
# - conv_weight: 4 * 3 * 2 * 2 = 48 elements (out_channels * in_channels * kernel_h * kernel_w)
# Total: 4 + 4 + 4 + 4 + 48 = 64 elements

total_elements = 4 + 4 + 4 + 4 + (4 * 3 * 2 * 2)
buf = np.random.randn(total_elements).astype(np.float32)

start = 0

ARGS = {
    "buf": buf,
    "start": start,
    "conv_model": conv_model,
    "bn_model": bn_model
}
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 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
truths_length Ran
ran on a synthesized input
WhoTHU/Adversarial_Texture/evaluation_texture.py
code served (permissive licence) · get_code("7fc3c3693b8f5dd9")
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
import numpy as np

torch.manual_seed(0)

# The function expects 'truths' to be indexable (like a list or array)
# where each element is also indexable and has at least 2 elements (index [0] and [1])
# It iterates through indices 0-49 and checks if truths[i][1] == -1

# Construct a list of lists where each inner list has at least 2 elements
# We'll make it so that at index 5, the second element is -1 to test the logic
truths = []
for i in range(50):
    if i == 5:
        # At index 5, set second element to -1
        truths.append([0, -1])
    else:
        # For other indices, set second element to something other than -1
        truths.append([i, i + 10])

ARGS = {
    "truths": truths
}
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 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
truths_length Ran
ran on a synthesized input
WhoTHU/Adversarial_Texture/utils.py
code served (permissive licence) · get_code("7159fc477010029f")
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
import numpy as np

torch.manual_seed(0)

# The function iterates through truths and checks if truths[i][1] == -1
# truths appears to be a list-like structure where each element can be indexed
# with [1] to get a second element that could be -1
# This looks like a list of tuples or lists where each has at least 2 elements

# Create a sample truths structure:
# A list of tuples/lists where the second element is checked for -1
truths = [
    [0, 5],      # truths[0][1] = 5, not -1
    [1, 10],     # truths[1][1] = 10, not -1
    [2, -1],     # truths[2][1] = -1, so function should return 2
    [3, 20],     # this won't be reached
]

ARGS = {
    "truths": truths
}
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 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
build_targets Not yet run
unverified (harvested, no recorded run)
WhoTHU/Adversarial_Texture/yolo2/region_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from lintotao/out-of-bbox-attack, is pointer only (licence: NONE) · get_code("bafb242ad7347214")
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 lintotao/out-of-bbox-attack, 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. No invocation recorded.

parse_cfg Not yet run
unverified (harvested, no recorded run)
WhoTHU/Adversarial_Texture/yolo2/cfg.py
code served (permissive licence) · get_code("93c283a4f6e6c40f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 2 later) and 7 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
compute_partial_repr 5 other papers
1 dated earlier, 1 the same month, 3 later · 1 only as an assembly brick
1509.05329 (2015-09)
Recurrent Spatial Transformer Networks
2203.09388 (2022-03)
A Text Attention Network for Spatial Deformation Robust Scene Text Image Super-resolution
2207.09840 (2022-07)
EleGANt: Exquisite and Locally Editable GAN for Makeup Transfer
and 2 more not named here
build_targets 3 other papers
1 dated earlier, 2 later
1904.08653 (2019-04)
Fooling automated surveillance cameras: adversarial patches to attack person detection
2210.16765 (2022-10)
Benchmarking Adversarial Patch Against Aerial Detection
2410.10091 (2024-10)
Out-of-Bounding-Box Triggers: A Stealthy Approach to Cheat Object Detectors
parse_cfg 3 other papers
3 dated earlier
1904.08653 (2019-04)
Fooling automated surveillance cameras: adversarial patches to attack person detection
1910.00068 (2019-10)
Role of Spatial Context in Adversarial Robustness for Object Detection
2004.10934 (2020-04)
YOLOv4: Optimal Speed and Accuracy of Object Detection
load_conv 2 other papers
2 dated earlier
1904.08653 (2019-04)
Fooling automated surveillance cameras: adversarial patches to attack person detection
1910.00068 (2019-10)
Role of Spatial Context in Adversarial Robustness for Object Detection
load_conv_bn 2 other papers
2 dated earlier
1904.08653 (2019-04)
Fooling automated surveillance cameras: adversarial patches to attack person detection
1910.00068 (2019-10)
Role of Spatial Context in Adversarial Robustness for Object 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-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

Nowadays, cameras equipped with AI systems can capture and analyze images to detect people automatically. However, the AI system can make mistakes when receiving deliberately designed patterns in the real world, i.e., physical adversarial examples. Prior works have shown that it is possible to print adversarial patches on clothes to evade DNN-based person detectors. However, these adversarial examples could have catastrophic drops in the attack success rate when the viewing angle (i.e., the camera's angle towards the object) changes. To perform a multi-angle attack, we propose Adversarial Texture (AdvTexture). Ad-vTexture can cover clothes with arbitrary shapes so that people wearing such clothes can hide from person detectors from different viewing angles. We propose a generative method, named Toroidal-Cropping-based Expandable Generative Attack (TC-EGA), to craft AdvTexture with repetitive structures. We printed several pieces of cloth with AdvTexure and then made T-shirts, skirts, and dresses in the physical world. Experiments showed that these clothes could fool person detectors in the physical world.

For agents

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

get_harvested_code_for_paper("2203.03373")
get_code_for_paper("2203.03373")
have("2203.03373")

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

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

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

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

Connect an agent — have() is free.