Contextrast: Contextual Contrastive Learning for Semantic Segmentation

Chan-Yong Sung, Wanhee Kim, Jungho An, Wooju Lee, Hyungtae Lim +1 more
2/9/2026

No official code found. Best implementation: CK-Sung/Contextrast_public (7 stars, last commit 2024-10-18).

Abstract

Despite great improvements in semantic segmentation, challenges persist because of the lack of local/global contexts and the relationship between them. In this paper, we propose Contextrast, a contrastive learning-based semantic segmentation method that allows to capture local/global contexts and comprehend their relationships. Our proposed method comprises two parts: a) contextual contrastive learning (CCL) and b) boundary-aware negative (BANE) sampling. Contextual contrastive learning obtains local/global context from multi-scale feature aggregation and inter/intra-relationship of features for better discrimination capabilities. Meanwhile, BANE sampling selects embedding features along the boundaries of incorrectly predicted regions to employ them as harder negative samples on our contrastive learning, resolving segmentation issues along the boundary region by exploiting fine-grained details. We demonstrate that our Contextrast substantially enhances the performance of semantic segmentation networks, outper-forming state-of-the-art contrastive learning approaches on diverse public datasets, e.g. Cityscapes, CamVid, PASCALC, COCO-Stuff, and ADE20K, without an increase in computational cost during inference.

View on arXivView PDF

Code Implementations(1)

This is the official code of Contextrast: Contextual Contrastive Learning for Semantic Segmentation (CVPR24)

70Oct 18, 20242 years ago

Similar Papers

Cite this paper

@article{sung2026contextrast,
  title  = {Contextrast: Contextual Contrastive Learning for Semantic Segmentation},
  author = {Chan-Yong Sung and Wanhee Kim and Jungho An and Wooju Lee and Hyungtae Lim and Hyun Myung},
  year   = {2026},
  eprint = {2404.10633},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2404.10633},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2404.10633.svg)](https://codeofpaper.com/paper/2404.10633)

Discussion