SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2108.03852 · ICCV · 2021

Complementary Patch for Weakly Supervised Semantic Segmentation

Yuchao Dai, Fei Zhang, Chaochen Gu, Chenyue Zhang

arXiv · PDF · Open in the Atlas

Code that ran

12 of 15 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; 4 failures of our instrument; 3 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/2108.03852.json · badge: /api/ran/2108.03852.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
Ferenas/CPN canonical (classifier label)
classifier basis: census
12 ran · 3 no recorded run
FunctionStatusWhere it lives
adaptive_min_pooling_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Ferenas/CPN/train_cpn.py
code served (permissive licence) · get_code("4c323e44c38f5fb2")
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 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)

# The function takes a single parameter 'x' which is a tensor
# It expects x to have 4 dimensions: (n, c, h, w)
# The function uses:
# - x.size() to get dimensions
# - torch.max(x, dim=1) to get max across channel dimension
# - view(n, -1) to reshape
# - torch.topk() to get top-k smallest values
# - F.relu() to apply ReLU
# - torch.sum() to sum values

# Create a small 4D tensor with shape (batch=2, channels=4, height=3, width=3)
# This gives us h*w = 9, so k = 9 // 4 = 2
x = torch.randn(2, 4, 3, 3)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
do_python_eval Ran
ran; our contract draft was wrong, not the code
Ferenas/CPN/evaluation_cam.py
code served (permissive licence) · get_code("4de99c8ad78aceee")
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 os
import numpy as np
from PIL import Image
import tempfile
import shutil

# Create temporary directories for predict and gt folders
temp_dir = tempfile.mkdtemp()
predict_folder = os.path.join(temp_dir, 'predict')
gt_folder = os.path.join(temp_dir, 'gt')
os.makedirs(predict_folder, exist_ok=True)
os.makedirs(gt_folder, exist_ok=True)

# Create sample PNG prediction and ground truth files
name_list = ['sample_1', 'sample_2', 'sample_3']

for name in name_list:
    # Create prediction images (21 classes, 64x48 resolution)
    predict_array = np.random.randint(0, 21, size=(64, 48), dtype=np.uint8)
    predict_img = Image.fromarray(predict_array, mode='L')
    predict_img.save(os.path.join(predict_folder, f'{name}.png'))
    
    # Create ground truth images (same size, with some pixels set to 255 for ignore)
    gt_array = np.random.randint(0, 21, size=(64, 48), dtype=np.uint8)
    # Add some ignore pixels (255)
    gt_array[0:5, 0:5] = 255
    gt_img = Image.fromarray(gt_array, mode='L')
    gt_img.save(os.path.join(gt_folder, f'{name}.png'))

ARGS = {
    'predict_folder': predict_folder,
    'gt_folder': gt_folder,
    'name_list': name_list,
    'num_cls': 21,
    'input_type': 'png',
    'threshold': 1.0,
    'printlog': False
}
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 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
edge_to_affinity Ran
ran on a synthesized input
Ferenas/CPN/misc/indexing.py
code served (permissive licence) · get_code("d3b122efb6e32fed")
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, 6, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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:
# - edge: a tensor that will be reshaped to (batch_size, -1)
# - paths_indices: a list of indices (numpy arrays or tensors) with shape (batch_size, height, width)

# Create edge tensor
# The function reshapes it to (batch_size, -1), so we need a tensor with batch dimension
# Let's make it (2, 64) after reshape, which means before reshape it could be (2, 8, 8)
edge = torch.randn(2, 8, 8)

# Create paths_indices - a list of index tensors/arrays
# Each element should be an array of indices with shape (batch_size, height, width)
# The indices will be used to index into the flattened edge dimension (64)
# So indices should be in range [0, 64)

batch_size = 2
height = 4
width = 3

# Create 3 path index sets as numpy arrays
paths_indices = []
for _ in range(3):
    # Random indices in valid range [0, 64)
    indices = np.random.randint(0, 64, size=(batch_size, height, width))
    paths_indices.append(indices)

ARGS = {
    "edge": edge,
    "paths_indices": paths_indices
}
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, 6, 3) — shape (2, 6, 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
gap2d Ran
ran; our contract draft was wrong, not the code
Ferenas/CPN/misc/torchutils.py
pointer only (licence: MIT); the stored copy get_code serves, from zhaozhengChen/LPCAM, is pointer only (licence: NONE) · get_code("b2dee97c33d89372")
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 zhaozhengChen/LPCAM, 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.

hide_patch Ran
ran on a synthesized input
Ferenas/CPN/tool/imutils.py
code served (permissive licence) · get_code("50fe7cd84374ba59")
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 random

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

# Create a small image tensor with shape (batch, width, height, channels)
# Using distinct dimensions: batch=2, width=4, height=3
img = torch.randn(2, 4, 3)

ARGS = {
    "img": img
}
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
max_onehot Ran
ran on a synthesized input
Ferenas/CPN/tool/imutils.py
code served (permissive licence) · get_code("94c2437fbb7c88f7")
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, 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 torch

torch.manual_seed(0)

# Create a small 4D tensor (batch=2, channels=4, height=3, width=5)
# The function expects x.size() to return (n, c, h, w)
x = torch.randn(2, 4, 3, 5)

ARGS = {
    "x": x
}
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, 5) — shape (2, 4, 3, 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
pil_rescale Ran
ran on a synthesized input
Ferenas/CPN/misc/imutils.py
code served (permissive licence) · get_code("03816bd33ff47d91")
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 int, shape (6, 8, 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
from PIL import Image

# Create a small test image as a numpy array
# Using shape (4, 5, 3) for height=4, width=5, 3 channels (RGB)
img = np.random.randint(0, 256, size=(4, 5, 3), dtype=np.uint8)

# Define scale factor
scale = 1.5

# Define interpolation order (3 for bicubic, 0 for nearest)
order = 3

ARGS = {
    "img": img,
    "scale": scale,
    "order": order
}
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 ndarray, ndim 3, dtype family int, shape (6, 8, 3) — shape (6, 8, 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
pil_resize Ran
ran on a synthesized input
Ferenas/CPN/misc/imutils.py
code served (permissive licence) · get_code("4e4bdca77f683cf7")
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 int, shape (20, 24, 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
from PIL import Image

# Create a small test image as a numpy array
# Image shape should be (height, width) or (height, width, channels)
img = np.random.randint(0, 256, size=(10, 12, 3), dtype=np.uint8)

# Define target size as (height, width)
size = (20, 24)

# Define interpolation order (0 for NEAREST, 3 for BICUBIC)
order = 3

ARGS = {
    "img": img,
    "size": size,
    "order": order
}
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 ndarray, ndim 3, dtype family int, shape (20, 24, 3) — shape (20, 24, 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
random_resize_long Ran
ran on a synthesized input
Ferenas/CPN/misc/imutils.py
code served (permissive licence) · get_code("802a057433809fc1")
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 int, shape (15, 12, 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 random
import numpy as np
from PIL import Image

# Create a small test image as a numpy array (height=10, width=8, RGB channels)
test_img = np.random.randint(0, 256, size=(10, 8, 3), dtype=np.uint8)

ARGS = {
    "img": test_img,
    "min_long": 5,
    "max_long": 15
}
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 ndarray, ndim 3, dtype family int, shape (15, 12, 3) — shape (15, 12, 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
split_dataset Ran
ran; our contract draft was wrong, not the code
Ferenas/CPN/misc/torchutils.py
code served (permissive licence) · get_code("8129bde610e5350b")
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. 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
from torch.utils.data import Dataset

torch.manual_seed(0)

class SimpleDataset(Dataset):
    def __init__(self, size=10):
        self.size = size
        self.data = torch.randn(size, 4)
        self.labels = torch.randint(0, 2, (size,))
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        return self.data[idx], self.labels[idx]

dataset = SimpleDataset(size=10)
n_splits = 3

ARGS = {
    'dataset': dataset,
    'n_splits': n_splits
}
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 — a list 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
to_one_hot Ran
ran on a synthesized input
Ferenas/CPN/misc/pyutils.py
code served (permissive licence) · get_code("fa36a8f1f0a5a428")
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 (3, 2, 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 sparse integer array
sparse_integers = np.array([[0, 1, 2], [1, 0, 2]], dtype=np.int32)

# Define arguments for the function
ARGS = {
    "sparse_integers": sparse_integers,
    "maximum_val": None,
    "dtype": np.bool_
}
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 (3, 2, 3) — shape (3, 2, 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
to_transition_matrix Ran
ran on a synthesized input
Ferenas/CPN/misc/indexing.py
code served (permissive licence) · get_code("2d78188bd6f7f6dc")
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 (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)

# Create a small affinity matrix (4x4)
# This represents pairwise affinities between 4 items
affinity_dense = torch.tensor([
    [0.9, 0.3, 0.1, 0.2],
    [0.3, 0.8, 0.4, 0.1],
    [0.1, 0.4, 0.7, 0.5],
    [0.2, 0.1, 0.5, 0.85]
], dtype=torch.float32)

beta = 2.0

times = 3

ARGS = {
    "affinity_dense": affinity_dense,
    "beta": beta,
    "times": times
}
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 (4, 4) — shape (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
affinity_sparse2dense Not yet run
unverified (harvested, no recorded run)
Ferenas/CPN/misc/indexing.py
code served (permissive licence) · get_code("40bf8abef0c6e4b2")
How it ran

no invocation recorded.

convert_mxnet_to_torch Not yet run
unverified (harvested, no recorded run)
Ferenas/CPN/network/resnet38d.py
code served (permissive licence) · get_code("95dfca01d7656b7c")
How it ran

no invocation recorded.

hide_patch_ss Not yet run
unverified (harvested, no recorded run)
Ferenas/CPN/tool/imutils.py
code served (permissive licence) · get_code("4d5584b87aef6565")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 0 the same month, 10 later) and 3 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
convert_mxnet_to_torch 7 other papers
5 dated earlier, 2 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
1911.01370 (2019-11)
Self-Supervised Difference Detection for Weakly-Supervised Semantic Segmentation
and 4 more not named here
gap2d 6 other papers
3 dated earlier, 3 later · 3 only as an assembly brick
1904.05044 (2019-04)
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations
2103.01795 (2021-03)
Context Decoupling Augmentation for Weakly Supervised Semantic Segmentation
2103.08896 (2021-03)
Anti-Adversarially Manipulated Attributions for Weakly and Semi-Supervised Semantic Segmentation
and 3 more not named here
adaptive_min_pooling_loss 3 other papers
3 dated earlier
1903.00179 (2019-03)
Pyramid Feature Attention Network for Saliency detection
2004.04581 (2020-04)
Self-supervised Equivariant Attention Mechanism for Weakly Supervised Semantic Segmentation
2104.07216 (2021-04)
Learning structure-aware semantic segmentation with image-level supervision
split_dataset 3 other papers
1 dated earlier, 2 later
1904.05044 (2019-04)
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations
aaai_20108 (2022 (year only))
Activation Modulation and Recalibration Scheme for Weakly Supervised Semantic Segmentation
2203.00962 (2022-03)
Class Re-Activation Maps for Weakly-Supervised Semantic Segmentation
affinity_sparse2dense 2 other papers
1 dated earlier, 1 later
1904.05044 (2019-04)
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations
aaai_20108 (2022 (year only))
Activation Modulation and Recalibration Scheme for Weakly Supervised Semantic Segmentation
edge_to_affinity 2 other papers
1 dated earlier, 1 later
1904.05044 (2019-04)
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations
aaai_20108 (2022 (year only))
Activation Modulation and Recalibration Scheme for Weakly Supervised Semantic Segmentation
pil_rescale 2 other papers
1 dated earlier, 1 later
1904.05044 (2019-04)
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations
aaai_20108 (2022 (year only))
Activation Modulation and Recalibration Scheme for Weakly Supervised Semantic Segmentation
pil_resize 2 other papers
1 dated earlier, 1 later
1904.05044 (2019-04)
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations
aaai_20108 (2022 (year only))
Activation Modulation and Recalibration Scheme for Weakly Supervised Semantic Segmentation
random_resize_long 2 other papers
1 dated earlier, 1 later
1904.05044 (2019-04)
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations
aaai_20108 (2022 (year only))
Activation Modulation and Recalibration Scheme for Weakly Supervised Semantic Segmentation
to_one_hot 2 other papers
1 dated earlier, 1 later
1904.05044 (2019-04)
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations
aaai_20108 (2022 (year only))
Activation Modulation and Recalibration Scheme for Weakly Supervised Semantic Segmentation
to_transition_matrix 2 other papers
1 dated earlier, 1 later
1904.05044 (2019-04)
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations
aaai_20108 (2022 (year only))
Activation Modulation and Recalibration Scheme for Weakly Supervised Semantic Segmentation
do_python_eval 1 other paper
1 dated earlier
2004.04581 (2020-04)
Self-supervised Equivariant Attention Mechanism for Weakly Supervised Semantic Segmentation

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

Weakly Supervised Semantic Segmentation (WSSS) based on image-level labels has been greatly advanced by exploiting the outputs of Class Activation Map (CAM) to generate the pseudo labels for semantic segmentation. However, CAM merely discovers seeds from a small number of regions, which may be insufficient to serve as pseudo masks for semantic segmentation. In this paper, we formulate the expansion of object regions in CAM as an increase in information. From the perspective of information theory, we propose a novel Complementary Patch (CP) Representation and prove that the information of the sum of the CAMs by a pair of input images with complementary hidden (patched) parts, namely CP Pair, is greater than or equal to the information of the baseline CAM. Therefore, a CAM with more information related to object seeds can be obtained by narrowing down the gap between the sum of CAMs generated by the CP Pair and the original CAM. We propose a CP Network (CPN) implemented by a triplet network and three regularization functions. To further improve the quality of the CAMs, we propose a Pixel-Region Correlation Module (PRCM) to augment the contextual information by using object-region relations between the feature maps and the CAMs. Experimental results on the PAS-CAL VOC 2012 datasets show that our proposed method achieves a new state-of-the-art in WSSS, validating the effectiveness of our CP Representation and CPN.

For agents

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

get_harvested_code_for_paper("2108.03852")
get_code_for_paper("2108.03852")
have("2108.03852")

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

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

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

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

Connect an agent — have() is free.