  The high cost of creating pixel-by-pixel gold-standard labels, limited expert
availability, and presence of diverse tasks make it challenging to generate
segmentation labels to train deep learning models for medical imaging tasks. In
this work, we present a new approach to overcome the hurdle of costly medical
image labeling by leveraging foundation models like Segment Anything Model
(SAM) and its medical alternate MedSAM. Our pipeline has the ability to
generate weak labels for any unlabeled medical image and subsequently use it to
augment label-scarce datasets. We perform this by leveraging a model trained on
a few gold-standard labels and using it to intelligently prompt MedSAM for weak
label generation. This automation eliminates the manual prompting step in
MedSAM, creating a streamlined process for generating labels for both real and
synthetic images, regardless of quantity. We conduct experiments on
label-scarce settings for multiple tasks pertaining to modalities ranging from
ultrasound, dermatology, and X-rays to demonstrate the usefulness of our
pipeline. The code is available at
https://github.com/stanfordmlgroup/Auto-Generate-WLs/.
