[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-81557-en":3,"doc-seo-81557-105":29,"detail-sidebar-cat-0-en-105":90},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},81557,549758146520,"Patrick","https://ap-avatar.wpscdn.com/avatar/80002397d8c0411e94?_k=1775819394049821470",8,"Research & Report","Memory-SAM Human-Prompt-Free Tongue Segmentation via Retrieval-to-Prompt","Accurate tongue segmentation supports quantitative analysis of tongue color, texture, and geometry, yet automatic smartphone deployment remains constrained because SAM2 quality depends on reliable prompts. Memory-SAM addresses this by converting a retrieved expert mask into a transferable foreground/background contrast signal for point prompting. Frozen DINOv3 descriptors retrieve candidate exemplars from a labeled memory, transfer separability via competing correspondence maps, rerank exemplars, and select three contrastive positive prompts for SAM2. Evaluation on HIT-Tongue and SM-Tongue shows 0.984 and 0.973 mIoU respectively, improving TongueSAM by 3.0 mIoU and exceeding box/center prompting.","Memory-SAM: Human-Prompt-Free Tongue Segmentation via  \nRetrieval-to-Prompt  \nJoongwon Chae∗1,7, Lihui Luo∗1, Yang Liu 1 , Xi Yuan2 , Dongmei Yu4 , Zhenglin Chen2 , Runming  \nWang 1 , Ilmoon Chae7 , Lian Zhang5 , Peiwu Qin†6  \n1Tsinghua University, China  \n2The Fifth Affiliated Hospital of Wenzhou Medical University, China  \n3 Shenzhen Traditional Chinese Medicine Hospital, China  \n4Wenzhou Medical University, China  \n5The First Hospital of Hebei Medical University, China  \n6 Chinese Medicine Guangdong Laboratory/Hengqin Laboratory, China  \n7RatelSoft, Republic of Korea  \n[pwqin1979@gmail.com](pwqin1979@gmail.com)  \narXiv :2510 . 15849v3 [ cs .CV] 10 Jul 2026  \nAbstract  \nAccurate tongue segmentation is required for quantitative tongue-image analysis, but automatic smartphone deployment remains difficult because SAM2 still depends on reliable prompts. Frozen self-supervised dense features provide visual correspondence rather than object identity: tongue, lip, skin, and boundary patches can all produce high local similarity. We present Memory-SAM, a retrieval-to-prompt framework that converts a retrieved expert mask into a transferable foreground/background contrast signal for automatic SAM2 point prompting. For each query, frozen DINOv3 descriptors retrieve candidate exemplars from a fixed labeled memory. The corresponding expert mask partitions reference patch features into foreground and background sets, whose dense similarities are transferred to the query as competing correspondence maps. A query-side separability reranker selects the most transferable exemplar, and contrastive foreground-minus-background ranking selects three positive point prompts for SAM2 . The method uses a small labeled memory while keeping all model parameters fixed at inference time. We evaluate on HIT-Tongue and SM-Tongue, a 2,155-image smartphone benchmark with expert masks. Memory-SAM obtains 0.984 mIoU on HIT-Tongue and 0.973 mIoU on SM-Tongue. On the latter, it improves over TongueSAM by 3.0 mIoU points and exceeds controlled SAM2 box and center-point prompting. Swapping only the labeled memory also transfers the method across imaging domains, where a U-Net retrained on the full source domain collapses. The results indicate that mask-conditioned retrieval can convert foundation-model features into stable automatic prompts under unconstrained capture conditions.  \nCode—[https://github.com/jw-chae/memory-sam](https://github.com/jw-chae/memory-sam)  \nIntroduction  \nAccurate tongue-region segmentation is a prerequisite for quantitative analysis of tongue color, texture, shape, and sur-  \n∗These authors contributed equally.†Corresponding author.  \nface patterns. Errors near the boundary contaminate downstream descriptors by mixing the tongue with lips, skin, teeth, or background, while missing peripheral regions can remove clinically relevant texture and geometry. This requirement is particularly difficult for smartphone images, where illumination, camera distance, viewpoint, facial context, tongue pose, and visible scale vary substantially (Zeng et al. 2020; Zhou et al. 2019) .  \nEarly tongue-segmentation systems relied on deformable contours, shortest paths, and handcrafted gradient priors (Pang, Zhang, and Wang 2005; Sheng, Ke, and Ping 2009; Shi, Li, and Li 2013; Shi et al. 2014; Ning et al. 2012). Fully supervised convolutional networks later produced large accuracy gains through learned representations and task-specific losses (Ronneberger, Fischer, and Brox 2015; Long, Shelhamer, and Darrell 2015; Qin et al. 2020; Cai et al. 2020; Xu et al. 2020; Sage et al. 2021). These models remain a strong choice when target-domain masks and retraining resources are abundant. Their deployment cost, however, grows whenever acquisition devices, populations, framing protocols, or illumination conditions change, because the segmentation model must be optimized and validated again for the new distribution.  \nPromptable foundation models offer a different inter","cbCaibe4JVDYJ82g","https://ap.wps.com/l/cbCaibe4JVDYJ82g","pdf",14892637,1,9,"English","en",105,"# Abstract\n# Introduction\n## Problem: prompt dependence in smartphone tongue segmentation\n## Prior work and the automation gap\n## Memory-SAM approach: mask-conditioned retrieval to automatic prompts\n## Contributions and evaluation results","[{\"question\":\"Why is automatic tongue segmentation from smartphone images difficult with SAM2?\",\"answer\":\"SAM2 relies on the quality and placement of prompts; smartphone captures vary greatly in illumination, distance, viewpoint, and tongue pose, making reliable prompt generation hard to automate.\"},{\"question\":\"How does Memory-SAM convert a retrieved expert mask into prompts for SAM2?\",\"answer\":\"Memory-SAM retrieves candidate exemplars using frozen DINOv3 descriptors, uses the expert mask to partition reference features into foreground/background sets, transfers the dense similarities as competing correspondence maps, then reranks exemplars and selects three contrastive positive point prompts for SAM2.\"},{\"question\":\"What performance does Memory-SAM achieve on the HIT-Tongue and SM-Tongue benchmarks?\",\"answer\":\"Memory-SAM reaches 0.984 mIoU on HIT-Tongue and 0.973 mIoU on SM-Tongue, improving over TongueSAM on SM-Tongue by 3.0 mIoU points and outperforming controlled SAM2 box and center-point prompting.\"}]",1784174306,23,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":27},"memory-sam-human-prompt-free-tongue-segmentation-via-retrieval-to-prompt","",{"@graph":35,"@context":84},[36,53,67],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/memory-sam-human-prompt-free-tongue-segmentation-via-retrieval-to-prompt/81557/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":61,"encodingFormat":60,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-16",true,{"@type":64,"interactionType":65,"userInteractionCount":4},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"Why is automatic tongue segmentation from smartphone images difficult with SAM2?","Question",{"text":74,"@type":75},"SAM2 relies on the quality and placement of prompts; smartphone captures vary greatly in illumination, distance, viewpoint, and tongue pose, making reliable prompt generation hard to automate.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"How does Memory-SAM convert a retrieved expert mask into prompts for SAM2?",{"text":79,"@type":75},"Memory-SAM retrieves candidate exemplars using frozen DINOv3 descriptors, uses the expert mask to partition reference features into foreground/background sets, transfers the dense similarities as competing correspondence maps, then reranks exemplars and selects three contrastive positive point prompts for SAM2.",{"name":81,"@type":72,"acceptedAnswer":82},"What performance does Memory-SAM achieve on the HIT-Tongue and SM-Tongue benchmarks?",{"text":83,"@type":75},"Memory-SAM reaches 0.984 mIoU on HIT-Tongue and 0.973 mIoU on SM-Tongue, improving over TongueSAM on SM-Tongue by 3.0 mIoU points and outperforming controlled SAM2 box and center-point prompting.","https://schema.org",{"og:url":51,"og:type":86,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":88,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,104,109,114,119,122,126,129,133],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":101,"show_sort_weight":102,"slug":103},"Exam",70,"exam",{"id":105,"doc_module":4,"doc_module_name":45,"category_name":106,"show_sort_weight":107,"slug":108},5,"Comic",60,"comic",{"id":110,"doc_module":4,"doc_module_name":45,"category_name":111,"show_sort_weight":112,"slug":113},6,"Technology",50,"technology",{"id":115,"doc_module":4,"doc_module_name":45,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":120,"slug":121},30,"research-report",{"id":21,"doc_module":4,"doc_module_name":45,"category_name":123,"show_sort_weight":124,"slug":125},"Religion & Spirituality",20,"religion-spirituality",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":127,"show_sort_weight":124,"slug":128},"World Cup","world-cup",{"id":130,"doc_module":4,"doc_module_name":45,"category_name":131,"show_sort_weight":130,"slug":132},10,"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":45,"category_name":135,"show_sort_weight":105,"slug":136},19,"General","general"]