SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.06780 · NeurIPS · 2022

Intermediate Prototype Mining Transformer for Few-Shot Semantic Segmentation

Nian Liu, Yuanwei Liu, Xiwen Yao, Junwei Han

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 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, 1 violated it and 2 have no contract verdict; 5 failures of our instrument; 4 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/2210.06780.json · badge: /api/ran/2210.06780.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
LIUYUANWEI98/IPMT canonical (classifier label)
classifier basis: plan_row
9 ran · 4 no recorded run
FunctionStatusWhere it lives
Weighted_GAP Ran
ran; our contract draft was wrong, not the code
LIUYUANWEI98/IPMT/model/IPMTnetwork.py
pointer only (licence: MIT); the stored copy get_code serves, from YanFangCS/CyCTR-Pytorch, is pointer only (licence: NONE) · get_code("df77cb77dfe58d6d")
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 YanFangCS/CyCTR-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.

colorize Ran
ran, honoured the contract we drafted
LIUYUANWEI98/IPMT/util/util.py
pointer only (licence: MIT); the stored copy get_code serves, from Cavendish518/SFPNet, is pointer only (licence: NOASSERTION) · get_code("1dad93b61e98c32e")
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 Cavendish518/SFPNet, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

conv1x1 Ran
ran; our contract draft was wrong, not the code
LIUYUANWEI98/IPMT/model/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from medaitech/scrd4ad, is pointer only (licence: NONE) · get_code("2a80220dabcb742a")
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 medaitech/scrd4ad, 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.

conv3x3 Ran
ran; our contract draft was wrong, not the code
LIUYUANWEI98/IPMT/model/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from medaitech/scrd4ad, is pointer only (licence: NONE) · get_code("600ff2c45e0de056")
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 medaitech/scrd4ad, 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.

intersectionAndUnion Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LIUYUANWEI98/IPMT/util/util.py
pointer only (licence: MIT); the stored copy get_code serves, from Cavendish518/SFPNet, is pointer only (licence: NOASSERTION) · get_code("2a66f4ab6863908c")
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 Cavendish518/SFPNet, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

is_image_file Ran
ran, violated the contract we drafted
LIUYUANWEI98/IPMT/util/dataset.py
pointer only (licence: MIT); the stored copy get_code serves, from sam1224/aenet, is pointer only (licence: NOASSERTION) · get_code("0684a938c70bf564")
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 sam1224/aenet, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

load_cfg_from_cfg_file Ran
ran; our contract draft was wrong, not the code
LIUYUANWEI98/IPMT/util/config.py
code served (permissive licence) · get_code("277a13798d6d6981")
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 CfgNode. 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 tempfile
import os
import yaml

# Create a temporary YAML file for testing
temp_dir = tempfile.mkdtemp()
yaml_file = os.path.join(temp_dir, "config.yaml")

# Create a valid YAML config file with the expected structure
config_data = {
    "model": {
        "name": "test_model",
        "layers": 3,
        "hidden_dim": 64
    },
    "training": {
        "learning_rate": 0.001,
        "batch_size": 32,
        "epochs": 10
    },
    "data": {
        "dataset": "cifar10",
        "split": 0.8
    }
}

with open(yaml_file, 'w') as f:
    yaml.dump(config_data, f)

ARGS = {
    "file": yaml_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CfgNode — a CfgNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CfgNode 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
make_dataset Ran
ran on a synthesized input
LIUYUANWEI98/IPMT/util/dataset.py
code served (permissive licence) · get_code("cbfcdd76ffcf2a11")
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 numpy as np
import cv2
import json
import tempfile
import os

torch.manual_seed(0)

# Create temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a dummy data_root directory
data_root = os.path.join(temp_dir, "data")
os.makedirs(data_root, exist_ok=True)

# Create dummy image and label files
os.makedirs(os.path.join(data_root, "images"), exist_ok=True)
os.makedirs(os.path.join(data_root, "labels"), exist_ok=True)

# Create sample image and label files
dummy_image = np.random.randint(0, 255, (64, 64, 3), dtype=np.uint8)
cv2.imwrite(os.path.join(data_root, "images", "img_0.jpg"), dummy_image)

# Create label with specific classes (1, 2, 3) and enough pixels (>= 4*32*32 = 4096)
dummy_label = np.zeros((64, 64), dtype=np.uint8)
dummy_label[0:50, 0:50] = 1  # Class 1 with 2500 pixels
dummy_label[0:70, 50:64] = 2  # Class 2 with more pixels
cv2.imwrite(os.path.join(data_root, "labels", "label_0.png"), dummy_label)

# Create another label file
dummy_label_2 = np.zeros((64, 64), dtype=np.uint8)
dummy_label_2[0:72, 0:72] = 3  # Class 3 with enough pixels (5184 > 4096)
cv2.imwrite(os.path.join(data_root, "labels", "label_1.png"), dummy_label_2)

# Create data list JSON file
data_list_path = os.path.join(temp_dir, "data_list.json")
data_list_content = [
    ["images/img_0.jpg", "labels/label_0.png"],
    ["images/img_0.jpg", "labels/label_1.png"],
]
with open(data_list_path, 'w') as f:
    json.dump(data_list_content, f)

# Define sub_list with classes that should be tracked
sub_list = [1, 2, 3]

ARGS = {
    "split": 0,
    "data_root": data_root,
    "data_list": data_list_path,
    "sub_list": sub_list,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch, tqdm — 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
make_dataset Ran
ran on a synthesized input
LIUYUANWEI98/IPMT/util/dataset_coco.py
code served (permissive licence) · get_code("643408ce821a11cf")
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 os
import tempfile
import numpy as np
import cv2

# Create temporary directory and files for testing
temp_dir = tempfile.mkdtemp()

# Create a simple label image (grayscale)
label_image = np.zeros((128, 128), dtype=np.uint8)
# Add some pixels with class 1 and 2 (at least 2*32*32 = 2048 pixels each)
label_image[10:80, 10:80] = 1  # 70x70 = 4900 pixels for class 1
label_image[40:110, 40:110] = 2  # 70x70 = 4900 pixels for class 2

# Create a simple RGB image
rgb_image = np.random.randint(0, 256, (128, 128, 3), dtype=np.uint8)

# Save images
label_path = os.path.join(temp_dir, 'label.png')
image_path = os.path.join(temp_dir, 'image.png')
cv2.imwrite(label_path, label_image)
cv2.imwrite(image_path, rgb_image)

# Create data list file with 33-character prefix that will be stripped
data_list_path = os.path.join(temp_dir, 'data_list.txt')
with open(data_list_path, 'w') as f:
    # 33 characters of prefix + actual path
    prefix = 'a' * 33
    f.write(f'{prefix}{image_path} {prefix}{label_path}\n')
    f.write(f'{prefix}{image_path} {prefix}{label_path}\n')

ARGS = {
    'split': 0,
    'data_root': temp_dir,
    'data_list': data_list_path,
    'sub_list': [1, 2]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, tqdm — 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
intersectionAndUnionGPU Not yet run
unverified (harvested, no recorded run)
LIUYUANWEI98/IPMT/util/util.py
pointer only (licence: MIT); the stored copy get_code serves, from Cavendish518/SFPNet, is pointer only (licence: NOASSERTION) · get_code("136834d66336e6b9")
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 Cavendish518/SFPNet, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

merge_cfg_from_list Not yet run
unverified (harvested, no recorded run)
LIUYUANWEI98/IPMT/util/config.py
pointer only (licence: MIT); the stored copy get_code serves, from sam1224/aenet, is pointer only (licence: NOASSERTION) · get_code("b925dc5fd8492c34")
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 sam1224/aenet, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

resnet18 Not yet run
unverified (harvested, no recorded run)
LIUYUANWEI98/IPMT/model/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from nankepan/VIPMT, is pointer only (licence: NONE) · get_code("dc824689b4f991cf")
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 nankepan/VIPMT, 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.

weighted_dice_loss Not yet run
unverified (harvested, no recorded run)
LIUYUANWEI98/IPMT/model/loss.py
pointer only (licence: MIT); the stored copy get_code serves, from sam1224/hmnet, is pointer only (licence: NOASSERTION) · get_code("4708c105ce1b6276")
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 sam1224/hmnet, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 11 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 2 the same month, 11 later) and 2 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
conv1x1 112 other papers
30 dated earlier, 1 the same month, 80 later, 1 same year, order not determinable · 6 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1806.01531 (2018-06)
Deep Mixture of Experts via Shallow Embedding
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 109 more not named here
conv3x3 111 other papers
31 dated earlier, 1 the same month, 78 later, 1 same year, order not determinable · 6 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1806.01531 (2018-06)
Deep Mixture of Experts via Shallow Embedding
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 108 more not named here
resnet18 36 other papers
12 dated earlier, 24 later
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
2002.09564 (2020-02)
Towards Robust and Reproducible Active Learning Using Neural Networks
2003.04297 (2020-03)
Improved Baselines with Momentum Contrastive Learning
and 33 more not named here
merge_cfg_from_list 23 other papers
6 dated earlier, 17 later
2003.13328 (2020-03)
Strip Pooling: Rethinking Spatial Pooling for Scene Parsing
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2111.15174 (2021-11)
CRIS: CLIP-Driven Referring Image Segmentation
and 20 more not named here
load_cfg_from_cfg_file 22 other papers
6 dated earlier, 16 later
2003.13328 (2020-03)
Strip Pooling: Rethinking Spatial Pooling for Scene Parsing
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2111.15174 (2021-11)
CRIS: CLIP-Driven Referring Image Segmentation
and 19 more not named here
Weighted_GAP 12 other papers
5 dated earlier, 7 later
2106.02320 (2021-06)
Few-Shot Segmentation via Cycle-Consistent Transformer
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2203.07615 (2022-03)
Learning What Not to Segment: A New Perspective on Few-Shot Segmentation
and 9 more not named here
intersectionAndUnion 11 other papers
6 dated earlier, 5 later
2004.01658 (2020-04)
PointGroup: Dual-Set Point Grouping for 3D Instance Segmentation
Huang_PrimitiveNet_Primitive_Instance_Segmentation_With_Local_Primitive_Embedding_Under_Adversarial_ICCV_2021_paper (2021 (year only))
PrimitiveNet: Primitive Instance Segmentation with Local Primitive Embedding under Adversarial Metric
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
and 8 more not named here
intersectionAndUnionGPU 9 other papers
2 dated earlier, 7 later
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2203.14508 (2022-03)
Stratified Transformer for 3D Point Cloud Segmentation
2212.02011 (2022-12)
PointCaM: Cut-and-Mix for Open-Set Point Cloud Learning
and 6 more not named here
is_image_file 5 other papers
3 dated earlier, 2 later
2003.13328 (2020-03)
Strip Pooling: Rethinking Spatial Pooling for Scene Parsing
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2203.07615 (2022-03)
Learning What Not to Segment: A New Perspective on Few-Shot Segmentation
and 2 more not named here
colorize 4 other papers
2 dated earlier, 2 later
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2203.14508 (2022-03)
Stratified Transformer for 3D Point Cloud Segmentation
2303.12766 (2023-03)
Spherical Transformer for LiDAR-based 3D Recognition
and 1 more not named here
weighted_dice_loss 2 other papers
2 later
2309.11160 (2023-09)
Multi-grained Temporal Prototype Learning for Few-shot Video Object Segmentation
2409.19613 (2024-09)
Hybrid Mamba for Few-Shot 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

Few-shot semantic segmentation aims to segment the target objects in query under the condition of a few annotated support images. Most previous works strive to mine more effective category information from the support to match with the corresponding objects in query. However, they all ignored the category information gap between query and support images. If the objects in them show large intraclass diversity, forcibly migrating the category information from the support to the query is ineffective. To solve this problem, we are the first to introduce an intermediate prototype for mining both deterministic category information from the support and adaptive category knowledge from the query. Specifically, we design an Intermediate Prototype Mining Transformer (IPMT) to learn the prototype in an iterative way. In each IPMT layer, we propagate the object information in both support and query features to the prototype and then use it to activate the query feature map. By conducting this process iteratively, both the intermediate prototype and the query feature can be progressively improved. At last, the final query feature is used to yield precise segmentation prediction. Extensive experiments on both PASCAL-5 i and COCO-20 i datasets clearly verify the effectiveness of our IPMT and show that it outperforms previous state-of-the-art methods by a large margin. Code is available at https://github.com/LIUYUANWEI98/IPMT

For agents

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

get_harvested_code_for_paper("2210.06780")
get_code_for_paper("2210.06780")
have("2210.06780")

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

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

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

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

Connect an agent — have() is free.