SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2108.12995 · ICCV · 2021

Pseudo-mask Matters in Weakly-supervised Semantic Segmentation

Yi Li, Wayne Zhang, Yimin Chen, Zhanghui Kuang, Liyang Liu

arXiv · PDF · Open in the Atlas

Code that ran

2 of 5 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 2 have no contract verdict; 0 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.12995.json · badge: /api/ran/2108.12995.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
Eli-YiLi/PMM canonical (classifier label)
classifier basis: census
2 ran · 3 no recorded run
FunctionStatusWhere it lives
do_python_eval Ran
ran on a synthesized input
Eli-YiLi/PMM/pipeline/evaluation.py
code served (permissive licence) · get_code("d274d062070f377d")
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 tempfile
import numpy as np
from PIL import Image

# Create temporary directories for predict and ground truth 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 images
name_list = ['image_0', 'image_1']
num_cls = 21
height, width = 16, 16

for name in name_list:
    # Create prediction images
    predict_img = np.random.randint(0, num_cls, size=(height, width), dtype=np.uint8)
    predict_path = os.path.join(predict_folder, f'{name}.png')
    Image.fromarray(predict_img).save(predict_path)
    
    # Create ground truth images (with some pixels set to 255 as invalid)
    gt_img = np.random.randint(0, num_cls, size=(height, width), dtype=np.uint8)
    # Add some invalid pixels (value 255)
    gt_img[0:2, 0:2] = 255
    gt_path = os.path.join(gt_folder, f'{name}.png')
    Image.fromarray(gt_img).save(gt_path)

ARGS = {
    'predict_folder': predict_folder,
    'gt_folder': gt_folder,
    'name_list': name_list,
    'num_cls': num_cls,
    '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
get_indices_in_radius Ran
ran on a synthesized input
Eli-YiLi/PMM/pipeline/infer_aff.py
code served (permissive licence) · get_code("9da0a975b889ff9b")
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 int, shape (432, 2) 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 = {
    "height": 8,
    "width": 10,
    "radius": 3
}
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 int, shape (432, 2) — shape (432, 2) 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
scalenet101 Not yet run
unverified (harvested, no recorded run)
Eli-YiLi/PMM/network/scalenet.py
code served (permissive licence) · get_code("85e75787d89f2a20")
How it ran

no invocation recorded.

scalenet152 Not yet run
unverified (harvested, no recorded run)
Eli-YiLi/PMM/network/scalenet.py
code served (permissive licence) · get_code("9afe04f8ff5d0e2d")
How it ran

no invocation recorded.

scalenet50 Not yet run
unverified (harvested, no recorded run)
Eli-YiLi/PMM/network/scalenet.py
code served (permissive licence) · get_code("4a38197aa01d5c30")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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_indices_in_radius 1 other paper
1 dated earlier
1803.10464 (2018-03)
Learning Pixel-level Semantic Affinity with Image-level Supervision 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

Most weakly supervised semantic segmentation (WSSS) methods follow the pipeline that generates pseudo-masks initially and trains the segmentation model with the pseudomasks in fully supervised manner after. However, we find some matters related to the pseudo-masks, including high quality pseudo-masks generation from class activation maps (CAMs), and training with noisy pseudo-mask supervision. For these matters, we propose the following designs to push the performance to new state-of-art: (i) Coefficient of Variation Smoothing to smooth the CAMs adaptively; (ii) Proportional Pseudo-mask Generation to project the expanded CAMs to pseudo-mask based on a new metric indicating the importance of each class on each location, instead of the scores trained from binary classifiers. (iii) Pretended Under-Fitting strategy to suppress the influence of noise in pseudo-mask; (iv) Cyclic Pseudo-mask to boost the pseudo-masks during training of fully supervised semantic segmentation (FSSS). Experiments based on our methods achieve new state-of-art results on two changeling weakly supervised semantic segmentation datasets, pushing the mIoU to 70.0% and 40.2% on PAS-CAL VOC 2012 and MS COCO 2014 respectively. Codes including segmentation framework are released at https://github.com/Eli-YiLi/PMM

For agents

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

get_harvested_code_for_paper("2108.12995")
get_code_for_paper("2108.12995")
have("2108.12995")

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

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

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

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

Connect an agent — have() is free.