Automatic Prompt Generation Using Class Activation Maps for Foundational Models: A Polyp Segmentation Case Study

We introduce a weakly supervised segmentation approach that leverages class activation maps and the Segment Anything Model to generate high-quality masks using only classification data. A pre-trained classifier produces class activation maps that, once thresholded, yield bounding boxes encapsulating...

Full description

Saved in:
Bibliographic Details
Main Authors: Hanna Borgli, Håkon Kvale Stensland, Pål Halvorsen
Format: Article
Language:English
Published: MDPI AG 2025-02-01
Series:Machine Learning and Knowledge Extraction
Subjects:
Online Access:https://www.mdpi.com/2504-4990/7/1/22
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:We introduce a weakly supervised segmentation approach that leverages class activation maps and the Segment Anything Model to generate high-quality masks using only classification data. A pre-trained classifier produces class activation maps that, once thresholded, yield bounding boxes encapsulating the regions of interest. These boxes prompt the SAM to generate detailed segmentation masks, which are then refined by selecting the best overlap with automatically generated masks from the foundational model using the intersection over union metric. In a polyp segmentation case study, our approach outperforms existing zero-shot and weakly supervised methods, achieving a mean intersection over union of 0.63. This method offers an efficient and general solution for image segmentation tasks where segmentation data are scarce.
ISSN:2504-4990