DenseSAM: Semantic Enhance SAM for Efficient Dense Object Segmentation

Abstract

Dense object segmentation is essential for various applications, particularly in pathology image and remote sensing image analysis. However, distinguishing numerous similar and densely packed objects in this task presents significant challenges. Several methods, including CNN- and ViT-based approaches, have been proposed to tackle these issues. Yet, models trained on limited datasets exhibit limited generalization ability. The Segment Anything Model (SAM) has recently achieved significant progress in zero-shot segmentation but relies heavily on precise positional guidance. However, providing numerous accurate location prompts in dense scenarios is time-consuming. To overcome this limitation, we conducted an in-depth exploration of the SAM mechanism and found that its strong generalization ability stems from the encoder’s edge detection capability, which is semantically independent, making location prompts essential for segmentation. This insight inspired the development of DenseSAM, which replaces location prompts with semantic guidance for automatic segmentation in dense scenarios. Specifically, it uses local details to weaken the edges of background objects, leverages global context to enhance intra-class feature similarity, while further increasing contrast with the background, and integrates a dual-head decoding process to enable lightweight automatic semantic segmentation. Extensive experiments on pathology images demonstrate that DenseSAM delivers remarkable performance with minimal training parameters, providing a cost-effective and efficient solution. Moreover, experiments on remote sensing images further validate its excellent scalability, making DenseSAM suitable for various dense object segmentation domains. The code is available at https://github.com/imAzhou/DenseSAM.

Cite

Text

Zhou et al. "DenseSAM: Semantic Enhance SAM for Efficient Dense Object Segmentation." International Joint Conference on Artificial Intelligence, 2025. doi:10.24963/IJCAI.2025/889

Markdown

[Zhou et al. "DenseSAM: Semantic Enhance SAM for Efficient Dense Object Segmentation." International Joint Conference on Artificial Intelligence, 2025.](https://mlanthology.org/ijcai/2025/zhou2025ijcai-densesam/) doi:10.24963/IJCAI.2025/889

BibTeX

@inproceedings{zhou2025ijcai-densesam,
  title     = {{DenseSAM: Semantic Enhance SAM for Efficient Dense Object Segmentation}},
  author    = {Zhou, Linyun and Hu, Jiacong and Zhang, Shengxuming and Du, Xiangtong and Song, Mingli and Zhang, Xiuming and Feng, Zunlei},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year      = {2025},
  pages     = {7994-8002},
  doi       = {10.24963/IJCAI.2025/889},
  url       = {https://mlanthology.org/ijcai/2025/zhou2025ijcai-densesam/}
}