AtlasPatch: Scalable Foundation Model-based Tissue Detection and Patch Extraction for Computational Pathology
Organizations: Department of Computer Science and Software Engineering (CSSE), Concordia University, Montreal, QC, Canada, H3G 1M8 · Concordia Institute for Information Systems Engineering (CIISE), Concordia University, Montreal, QC, Canada, H3G 1M8 · Mila–Quebec AI Institute, Montreal, QC, Canada, H2S 3H1 · Department of Building, Civil, and Environmental Engineering, Concordia University, Montreal, QC, Canada, H3G 1M8 · University of Montreal Hospital Center (CHUM), Montreal, QC, Canada, H2X 0C1 · Institute for Research in Immunology and Cancer, University of Montreal, Montreal, QC, Canada, H3T 1J4 · Department of Computer Science, Khalifa University, Abu Dhabi, UAE · Department of Pathology, McGill University, Montreal, QC, Canada, H3A 2B4
Abstract
Whole-slide image (WSI) preprocessing, including tissue detection and patch extraction, is critical computational pathology, yet remains a major bottleneck for large-scale workflows. Existing methods often rely either on threshold-based heuristics that are sensitive to staining variations, tissue fragmentation, and artifacts, or on patch-wise deep learning pipelines with substantially higher computational cost. We present AtlasPatch, a scalable high-throughput WSI preprocessing method built around a foundation-model-based tissue detector that operates at thumbnail resolution: a single thumbnail-level forward pass yields a tissue mask that directly guides patch coordinate generation at the target desired magnification, avoiding repeated patch-level inference. The proposed detector's robustness and efficiency is driven by two coupled contributions: (i) a parameter-efficient adaptation of the SAM2 foundation model that updates only its layer-normalization parameters (0.076% of model weights), and (ii) a curated and semi-manually annotated multi-cohort dataset of 30,000 WSI thumbnail-mask pairs deliberately spanning multiple organs, scanners, tissue appearances, and artifacts. The detector is coupled with pyramid-aware contour mapping from thumbnail to full-resolution slide coordinates, enabling direct patch coordinate generation at the target magnification and parallelized high-throughput patch extraction. AtlasPatch's tissue detection achieves a precision of 0.986 and remains robust across slide variations. Compared with widely used deep-learning preprocessing methods, AtlasPatch is up to 16x faster while preserving downstream multiple-instance learning performance across six slide-level classification tasks. These results position AtlasPatch as a frontier of efficient preprocessing in large-scale computational pathology and pathology foundation models.