SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.07936 · 2020

ClassMix: Segmentation-Based Data Augmentation for Semi-Supervised Learning

arXiv · PDF · Open in the Atlas

Code that ran

12 of 19 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; 3 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 2 failures of our instrument; 7 no recorded run), measured 2026-11-21; 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/2007.07936.json · badge: /api/ran/2007.07936.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
WilhelmT/ClassMix canonical (classifier label)
classifier basis: census
12 ran · 7 no recorded run
FunctionStatusWhere it lives
color_map Ran
ran, honoured the contract we drafted
WilhelmT/ClassMix/evaluateSSL.py
pointer only (licence: MIT); the stored copy get_code serves, from hfslyc/AdvSemiSeg, is pointer only (licence: NONE) · get_code("fcbd501f30a007d4")
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 hfslyc/AdvSemiSeg, 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.

colorize_mask Ran
ran on a synthesized input
WilhelmT/ClassMix/utils/helpers.py
code served (permissive licence) · get_code("980e8f8763638799")
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 Image. 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 PIL

# Create a small mask array (2D, values 0-255 for palette indices)
mask = np.array([[0, 1, 2], [3, 4, 5]], dtype=np.uint8)

# Create a small palette (RGB values, so length must be multiple of 3)
# A valid palette has at most 256*3 = 768 values
# Let's create a small one with 12 values (4 colors in RGB)
palette = [255, 0, 0, 0, 255, 0, 0, 0, 255, 128, 128, 128]

ARGS = {
    "mask": mask,
    "palette": palette,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 2 and dtype family int 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
WilhelmT/ClassMix/model/deeplabv2.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

customsoftmax Ran
ran on a synthesized input
WilhelmT/ClassMix/utils/loss.py
code served (permissive licence) · get_code("d6015f0e8b0685cc")
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 small tensors for the function
# inp: input tensor that will be passed to softmax (batch_size=2, num_classes=4)
inp = torch.randn(2, 4)

# multihotmask: binary mask tensor with same shape as inp (2, 4)
# This mask is used to select which elements to consider
multihotmask = torch.tensor([
    [1.0, 1.0, 0.0, 0.0],
    [1.0, 0.0, 1.0, 0.0]
])

ARGS = {
    "inp": inp,
    "multihotmask": multihotmask
}
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
flip Ran
ran on a synthesized input
WilhelmT/ClassMix/utils/transformsgpu.py
code served (permissive licence) · get_code("79963969c998c40d")
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

torch.manual_seed(0)

# The function flips data along dimension 3 and target along dimension 2
# if flip == 1. Both data and target are optional (can be None).
# We need to create tensors with at least 4 dimensions for data 
# and at least 3 dimensions for target to support the flip operations.

# Create a small data tensor: shape (2, 3, 4, 5) - batch of 2
data = torch.randn(2, 3, 4, 5)

# Create a small target tensor: shape (2, 3, 4) - batch of 2
target = torch.randn(2, 3, 4)

ARGS = {
    "flip": 1,
    "data": data,
    "target": target
}
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 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
generate_cow_mask Ran
ran on a synthesized input
WilhelmT/ClassMix/utils/transformmasks.py
code served (permissive licence) · get_code("db898bc1ff25e367")
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 (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 numpy as np

# Construct arguments for generate_cow_mask
ARGS = {
    "img_size": (4, 3),  # Tuple representing image dimensions
    "sigma": 1.5,        # Standard deviation for Gaussian filter
    "p": 0.7,            # Probability parameter for erfinv
    "seed": 42           # Random seed for reproducibility
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (4, 3) — shape (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
generate_cutout_mask Ran
ran on a synthesized input
WilhelmT/ClassMix/utils/transformmasks.py
code served (permissive licence) · get_code("50a4b555e559ce5e")
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 (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 numpy as np

ARGS = {
    "img_size": (4, 3),
    "seed": 42
}
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 (4, 3) — shape (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
get_label_vector Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
WilhelmT/ClassMix/evaluateSSL.py
code served (permissive licence) · get_code("799a094d0124a46c")
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) and returned ndarray, ndim 2, dtype family float, shape (21, 1) 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

# Analyze the function:
# - target: passed to np.histogram, so should be array-like of numeric values
# - nclass: passed to np.histogram as bins and range parameter, should be int
# The function creates a histogram with nclass bins over range (0, nclass-1)
# Then creates a binary vector of length 21 (hardcoded in the function)

# Create a target array with values in range [0, nclass-1]
nclass = 21
target = np.array([0, 1, 2, 5, 10, 15, 20, 3, 7, 12])

ARGS = {
    "target": target,
    "nclass": nclass
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (21, 1) — shape (21, 1) 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_voc_palette Ran
ran on a synthesized input
WilhelmT/ClassMix/utils/palette.py
code served (permissive licence) · get_code("d46e561fba210e1a")
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 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

def get_voc_palette(num_classes):
    n = num_classes
    palette = [0] * (n * 3)
    for j in range(0, n):
        lab = j
        palette[j * 3 + 0] = 0
        palette[j * 3 + 1] = 0
        palette[j * 3 + 2] = 0
        i = 0
        while lab > 0:
            palette[j * 3 + 0] |= (lab >> 0 & 1) << 7 - i
            palette[j * 3 + 1] |= (lab >> 1 & 1) << 7 - i
            palette[j * 3 + 2] |= (lab >> 2 & 1) << 7 - i
            i = i + 1
            lab >>= 3
    return palette

torch.manual_seed(0)

ARGS = {
    "num_classes": 21
}
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 list, ndim 1, 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
lr_poly Ran
ran, honoured the contract we drafted
WilhelmT/ClassMix/trainSSL.py
pointer only (licence: MIT); the stored copy get_code serves, from lym29/DASeg, is pointer only (licence: NONE) · get_code("b3b7c1c716f4ca66")
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 lym29/DASeg, 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.

outS Ran
ran, honoured the contract we drafted
WilhelmT/ClassMix/model/deeplabv2.py
pointer only (licence: MIT); the stored copy get_code serves, from stu92054/Domain-adaptation-on-segmentation, is pointer only (licence: NONE) · get_code("27504cbeb5811ea6")
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 stu92054/Domain-adaptation-on-segmentation, 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.

sigmoid_ramp_up Ran
ran on a synthesized input
WilhelmT/ClassMix/trainSSL.py
code served (permissive licence) · get_code("d4002df13f6d42ed")
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 float64, ndim 0, 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 numpy as np

def sigmoid_ramp_up(iter, max_iter):
    if iter >= max_iter:
        return 1
    else:
        return np.exp(-5 * (1 - iter / max_iter) ** 2)

ARGS = {
    "iter": 5,
    "max_iter": 10
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
Res_Deeplab Not yet run
unverified (harvested, no recorded run)
WilhelmT/ClassMix/model/deeplabv2.py
code served (permissive licence) · get_code("68fab2021abbbebf")
How it ran

no invocation recorded.

colorJitter Not yet run
unverified (harvested, no recorded run)
WilhelmT/ClassMix/utils/transformsgpu.py
code served (permissive licence) · get_code("bb18b872b207d4a2")
How it ran

no invocation recorded.

convert_model Not yet run
unverified (harvested, no recorded run)
WilhelmT/ClassMix/utils/sync_batchnorm/batchnorm.py
code served (permissive licence) · get_code("b0cd1f9681d630e2")
How it ran

no invocation recorded.

gaussian_blur Not yet run
unverified (harvested, no recorded run)
WilhelmT/ClassMix/utils/transformsgpu.py
code served (permissive licence) · get_code("b36157ea719029fe")
How it ran

no invocation recorded.

generate_class_mask Not yet run
unverified (harvested, no recorded run)
WilhelmT/ClassMix/utils/transformmasks.py
code served (permissive licence) · get_code("78c73917d17c705c")
How it ran

no invocation recorded.

get_iou Not yet run
unverified (harvested, no recorded run)
WilhelmT/ClassMix/evaluateSSL.py
code served (permissive licence) · get_code("fb1d8f93c75b5433")
How it ran

no invocation recorded.

get_upsampling_weight Not yet run
unverified (harvested, no recorded run)
WilhelmT/ClassMix/utils/helpers.py
code served (permissive licence) · get_code("623804a7cb75739e")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
conv3x3 686 other papers
238 dated earlier, 16 the same month, 431 later, 1 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
lr_poly 21 other papers
14 dated earlier, 1 the same month, 6 later
1612.02646 (2016-12)
Learning Video Object Segmentation from Static Images
1702.01105 (2017-02)
Joint 2D-3D-Semantic Data for Indoor Scene Understanding
1703.01780 (2017-03)
Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results
and 18 more not named here
outS 11 other papers
7 dated earlier, 1 the same month, 3 later
1612.02646 (2016-12)
Learning Video Object Segmentation from Static Images
1802.10349 (2018-02)
Learning to Adapt Structured Output Space for Semantic Segmentation
1809.09478 (2018-09)
Taking A Closer Look at Domain Shift: Category-level Adversaries for Semantics Consistent Domain Adaptation
and 8 more not named here
color_map 9 other papers
4 dated earlier, 1 the same month, 4 later
1703.01780 (2017-03)
Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results
1802.07934 (2018-02)
Adversarial Learning for Semi-Supervised Semantic Segmentation
1908.05724 (2019-08)
Semi-Supervised Semantic Segmentation with High- and Low-level Consistency
and 6 more not named here
get_label_vector 5 other papers
2 dated earlier, 1 the same month, 2 later
1703.01780 (2017-03)
Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results
1908.05724 (2019-08)
Semi-Supervised Semantic Segmentation with High- and Low-level Consistency
2007.08702 (2020-07)
DACS: Domain Adaptation via Cross-domain Mixed Sampling
and 2 more not named here
get_voc_palette 2 other papers
1 dated earlier, 1 later
1612.01105 (2016-12)
Pyramid Scene Parsing Network
Res_Deeplab 1 other paper
1 later
136940019 (2022 (year only))
TACS: Taxonomy Adaptive Cross-Domain Semantic Segmentation
colorize_mask 1 other paper
1 later
Li_From_Contexts_to_Locality_Ultra-High_Resolution_Image_Segmentation_via_Locality-Aware_ICCV_2021_paper (2021 (year only))
From Contexts to Locality: Ultra-high Resolution Image Segmentation via Locality-aware Contextual Correlation
get_upsampling_weight 1 other paper
1 later
Li_From_Contexts_to_Locality_Ultra-High_Resolution_Image_Segmentation_via_Locality-Aware_ICCV_2021_paper (2021 (year only))
From Contexts to Locality: Ultra-high Resolution Image Segmentation via Locality-aware Contextual Correlation

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

Repositories linked to this paper

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

Abstract

The state of the art in semantic segmentation is steadily increasing in performance, resulting in more precise and reliable segmentations in many different applications. However, progress is limited by the cost of generating labels for training, which sometimes requires hours of manual labor for a single image. Because of this, semi-supervised methods have been applied to this task, with varying degrees of success. A key challenge is that common augmentations used in semi-supervised classification are less effective for semantic segmentation. We propose a novel data augmentation mechanism called ClassMix, which generates augmentations by mixing unlabelled samples, by leveraging on the network's predictions for respecting object boundaries. We evaluate this augmentation technique on two common semi-supervised semantic segmentation benchmarks, showing that it attains state-of-the-art results. Lastly, we also provide extensive ablation studies comparing different design decisions and training regimes.

For agents

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

get_harvested_code_for_paper("2007.07936")
get_code_for_paper("2007.07936")
have("2007.07936")

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

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

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

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

Connect an agent — have() is free.