Memory-SAM: Human-Prompt-Free Tongue Segmentation via Retrieval-to-Prompt

Joongwon Chae, Lihui Luo, Xi Yuan, Dongmei Yu, Zhenglin Chen +2 more
10/17/2025
cs.CV

Official code: jw-chae/memory-sam (10 stars, last commit 2025-11-11).

Abstract

Accurate tongue segmentation is crucial for reliable TCM analysis. Supervised models require large annotated datasets, while SAM-family models remain prompt-driven. We present Memory-SAM, a training-free, human-prompt-free pipeline that automatically generates effective prompts from a small memory of prior cases via dense DINOv3 features and FAISS retrieval. Given a query image, mask-constrained correspondences to the retrieved exemplar are distilled into foreground/background point prompts that guide SAM2 without manual clicks or model fine-tuning. We evaluate on 600 expert-annotated images (300 controlled, 300 in-the-wild). On the mixed test split, Memory-SAM achieves mIoU 0.9863, surpassing FCN (0.8188) and a detector-to-box SAM baseline (0.1839). On controlled data, ceiling effects above 0.98 make small differences less meaningful given annotation variability, while our method shows clear gains under real-world conditions. Results indicate that retrieval-to-prompt enables data-efficient, robust segmentation of irregular boundaries in tongue imaging. The code is publicly available at https://github.com/jw-chae/memory-sam.

View on arXivView PDF

Code Implementations(1)

jw-chae/memory-samOfficial100%
102C++, CudaAug 11, 202511 months ago

Similar Papers

Cite this paper

@article{chae2025memorysam,
  title  = {Memory-SAM: Human-Prompt-Free Tongue Segmentation via Retrieval-to-Prompt},
  author = {Joongwon Chae and Lihui Luo and Xi Yuan and Dongmei Yu and Zhenglin Chen and Lian Zhang and Peiwu Qin},
  year   = {2025},
  eprint = {2510.15849},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.15849v1}
}

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

Discussion