Extracting high-fidelity 2D contours from Scanning Electron Microscope (SEM) images is critical for calibrating Optical Proximity Correction (OPC) models. While foundation models like Segment Anything 2 (SAM2) are promising, adapting them to specialized domains with scarce annotated data is a major challenge. This paper presents a case study on adapting SAM2 for SEM contour extraction in a few-shot setting. We propose SegSEM, a framework built on two principles: a data-efficient fine-tuning strategy that adapts by selectively training only the model's encoders, and a robust hybrid architecture integrating a traditional algorithm as a confidence-aware fallback. Using a small dataset of 60 production images, our experiments demonstrate this methodology's viability. The primary contribution is a methodology for leveraging foundation models in data-constrained industrial applications.
@article{arxiv.2602.20471,
title = {SegSEM: Enabling and Enhancing SAM2 for SEM Contour Extraction},
author = {Da Chen and Guangyu Hu and Kaihong Xu and Kaichao Liang and Songjiang Li and Wei Yang and XiangYu Wen and Mingxuan Yuan},
journal= {arXiv preprint arXiv:2602.20471},
year = {2026}
}