SAMAug: Point Prompt Augmentation for Segment Anything Model

Haixing Dai, Chong Ma, Zhiling Yan, Zhengliang Liu, Enze Shi, Yiwei Li, Peng Shu, Xiaozheng Wei, Lin Zhao, Zihao Wu, Fang Zeng, Dajiang Zhu, Wei Liu, Quanzheng Li, Lichao Sun, Shu Zhang Tianming Liu, Xiang Li

Introduction

Recent advancement in large pre-trained models inspired a series of developments of foundational models in computer vision . Among these, the Segment Anything Model (SAM) stands out as a novel interactive model specifically designed for image segmentation tasks and subsequent downstream applications.

SAM represents the paradigm shift in artificial intelligence towards large-scale, general-purposed "foundation" models . The SAM model demonstrates the feasibility of performing multi-task image segmentation in a zero-shot learning approach. It also allows the use of "prompts" in the form of user-provided points, bounding boxes, or dense masks to perform the segmentation via an in-context-learning scheme. However, simple prompts such as a single point will lead to ambiguities in the SAM model, which is also discussed in the original paper of SAM . While the multi-mask prediction and confidence score-based result selection scheme adopted by SAM can solve some of the ambiguities, we observed that it is also possible to generate additional point prompts automatically to improve the performance of SAM. In this work, we propose SAMAug, a novel visual point augmentation method for generating additional segmentation masks using SAM. SAMAug performs prompt (point or bounding-box) augmentation based on the initial segmentation results from SAM using a single point or box prompt, then incorporates them into the prompt-based segmentation by SAM. We evaluate four sampling approaches for point prompts: random, maximum difference entropy, maximum distance, and saliency-based. We also investigated the inner- and outer-bounding box augmentation for box prompts.

With the experiments on the COCO, Fundus, COVIDQU-Ex, and ISIC2018 datasets, we demonstrate that SAMAug can improve SAM’s performance, especially when using the maximum distance and saliency model point selection approaches. Our results showcase more possibilities of incorporating human inputs in a visual prompt setting. SAMAug represents an important step towards prompt-based augmentation methods for computer vision that can reduce user inputs and improve model performance.

This study makes the following key contributions:

We develop a novel visual point augmentation framework, SAMAug, for generating additional prompts without extra manual operations for SAM.

We propose a visual prompt augmentation theory based on the invariance in prompt selection.

We tested different techniques for visual prompt augmentation with experiments on one general-domain and three medical-domain datasets and identified the most effective augmentation techniques (maximum distance and saliency).

Background and Related work

Recently, the introduction of the Segment Anything Model (SAM) has revolutionized the approach to image segmentation. It is a general, prompt-able model designed to adapt to specific tasks via an in-context learning approach, much like the text prompts used in natural language processing models . Segmentation models can be categorized into two broad classes : Interactive segmentation requires user input to refine a mask iteratively, whereas automatic segmentation requires a significant amount of manually annotated objects for training. SAM unifies these two classes of approaches. It is a single model capable of performing both interactive and automatic segmentation. Its interface is designed to handle a wide array of segmentation tasks, facilitated by an appropriate prompt for the model. One of SAM’s most distinguishing features is its training on an unprecedentedly large dataset of over one billion annotations collected as part of the Segment Anything project. This diverse, high-quality dataset enables SAM to generalize to new types of objects and images beyond what it observed during training.

2 Research Work based on SAM Model

SAM is a very powerful fundamental model for image segmentation that can achieve zero-short learning on unseen domains, including medical image analysis . There are many works verifying the effect of SAM for medical tasks, such as , , and . It is found that even without any further training or transfer learning of the model, SAM can achieve good segmentation performance. Work in leverages SAM for generating samples that can be used to train other medical image segmentation models. Further development of domain-specific SAM with model fine-tuning shows that SAM with adaptation to the new dataset can achieve state-of-the-art performance over a wide spectrum of tasks. Still, SAM will fail when the segmentation target is small, dense, or irregular. Experiments also show that the segmentation quality of SAM can be improved by adjusting prompts , . Therefore, exploring prompt tuning can be a solution for improving its performance in the medical domain.

3 Prompt Learning and Augmentation

Prompt learning can extract valuable insights from large pre-trained models . This technique revolves around optimizing either a sequence of tokens (discrete prompts) or a sequence of vectors (continuous prompts) . Prompt-based learning allows users to effectively exploit the potential of large pre-trained models without the need for updating model parameters (e.g., via fine-tuning). It is also possible and potentially beneficial to augment prompts . This strategy, distinct from data augmentation, involves the generation and optimization of prompts, thereby further harnessing the capabilities of prompt-based models . One prompt augmentation method is AutomateCOT , which automatically augments and selects prompts to enhance the reasoning ability of LLMs. AutomateCoT generates pseudo-chains for input questions and then prunes incorrect ones based on the predicted answers. It finally selects an optimal combination of exemplars using a variance-reduced policy gradient strategy. The proposed SAMAug shares a similar motivation with AutomateCoT while focusing on the computer vision tasks by augmenting visual prompts for SAM, a large vision model, to produce augmented segmentation masks. In contrast, AutomateCoT generates additional textual prompts for language models to solve NLP tasks such as arithmetic and symbolic reasoning. Despite the differences in modality and tasks, both SAMAug and AutomateCoT demonstrate the value of harnessing model capabilities through refined prompt design.

4 Visual Prompts and Interactive Image Segmentation

By incorporating user input, integrative image segmentation can obtain more precise and targeted results. With clicks (points), strokes (lines), or bounding boxes, human users can provide visual cues to guide the model about areas of interest or to correct potential errors . With the user inputs, the model can then quickly adapt and provide immediate updates, allowing the user to assess and refine the segmentation results . Inspired by the success of in-context learning in NLP, researchers have explored visual prompts in computer vision in a more systematic approach, integrating the visual cues into model learning . For example, VPT introduces a small part of trainable parameters into input space and keeps the entire pre-trained Transformer backbone frozen. By training these parameters regarded as visual prompts, VPT reaches better performance for diverse visual tasks. Convpass combines vision transformer (ViT) with convolution bypass prompts to mitigate the computational stress. ViPT implements a prompt-tuning method to utilize prior knowledge to learn more information and structures from limited data. In summary, visual prompts enhance the ability of vision models to understand the task (user’s intention) and the image.

5 Sampling Methods for Image Analysis

Sampling is a fundamental problem in the field of statistics and deep learning , and is classified into two main categories: Probability Sampling and Non-Probability Sampling. Since each sample has an equal chance of being selected, probability sampling is generally used and statistically more likely to choose a sample that is representative of the total. Probability sampling is further divided into the following four groups: (1) Simple random sampling, (2) Stratified sampling, (3)Cluster sampling, and (4) Systematic sampling. Simple random sampling is the most commonly employed sampling technique that gathers a random selection from the entire population, with each unit having an equal chance of selection. The other sampling techniques, stratified sampling, systematic sampling, and cluster sampling, involve the division of the population into subsets or clusters based on the attributes of the samples, followed by sampling from these subsets. These sampling strategies have significantly improved the understanding of the overall population. Within the field of computer vision, a single pixel or a small region of an image can be regarded as a sample unit. Sampling strategies that are based on the properties of these sample units are widely employed in various topics, including image alignment , image segmentation , and saliency prediction . Specifically, a common approach for image alignment involves sampling key points and extracting image features from those points for the alignment. By sampling pixels based on the importance of the semantic information they contain, salient information in an image can be identified, forming the basis of saliency detection. Furthermore, pixels that exhibit high levels of saliency in an image are closely associated with their semantic information . Thus, saliency is often considered an essential criterion when selecting sample points.

Methods

The decoder of SAM employs prompt-based self-attention and cross-attention, allowing attention to flow both from the encoded prompt to the image and vice versa to update the encoded image and prompt features. This mechanism makes SAM potentially sensitive to the location and number of point prompts, as demonstrated in the right panel of Figure 1. Firstly, the bi-directional cross-attention module within the decoding path heavily relies on the coordinate of the point prompt(s) represented by the positional encoding(s). As the image embeddings will also be updated accordingly, point prompts from different locations, even with similar semantic contexts, will potentially lead to differences in the final results. Secondly, as SAM is trained for performing general segmentation rather than specific tasks, it could not accurately deal with (whether suppress or enhance) segmentation boundaries, especially when the prompt information is limited. Thirdly, as pointed out in the SAM documentation , a single prompt such as only one point will cause the segmentation ambiguity issue where the prompt can correspond to multiple valid masks, and the SAM model cannot differentiate which mask the prompt is actually referring to. While the SAM model has adopted an ambiguity-resolving module to generate multiple segmentation masks and rank them based on confidence scores, using multiple prompts will certainly address the issue.

Thus, in this work, we propose the point prompt augmentation scheme based on the premise that: 1) There exists invariance in the visual prompt selection process by the human user, where the selected prompt is from only one of the many possible locations of the user’s prior knowledge about the image. Specifically, similar to the rotation- or shift-invariance which is expected in a classic image processing setting , we also expect SAM will produce the same segmentation results based on the manifestation of our intention in the form of prompts, regardless of where exactly the point prompt locates at. 2) As experimental results have demonstrated that SAM cannot achieve such invariance, we will need to perform prompt augmentations to guide the model to better understand our intention for the segmentation. The most intuitive approach will be the automatic generation of additional prompts sampled from the initial segmentation results by SAM using a single human-provided prompt. The sampling-from-mask approach essentially regards the initial segmentation mask as a trustworthy yet potentially incomplete result compared with our target; and aims to improve the results by leveraging the prompt selection invariance and adding the extra point prompts. These automatically generated point prompts can be sampled via specific strategies, which are described below.

2 Point Prompt Augmentation by Random Sampling

In the random selection method, we will add one point to the initial mask by randomly selecting one point from the candidate points. These candidate points are determined based on the initial segmentation mask generated by SAM. Given a set of candidate points CC derived from the initial mask, the selected point pp is:

3 Point Prompt Augmentation by Max Entropy Criterion

In the max entropy point method, we will select a point that maximizes the difference in entropy with respect to the initial prompt. To calculate the entropy, we use a 9x9 grid centered at each candidate point. The entropy of each candidate point is computed based on the distribution of pixel intensities within this grid. The point with the maximum difference in entropy, compared to the initial point, is chosen for addition to the mask. We can denote the pixel intensity distribution within a 9x9 grid centered at a candidate point pip_{i} by P(pi)P(p_{i}). The entropy H(pi)H(p_{i}) of this distribution is:

Where jj represents all pixel intensities in the distribution. The selected point pmaxp_{\text{max}} is the one that maximizes the difference in entropy with respect to the initial point p0p_{0}:

4 Point Prompt Augmentation by Max Distance Criterion

In the distance-based method, we search for a point that is at a minimal distance from the initial point, measured by metrics such as Euclidean distance. Specifically, given a distance metric d(.,.)d(.,.), the selected point pmaxp_{\text{max}} is:

5 Point Prompt Augmentation by the Saliency Map

In the "Saliency" sampling strategy, we implemented a visual Saliency Transformer (VST) used in salient object detection (SOD) to perform point prompt augmentation. VST can extract a saliency mask for objects that are visually prominent for a given image. To minimize the loss of edge information, we cropped a region based on the initial SAM result and expanded the boundaries by 10 pixels outward. Subsequently, we feed this cropped image into the VST model to obtain our saliency mask. In this study, we only focus on VST for RGB-SOD. The specific calculation formula is shown as follows, where II represents the cropped image, VST(I)VST(I) represents the detected saliency mask generated by the VST model, and psp_{s} denotes our augmented point randomly selected from the region of the saliency mask.

6 Study on Box Prompt

As SAM allows box-like visual prompts in addition to point prompts, we also examined the SAMAug performance using box-based prompts. Specifically, we considered the following scenarios:

In this approach, a point is randomly selected within the ground-truth mask as the center of the box, and it is expanded outward until the boundary of the box aligns with the mask boundary. This is illustrated in Figure 1 as "Inner Box in GT mask." We refer to this result as the Initial Box Result.

6.2 Outer Box of GT mask

This approach generates a box that fully contains the GT mask, as depicted in Figure 1 as "Outer Box of GT mask." This box prompt contains all the information and boundary features of the object to be segmented.

6.3 Inner Box of Initial Box Result

This approach selects a box within the previous segmentation mask (rather than GT) as the prompt. The method for generating the box is consistent with "Inner Box in GT Mask".

6.4 Outer Box of Initial Box Result

This approach generates a box outside the boundary of the previous segmentation mask, as demonstrated in Figure 1 as "Outer Box of Initial Box Result".

6.5 Outer Box of Initial Point Result

In this approach, we will generate a bounding box containing the initial segmentation result using SAM, this time with a single point as the prompt. In other words, the final prompts to SAM will be one point plus one bounding box.

7 Dataset

The COCO dataset is notable for its size and diversity. It contains more than 200,000 images and over 80 object categories, including common objects like people, animals, vehicles, and household items. The dataset is designed to capture objects in realistic contexts, making it suitable for training and evaluating models that need to understand objects in complex scenes. In addition to object labels, the COCO dataset also includes pixel-level segmentation masks for object instances. In our experiment, we randomly selected 20 images in each category, to a total of 1600 images for model evaluation.

7.2 Diabetic Retinopathy Detection Challenge (Fundus) Dataset

The Diabetic Retinopathy Detection Challenge dataset is a collection of 88,702 images of the human fundus, which is the interior surface of the eye opposite the lens. These images are obtained through fundus photography, where a specialized camera captures detailed images of the retina, blood vessels, and other structures within the eye. These datasets include images from both healthy individuals and patients with specific eye conditions or diseases like diabetic retinopathy, macular degeneration, or glaucoma. In our experiment, we used a randomly selected 300-image subset for evaluating SAMAug.

7.3 ISIC (Skin) Dataset

We utilized the dataset published by the largest skin image analysis challenge in the world, hosted by the International Skin Imaging Collaboration in 2018 (ISIC 2018) . The dataset for the segmentation task includes a total of 2,594 training images, 100 validation images, and 1,000 test images. In our experiment, we used the 1000-image test set for evaluating SAMAug, and each image is accompanied by its corresponding ground truth mask for lesion delineation.

7.4 COVID QU-Ex (CXR) Dataset

COVID QU-Ex is the most extensive lung mask dataset with pixel-level annotations to detect, localize, and quantify COVID-19 infection from X-ray images. This dataset encompasses a total of 33,920 chest X-ray (CXR) images, including 1) 11,956 COVID-19 cases, 2) 11,263 cases of Non-COVID infections (Viral or Bacterial Pneumonia), and 3) 10,701 normal cases. Comprehensive and accurate lung segmentation masks are provided for the entirety of the dataset. We used the test set consisting of 583 chest X-ray images from the COVID-19 subset as our testing data. Our objective was to utilize the SAM to segment the lung regions within the images and subsequently compare them to the ground truth annotations associated with the images.

8 Implementation Details

The goal of this work is to perform visual point augmentation in a segmentation task. Model input consists of the initial point prompt and the original image. We adopt the Segmentation Anything Model (SAM) to obtain the initial mask. After obtaining the initial mask from SAM, we sampled additional point prompts using the methods described in the Method section. Specifically, we apply four different methods: random selection, maximum difference entropy, max distance method, and saliency-based. These methods allow us to augment the initial point prompt by selecting spatially or semantically related points as extra point prompts in the next iteration of segmentation. By incorporating the additional point prompts into the segmentation process, SAM will generate new segmentation results, incorporating the information from both the initial and augmented point prompts. The experiments were conducted on an A100 graphics card within the PyTorch environment. The COCO dataset (1600 images) took approximately 4 hours to complete, while the Fundus (300 images), Chest X-ray (583 images), and ISIC2018 (1000 images) datasets required approximately 20 minutes to finish.

Results

Table 1 presents an exhaustive comparison of the point prompt-based segmentation performance using SAM, with just one point prompt (Column "Initial"), or with augmented point prompts sampled via different strategies as described in Section 3.2-3.5. Columns "GT Random", "GT Max Entropy", and "GT Max Distance" show the SAM performance by adding the additional point prompt sampled from the ground-truth segmentation mask rather than the initial segmentation mask using different strategies. The performance of these three columns can be regarded as the upper bound of segmentation performance using SAM with two point prompts, as both point prompts are from the ground truth. The "Saliency" sampling strategy does not have its "GT" counterpart, as the saliency map only depends on the input image itself. From the table, it can be found that SAMAug improved the SAM performance on the COCO dataset by 0.01-0.05 as measured by Dice Score without any additional input from the human user. Such performance gain is not by chance, as SAM segmentation using two point prompts sampled from ground truth (listed in the last three columns) can achieve nearly 0.2 performance gain, demonstrating the importance of the additional point prompts. Also, on the COCO dataset, "Max Distance" sampling strategy will lead to the best result. More detailed segmentation performance for the sub-categories in the COCO dataset can be found in Appendix Table I.

For the Fundus dataset, SAMAug can improve the SAM performance by a similar 0.03-0.04 Dice Score, with the "Max Distance" sampling method once again being the best strategy (0.802). For this dataset, an additional point prompt from the ground truth mask has a lower impact than the COCO dataset (around 0.05-0.1 in Dice Score), possibly due to the relatively easier segmentation task involved (just the fundus disc).

For the COVID QU-Ex dataset, the base SAM model achieves a Dice score of 0.488. Compared to this score, SAM segmentation with augmented prompt will improve the performance by around 0.01. It is worth noting that because of the unique segmentation target (separate left and right lung lobes), almost all the methods will achieve a Dice Score of around 0.5, as only one lobe will likely be segmented by SAM.

For the ISIC2018 dataset, the segmentation result by using SAMAug also outperformed the base SAM model by 0.02-0.07. This time, "Saliency" achieved the best performance by a large margin, possibly because the boundary of the target lesion is very irregular, which makes it necessary to sample the point potentially outside the initial result.

More visualizations can be found in Figure 2. Rows one to three show the visualization results of our point prompt augmentation methods on Fundus, COVID QU-Ex, and ISIC2018 datasets. Rows four to seven show the visualization results of four subcategories of the COCO dataset. Each row in the Figure 2 represents the same example. The first column shows the ground-truth mask and the initial point prompt. The second column shows the segmentation result of SAM based on the initial point prompt. Columns three to six show the results of our point prompt augmentation methods (Random, Max Entropy, Max Distance, and Saliency).

2 Comparison of SAM performance on box prompt with and without augmentation

Table 2 shows the segmentation performance using SAM with box prompts as described in Section 3. Column two shows the SAM performance using the box prompt sampled within the GT mask (inner). Columns three to six show the performance using the corresponding augmentation approach. It can be observed that the values in the column ("Outer Box of GT mask") are all the highest, reaching 0.89 on the COCO dataset, 0.904 on the Fundus dataset, 0.744 on the COVID dataset and 0.883 on the ISIC2018 dataset. This result shows that using the outer bounding box (i.e., containing the target region) as a prompt is superior to using a point prompt. However, the prerequisite for using this box is the availability of the full ground-truth masks of the image. In contrast, using the box prompt derived from a point ("Inner Box") will lead to much inferior performance, indicating that SAM is assuming that the provided bounding box is the "Outer Box". We also attempted to generate a second, augmented bounding box prompt from the initial segmentation result, as it is infeasible and meaningless to augment the outer box. It can be found in the third column ("Augmented Inner Box from Initial Box Result") that doing so actually decreases model performance, once again due to the mechanism of how SAM deals with bounding box prompts. Adding the augmented outer box containing the initial result by the inner box prompt will slightly improve the segmentation performance. Yet the result is still much inferior to using point-based prompt augmentation strategies. On the other hand, adding the augmented outer box containing the point prompt-based segmentation result will lead to better performance compared with using the point prompt alone (Table 1, second column "Initial"), albeit still worse than an augmented point prompt (Table 1, fourth to sixth column). In summary, providing a bounding-box prompt will generally lead to better performance of SAM than providing a point-based prompt, although the process involves more interactive actions by the user. On the other hand, prompt augmentation by generating a bounding box containing the initial SAM segmentation result will not work well, even with a good initial result (e.g., segmentation by a point prompt). Detailed performance comparison of COCO sub-categories can be found in Appendix Table II.

3 Analysis of Running Examples of SAMAug

Figure 3 provides visual comparative results of SAMAug on three medical datasets. The first two rows belong to the Fundus dataset, the third and fourth rows to COVID QU-Ex, and the fifth and sixth rows to the ISIC dataset. The three columns in the figure correspond to "ground-truth mask," "Result of SAM based on one point," and "Result of SAMAug (SAM with one point prompt and one augmented point prompt)"

In the Fundus dataset, it is evident that SAM based on the initial point prompt often predicts only half of the ground truth. This is primarily due to the distinct edges of vessels, which can easily be misidentified as the boundaries of the segmentation area. However, the situation notably improved after incorporating the additional augmented point prompt.

For the COVID dataset, the task involves lung region segmentation. As the lung regions are separated into the left and right lobes, most of these segmentation results focus on just one lobe. However, in some cases, the SAM with augmented point prompt will segment both the left and right lung lobes, as demonstrated in the third row of Figure 3. This result demonstrates that SAM learns lung-related features. With the second point prompt at the edge of the lobe, it can then correctly segment both lobes.

Finally, on the ISIC2018 dataset (last row), it can be observed that the "Saliency" strategy can sample the augmented point prompt beyond the initial result and achieve better performance, which is also indicated by the performance comparison in Table 1. In such cases, SAMAug can effectively mitigate the challenge of complex lesion boundaries and uneven textures of the image, resulting in much-improved segmentation performance.

Discussion and Conclusion

In this work, we have developed and evaluated SAMAug, a visual point augmentation method designed for SAM. Through this research, we aim to contribute to the ongoing efforts of visual foundation models via a better understanding of the human user’s intentions. Based on observations from the experiment, we proposed the concept of invariance in prompts, indicating that while the human user will expect that different prompt selections will lead to similar segmentation results, such invariance needs to be explicitly modeled by augmentation, similar to the premise in traditional data augmentation methods. The improved SAM performance without additional user input, model training/fine-tuning, or adaptation to the data demonstrated the value of visual prompt augmentation for in-context learning-based methods such as SAM and the validity of our prompt invariance assumption. Further experiments on selecting prompts other than the top ones in each sampling strategy, as listed in Appendix Table IV, show that the performance of SAMAug is consistent regarding to the randomness in prompt selection. Overall, SAMAug enriches the human input provided to SAM, enabling a better understanding of the segmentation target by the SAM model and enhancing its performance.

During our experiments, we found that performance gains from prompt augmentation vary a lot across datasets, indicating the need to determine optimal augmentation approaches for different applications in a more systematic approach. Exploring the use of other metrics or creating hybrid approaches that combine the strengths of multiple techniques. It might also be beneficial to investigate adaptive point augmentation methods that can adjust the strategy based on the specific characteristics of each image or segmentation task. Moreover, the experiment results in Appendix Table III show that adding more than one point prompt using the current scheme will decrease segmentation accuracy. To implement an iterative method for refining the results via multiple rounds of augmentation, we will need to re-design the point prompt sampling strategy, e.g., providing negative samples or point prompts to a different region of interest.

One promising future direction of SAMAug is its integration with an active learning framework. The interactive nature of SAM makes it suitable for active learning, where we can train a prompt generation model for sampling the most informative point prompts instead of the current rule-based strategies. Furthermore, as SAM can perform segmentation without any user input, it is possible and interesting to investigate whether we can enhance its performance using the active learning-trained prompt sampling model in a fully automatic way.

The principles and techniques presented in SAMAug have the potential to be beneficial beyond this domain. Large pre-trained models have been successfully applied in various language tasks such as the naming entity recognition , relation extraction , question answering , text generation , and text classification . Domain-specific LLMs have been developed across various medical applications, including radiology, oncology, clinical trials as well . Thus, computer vision large pre-trained models can also be expanded to a wide range of tasks such as object detection, image classification, image synthesis, style transfer, etc., where visual prompt augmentation can be a critical component to these models.

In addition, an exciting direction for future work of prompt augmentation could be the field of multimodal learning, particularly with large multimodal models that use both image and text prompts . For instance, we could use SAMAug to provide augmented visual prompts while using techniques similar to AugGPT to augment text prompts. The combination of augmented image and text prompts could potentially provide rich information to the model, improving its performance in tasks such as image captioning, visual question answering, or even more complex tasks like multimodal storytelling. The synergistic interaction between visual and textual prompts in such multimodal models could be a fascinating area of exploration in the age of large generative AI models .

References

Appendix A Comparison on Point Prompt

The comparison of model performance with/without point prompts on subcategories of the COCO dataset is shown in Table I. In the "person" category, the base SAM model yields a Dice score of 0.4552. With the "Random" augmentation method, the performance improved to 0.4594, while Max Entropy achieved a more noticeable lift to 0.4677. The Max Distance method significantly boosts the Dice Score to 0.51, and the Saliency method further extends the improvement, achieving the highest score of 0.5535. Similar performance improvement trends can be observed across all other subcategories of the COCO dataset. For instance, in the "COCO" of Table I, the base SAM model’s Dice (Initial) score of 0.601 is exceeded by all our methods, with the Max Distance method achieving the highest score of 0.651.

Appendix B Comparison on Box Prompt

Table II shows the results using box prompt. Specifically, columns two to six show the results of box prompt. The top half of Table II shows the average comparison results on COCO, Fundus, ISIC2018, and Covid CXR datasets. The bottom half of Table II shows the results of subcategories in the COCO dataset.

Appendix C Experiments on Additional Point Prompts

As shown in Table III, the rows indicated by "3 points" in the "Points Number" column represent the SAMAug performance with two point prompts added to the initial point prompt. The selection of these two points followed the approach outlined in the main text. It can be observed that performing prompt augmentation will improve SAM’s initial results across all four datasets. Specifically, the Max Distance method achieves the highest scores of 0.6473 and 0.7895 on COCO and Fundus datasets. The Random method achieves the highest score of 0.4996 on the COVID QU-Ex dataset. The Saliency method achieves the highest score of 0.74 on the ISIC2018 dataset. However, it is worth noting that, except for the Initial and Saliency results on the ISIC2018 dataset, which slightly outperform the two-point prompt, all other three-point prompts show a slight decrease in performance. To further validate the negative impact of increasing the number of point prompts, we also experimented with four additional point prompts (in the rows indicated by "5 points") and observed a similar trend. In summary, the experimental results indicate that increasing the number of augmented point prompts will not improve the overall segmentation performance.

Appendix D Stability Study of the Point Prompt Selection on Model Performance

To further validate the performance and stability of the two-point prompt, we selected three candidate points (rather than one) as the augmented point prompt for the Max Entropy, Max Distance, and Saliency sampling. Specifically, for Max Entropy, we selected the top three points with the highest cross-entropy to the initial point prompt and conducted three segmentation experiments accordingly. Similarly, in the Max Distance method, we selected the top three points based on their distance to the initial point prompt. In the Saliency method, we randomly selected three points from the saliency mask. To expedite the experiment, we randomly selected a subset of samples from each dataset. In COCO, we randomly selected 20 images per category, and for the other three medical datasets, we randomly selected 300 images each for the experiment.

The results are presented in Table IV. In the second column of Table IV, 1stst, 2ndnd, and 3rdrd represent the segmentation performance using each point prompts. It can be observed that the segmentation results are very consistent across the three point prompts across all datasets for the Max Entropy and Max Distance sampling, indicating that the points sampled using the same strategy will lead to similar SAM performance. For the Saliency method, slight fluctuations can be observed in the three results as the points were randomly selected from the saliency mask.