SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1911.01370 · 2019

Self-Supervised Difference Detection for Weakly-Supervised Semantic Segmentation

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 2 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/1911.01370.json · badge: /api/ran/1911.01370.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
shimoda-uec/ssdd canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
HWC_to_CHW Ran
ran on a synthesized input
shimoda-uec/ssdd/imutils.py
code served (permissive licence) · get_code("caa2fbfb63938959")
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 (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 numpy as np

# Create a small HWC (Height, Width, Channel) image
# H=4, W=3, C=2 to have distinct dimensions
img = np.random.rand(4, 3, 2).astype(np.float32)

ARGS = {
    "img": img
}
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 (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
add_class_weights Ran
ran on a synthesized input
shimoda-uec/ssdd/ssdd_function.py
code served (permissive licence) · get_code("e5ebf508cb903d57")
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)

# Construct arguments for add_class_weights
# pixel_weights: tensor of shape (batch_size, height, width) - will be modified in-place
pixel_weights = torch.randn(2, 4, 3, requires_grad=False)

# mask0: tensor of shape (batch_size, height, width) with integer class indices
mask0 = torch.randint(0, 3, (2, 4, 3))

# mask1: tensor of shape (batch_size, height, width) with integer class indices
mask1 = torch.randint(0, 3, (2, 4, 3))

# ignore_flags: tensor of shape (batch_size, num_classes) with boolean or float values
# The loop iterates from j=1 to ignore_flags.shape[1], so we need at least 2 columns
ignore_flags = torch.tensor([[0.0, 1.0, 0.5], [0.0, 0.3, 0.8]], dtype=torch.float32)

# bg_bias: scalar float parameter
bg_bias = 0.5

ARGS = {
    "pixel_weights": pixel_weights,
    "mask0": mask0,
    "mask1": mask1,
    "ignore_flags": ignore_flags,
    "bg_bias": bg_bias
}
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
adjust_learning_rate Ran
ran on a synthesized input
shimoda-uec/ssdd/utils.py
code served (permissive licence) · get_code("6dd90364f96e572c")
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 = {
    "lr": 0.1,
    "epoch": 5,
    "lr_rampdown_epochs": 10,
    "step_in_epoch": 3,
    "total_steps_in_epoch": 100
}
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 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
compute_sig_mask_loss Ran
ran on a synthesized input
shimoda-uec/ssdd/ssdd_function.py
code served (permissive licence) · get_code("caec2fc49785b99a")
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.functional as F

torch.manual_seed(0)

# Create logits tensor: shape (batch_size, 1, height, width) or similar
# The function does sigmoid(logits).squeeze(1), so logits should have shape (batch, 1, ...)
logits = torch.randn(2, 1, 4, 3)

# Create binary mask tensor: shape (batch, height, width) or similar
# Must be broadcastable/compatible with logits after squeeze
bin_mask = torch.randint(0, 2, (2, 4, 3))

ARGS = {
    "logits": logits,
    "bin_mask": bin_mask,
}
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
get_dd_mask Ran
ran on a synthesized input
shimoda-uec/ssdd/ssdd_function.py
code served (permissive licence) · get_code("05733bb9fe979b78")
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
from torch.autograd import Variable

torch.manual_seed(0)

# Create sample tensors
batch_size = 2
height = 4
width = 3
num_classes = 5

# dd0 and dd1: output logits from model, shape (batch, 1, height, width)
dd0 = torch.randn(batch_size, 1, height, width)
dd1 = torch.randn(batch_size, 1, height, width)

# mask0 and mask1: class masks with values 0 to num_classes-1, shape (batch, height, width)
mask0 = torch.randint(0, num_classes, (batch_size, height, width))
mask1 = torch.randint(0, num_classes, (batch_size, height, width))

# ignore_flags: binary flags for each class per batch, shape (batch, num_classes)
ignore_flags = torch.randint(0, 2, (batch_size, num_classes)).float()

ARGS = {
    'dd0': dd0,
    'dd1': dd1,
    'mask0': mask0,
    'mask1': mask1,
    'ignore_flags': ignore_flags,
    'dd_bias': 0.15,
    'bg_bias': 0.05
}
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
get_palette Ran
ran, honoured the contract we drafted
shimoda-uec/ssdd/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from liujf69/EPP-Net-Action, is pointer only (licence: NONE) · get_code("2710e69d80cc7844")
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 liujf69/EPP-Net-Action, 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.

convert_mxnet_to_torch Not yet run
unverified (harvested, no recorded run)
shimoda-uec/ssdd/arch_resnet38.py
code served (permissive licence) · get_code("95dfca01d7656b7c")
How it ran

no invocation recorded.

crf_inference Not yet run
unverified (harvested, no recorded run)
shimoda-uec/ssdd/imutils.py
code served (permissive licence) · get_code("0275aac2de6057c3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 5 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
get_palette 8 other papers
4 dated earlier, 4 later
1703.07511 (2017-03)
Deep Photo Style Transfer
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
1903.04197 (2019-03)
Structured Knowledge Distillation for Dense Prediction
and 5 more not named here
convert_mxnet_to_torch 7 other papers
2 dated earlier, 5 later
1803.10464 (2018-03)
Learning Pixel-level Semantic Affinity with Image-level Supervision for Weakly Supervised Semantic Segmentation
1903.00179 (2019-03)
Pyramid Feature Attention Network for Saliency detection
2008.01183 (2020-08)
Weakly-Supervised Semantic Segmentation via Sub-category Exploration
and 4 more not named here
HWC_to_CHW 2 other papers
1 dated earlier, 1 later
1903.00179 (2019-03)
Pyramid Feature Attention Network for Saliency detection
2005.08104 (2020-05)
Single-Stage Semantic Segmentation from Image Labels

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

To minimize the annotation costs associated with the training of semantic segmentation models, researchers have extensively investigated weakly-supervised segmentation approaches. In the current weakly-supervised segmentation methods, the most widely adopted approach is based on visualization. However, the visualization results are not generally equal to semantic segmentation. Therefore, to perform accurate semantic segmentation under the weakly supervised condition, it is necessary to consider the mapping functions that convert the visualization results into semantic segmentation. For such mapping functions, the conditional random field and iterative re-training using the outputs of a segmentation model are usually used. However, these methods do not always guarantee improvements in accuracy; therefore, if we apply these mapping functions iteratively multiple times, eventually the accuracy will not improve or will decrease. In this paper, to make the most of such mapping functions, we assume that the results of the mapping function include noise, and we improve the accuracy by removing noise. To achieve our aim, we propose the self-supervised difference detection module, which estimates noise from the results of the mapping functions by predicting the difference between the segmentation masks before and after the mapping. We verified the effectiveness of the proposed method by performing experiments on the PASCAL Visual Object Classes 2012 dataset, and we achieved 64.9\% in the val set and 65.5\% in the test set. Both of the results become new state-of-the-art under the same setting of weakly supervised semantic segmentation.

For agents

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

get_harvested_code_for_paper("1911.01370")
get_code_for_paper("1911.01370")
have("1911.01370")

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

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

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

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

Connect an agent — have() is free.