H-SPAM: Hierarchical Superpixel Anything Model

Julien Walther, Rémi Giraud, Michaël Clément
4/13/2026
cs.CV

Official code: waldo-j/hspam (6 stars, Python, last commit 2026-01-19).

Abstract

Superpixels offer a compact image representation by grouping pixels into coherent regions. Recent methods have reached a plateau in terms of segmentation accuracy by generating noisy superpixel shapes.

Show full abstract

Moreover, most existing approaches produce a single fixed-scale partition that limits their use in vision pipelines that would benefit multi-scale representations. In this work, we introduce H-SPAM (Hierarchical Superpixel Anything Model), a unified framework for generating accurate, regular, and perfectly nested hierarchical superpixels. Starting from a fine partition, guided by deep features and external object priors, H-SPAM constructs the hierarchy through a two-phase region merging process that first preserves object consistency and then allows controlled inter-object grouping. The hierarchy can also be modulated using visual attention maps or user input to preserve important regions longer in the hierarchy. Experiments on standard benchmarks show that H-SPAM strongly outperforms existing hierarchical methods in both accuracy and regularity, while performing on par with most recent state-of-the-art non-hierarchical methods. Code and pretrained models are available: https://github.com/waldo-j/hspam.

View on arXivView PDF

Code Implementations(1)

waldo-j/hspamOfficial100%
61Python, Cython10 months ago

Similar Papers

Cite this paper

@article{walther2026hspam,
  title  = {H-SPAM: Hierarchical Superpixel Anything Model},
  author = {Julien Walther and Rémi Giraud and Michaël Clément},
  year   = {2026},
  eprint = {2604.11218},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.11218v1}
}

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/2604.11218.svg)](https://codeofpaper.com/paper/2604.11218)

Discussion