Papers › Few-Shot Segmentation with Global and Local Contrastive Learning

Few-Shot Segmentation with Global and Local Contrastive Learning

11 Aug 2021arXiv:2108.05293archive 2025-07-28

Weide Liu, Zhonghua Wu, Henghui Ding, Fayao Liu, Jie Lin, Guosheng Lin

In this work, we address the challenging task of few-shot segmentation. Previous few-shot segmentation methods mainly employ the information of support images as guidance for query image segmentation. Although some works propose to build cross-reference between support and query images, their extraction of query information still depends on the support images. We here propose to extract the information from the query itself independently to benefit the few-shot segmentation task. To this end, we first propose a prior extractor to learn the query information from the unlabeled images with our proposed global-local contrastive learning. Then, we extract a set of predetermined priors via this prior extractor. With the obtained priors, we generate the prior region maps for query images, which locate the objects, as guidance to perform cross interaction with support features. In such a way, the extraction of query information is detached from the support branch, overcoming the limitation by support, and could obtain more informative query clues to achieve better interaction. Without bells and whistles, the proposed approach achieves new state-of-the-art performance for the few-shot segmentation task on PASCAL-5ⁱ and COCO datasets.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2108.05293")

Code

Syntology Ran 9 of 15 code samples harvested from 1 repository linked to this paper; 6 have no recorded run. Of those that ran: 4 ran · our draft was wrong; 5 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

liuweide01/GQNet-Few-shot-segmentation officialmentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 9 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

4ran · our draft was wrong
5ran
6unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from liuweide01/GQNet-Few-shot-segmentation. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Weighted_GAP liuweide01/GQNet-Few-shot-segmentation/model/PFENet.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · df77cb77dfe58d6d · report
colorize liuweide01/GQNet-Few-shot-segmentation/util/util.py official repository ran MIT (permissive) · 1dad93b61e98c32e · report
conv3x3 liuweide01/GQNet-Few-shot-segmentation/model/resnet.py official repository ran · our draft was wrong MIT (permissive) · fac5364e2f53c6db · report
get_vgg16_layer liuweide01/GQNet-Few-shot-segmentation/model/PFENet.py official repository ran · our draft was wrong MIT (permissive) · ad7ba6c4e516607e · report
intersectionAndUnion liuweide01/GQNet-Few-shot-segmentation/util/util.py official repository ran MIT (permissive) · 2a66f4ab6863908c · report
is_image_file liuweide01/GQNet-Few-shot-segmentation/util/dataset.py official repository ran MIT (permissive) · 0684a938c70bf564 · report
make_layers liuweide01/GQNet-Few-shot-segmentation/model/vgg.py official repository ran · our draft was wrong MIT (permissive) · e31250b969b51841 · report
vgg11 liuweide01/GQNet-Few-shot-segmentation/model/vgg.py official repository ran MIT (permissive) · 2067e75510fbe85e · report
vgg11_bn liuweide01/GQNet-Few-shot-segmentation/model/vgg.py official repository ran MIT (permissive) · bf96fb236a6b1683 · report
intersectionAndUnionGPU liuweide01/GQNet-Few-shot-segmentation/util/util.py official repository unverified MIT (permissive) · 136834d66336e6b9 · report
load_cfg_from_cfg_file liuweide01/GQNet-Few-shot-segmentation/util/config.py official repository unverified MIT (permissive) · 277a13798d6d6981 · report
make_dataset liuweide01/GQNet-Few-shot-segmentation/util/dataset.py official repository unverified MIT (permissive) · 2b6740339633d440 · report
merge_cfg_from_list liuweide01/GQNet-Few-shot-segmentation/util/config.py official repository unverified MIT (permissive) · b925dc5fd8492c34 · report
resnet18 liuweide01/GQNet-Few-shot-segmentation/model/resnet.py official repository unverified MIT (permissive) · 0d5305ea0adc2098 · report
resnet34 liuweide01/GQNet-Few-shot-segmentation/model/resnet.py official repository unverified MIT (permissive) · f8bf3c22835aea80 · report

Tasks

Contrastive LearningImage SegmentationSegmentationSemantic Segmentation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections