|
|
"gt": "Ultrasound is a popular medical imaging modality used to image a large variety of organs and tissues. Ultrasound is often the preferred choice due to its non-radiative and non-invasive nature, relatively easy and fast imaging procedure, and lower costs. Automating the diagnosis or highlighting relevant areas in the image will contribute to faster workflows and potentially more consistent and accurate diagnoses. Artificial Intelligence (AI) has demonstrated remarkable success in automatic medical imaging analysis. Compared to classical methods, previous work based on convolutional neural networks on various medical imaging tasks, such as classification and segmentation, have shown state-of-the-art results [1, 2, 3, 4]. However, effective deep learning segmentation algorithms for medical images is an especially challenging task due to the scarcity of high-quality labeled images for supervision. Moreover, in medical imaging it is often the case that identification of findings regions, namely regions of potentially pathological visual anomalies, having neither a clear boundary nor a typical geometry or position is much more challenging than the identification of an anatomy in its context. Findings are also typically rare, which brings to light the challenge of training such models in limited data regimes. \u2217Corresponding author, e-mail: [email protected]. \u2020These authors have contributed equally to this work. 1Dept. of AI/ML Research, GE Healthcare, Haifa, Israel. 2Dept. of Clinical Applications, Point of Care Ultrasound & Handheld, Texas, USA. 3Dept. of Clinical Applications, Point of Care Ultrasound & Handheld, Wisconsin, USA. arXiv:2404.16325v1 [cs.CV] 25 Apr 2024 Semantic Segmentation Refiner for U/S Applications with Zero-Shot FMs COHEN H ET AL. Figure 1: A high-level illustration of our semantic segmentation refinement method with zero-shot foundation models. A pre-trained segmentation model predicts a semantic segmentation for each class of an input image. In this example, classes comprise anatomies and pathologies in an ultrasound image, and the coarse segmentor output depicts the predicted semantic segmentation of a pathology. A prompt selection model selects positive and negative points. Consequently, a zero-shot semantic segmentation mask of the pathology is predicted by a foundation segmentation model, prompted by the selected points for the input image. Positive prompt points are depicted in red, and negative prompt points are depicted in blue. The pathology semantic segmentation prediction is highlighted in red. For illustration purposes, the muscle is highlighted in purple, the tendon in yellow, and the bone in green. The freeze symbol indicates preventing gradients from being propagated to the model weights. Recently, new segmentation models have emerged. Trained on data at huge scales, these foundation models aim to be more generic rather than tailored to specific datasets. The Segment Anything Model (SAM) [5] is a foundational model demonstrating zero-shot generalization in segmenting natural images using a prompt-driven approach. The SonoSAM [6] foundational model adapts SAM to ultrasound images by fine-tuning the prompt and mask decoder [6]. Although fine-tuning methods often improve the results on target datasets [7] they essentially downgrade the generalization capabilities of the foundation model. Further, a significant domain gap between natural and medical images, ultrasound images in particular[8], hinders fine-tuning models trained on natural images to the task at hand [7]. In this work, we address the performance degradation of segmentation models in low-data regimes and derive a novel method for harnessing segmentation foundation models\u2019 ability to segment arbitrary regions. Our semantic segmentation refinement method comprises two stages: First, a coarse segmentation is predicted by a model trained on a small subset of the training data. In the second stage, our novel points generation from a coarse pathology segmentation algorithm is used to prompt a segmentation foundation model. Positive prompt points are selected using a partition around medoids method as the most representative pathology points. Negative prompt points are selected by a prompt selection optimization algorithm that identify the context anatomy. Importantly, we do not fine-tune the foundation model to our dataset, i.e., it produces a zero-shot segmentation. The end-to-end pipeline is illustrated in Fig. 1. The method\u2019s advantages are brought to light on varying degrees of low-data regimes experiments on a small-scale images dataset, yielding a larger performance gain compared to a state-of-the-art segmentation model [9] as the training set size decreases. Further, ablation studies validate the effectiveness of our semantic segmentation refinement model. Our approach applies to other ultrasound-based medical diagnostics tasks. The paper is organized as follows: Section 2 presents the semantic segmentation task and leading approaches. Our method is presented in Section 3, and the experimental setup is presented in Section 4. Section 5 presents the results and ablation studies on a discontinuity in tendon fiber (DITF) pathology finding task in a musculoskeletal ultrasound (MSK) dataset, and the conclusions are presented in Section 6.", |
|
|
"main_content": "2.1 Semantic Segmentation Models Semantic segmentation aims to assign a label or a class to each pixel in an image. Unlike image classification, which assigns a single label to the entire image, semantic segmentation provides a more detailed understanding of the visual scene by segmenting it into distinct regions corresponding to objects or classes. This is an essential technique for applications, such as autonomous vehicles, medical image analysis, and scene understanding in robotics. Like other computer vision tasks, deep learning has demonstrated state-of-the-art results in the semantic segmentation of medical images. The semantic segmentation problem can be formulated as follows: Given an image I \u2208RC\u00d7H\u00d7W , our goal is to train a deep neural network to predict the pixel-wise probability map SN\u00d7H\u00d7W of the classes in the dataset, where N is the number of classes in the dataset. 2 Semantic Segmentation Refiner for U/S Applications with Zero-Shot FMs COHEN H ET AL. DeepLabV3 [9] represents a distinctive approach in semantic image segmentation. Utilizing dilated convolutions, the model strategically enlarges the receptive field and manages the balance between global and local features through padding rates. Notably, the spatial pyramid pooling module proposed by the authors aggregates features from dilated convolutions at various scales, enhancing contextual information. Distinctive from encoder-decoder architectures such as the U-Net [10], it is built upon a robust pre-trained encoder, contributing to its success in generating accurate and detailed segmentation masks across diverse applications. Since DeepLabV3 remains a staple choice for a performant semantic segmentation model, we adopt it as our method\u2019s coarse segmentor. 2.2 Semantic Segmentation Foundation Models Foundation models are trained on broad data at a huge scale and are adaptable to a wide range of downstream tasks [11, 12, 13]. The Segment Anything Model (SAM) [5] emerged as a versatile foundation model for natural image segmentation. Trained on a dataset of over 11 million images and 1B masks, it demonstrates impressive zero-shot generalization in segmenting natural images using an interactive and prompt-driven approach. Prompt types include foreground/background points, bounding boxes, masks, and text prompts. However, SAM achieves subpar generalization on medical images due to substantial domain gaps between natural and medical images [14, 15, 16, 17, 18]. Moreover, SAM obtains the poorest results on ultrasound compared to other medical imaging modalities [15]. These results are attributed to the ultrasound characteristics, e.g., the scan cone, poor image quality, and unique speckled texture. A common methodology to overcome this generalization difficulty is to fine-tune a foundation model on a target dataset [19]. An efficient fine-tuning strategy is Low-Rank Adaptation (LoRA) [20], which has been adopted in fine-tuning SAM to relatively small medical imaging datasets [21, 22, 23]. SonoSAM [6] demonstrates state-of-the-art generalization in segmenting ultrasound images. Fine-tuned on a rich and diverse set of ultrasound image-mask pairs, it has emerged as a prompt-able foundational model for ultrasound image segmentation. Notably, adapting prompt-based models to medical image segmentation is difficult due to the conundrum of crafting high-quality prompts [15]. Manually selecting prompts is time-consuming and requires domain expertise. Methods of extracting prompts from ground-truth masks [23] cannot be applied during inference as they rely on full supervision. Auto-prompting techniques rely on the strong Vision Transformer (ViT-H) image encoder [24] semantic representation capabilities, and suggest generating a segmentation prompt based on SAM\u2019s image encoder embedding [18, 25]. Other strategies suggest replacing the mask decoder with a prediction head requiring no prompts [16]. Nevertheless, SAM\u2019s zero-shot prediction accuracy is typically lower than that of the segmentation models trained with fully supervised methods [26]. Motivated by the generalization abilities of segmentation foundation models, we devise a points selection algorithm from coarse segmentation masks that allows harnessing prompt-based models to ultrasound segmentation in a zero-shot setting. 3 Method In this section, we present our method for refining a coarse pathology segmentation mask with zero-shot foundation models. This method can be adapted to natural images, as well as to the medical imaging domain. Herein, we validate it based on a specific challenging task of segmenting a discontinuity of the tendon fiber finding (Sec. 4.1), which is the main ultrasound finding of a tendon partial tear pathology. Our key intuition is that although the performance of segmentation models decreases significantly in low-data regimes, even such coarse segmentation masks can be utilized for extracting high-quality prompts that harness segmentation foundation models\u2019 capabilities. Importantly, we use the publicly available pre-trained foundation models without further modification. The flexibility of our method allows for incorporating either SonoSAM or SAM. Though the above-mentioned foundation models allow several types of prompts, we focus on foreground (positive) and background (negative) prompt points. Our method makes use of the ground-truth tendon segmentation, denoted T gt. Since the tendon in the context of the DIFT pathology is usually easy to segment due to its typical geometry and position and relatively simple data acquisition and labeling, we assume that strong segmentation models exist for this task and that their output can be used in lieu of the ground-truth segmentation. With that, we introduce our two-stage method, summarized in Algorithm 1. First, a segmentation model [9] is trained on a random subset of the training data. A coarse semantic segmentation is then predicted for a given test image. Then, k positive and k negative prompt points are selected to prompt a segmentation foundation model. We next describe our prompt points selection algorithm in greater detail. 3 Semantic Segmentation Refiner for U/S Applications with Zero-Shot FMs COHEN H ET AL. Algorithm 1 The Semantic Segmentation Refiner Method Input: \u2022 Input image I \u2022 Ground-truth tendon mask T gt \u2022 Frozen SonoSAM model \u2022 Pre-trained segmentation model S Output: \u2022 Refined pathology segmentation mask O 1: Coarse segmentation mask \u02dc O \u2190S(I) 2: Positive points selection ptspos \u2190k-medoids( \u02dc O) 3: Modified ground-truth tendon mask T \u02dc gt \u2190T gt \\ \u02dc O 4: Initialize complementary problem 5: \u00af ptsneg \u2190ptspos, \u00af ptspos \u2190random from T \u02dc gt 6: for t in range(1, T) do 7: Optimize \u00af ptspos as parameters: 8: \u2113ce( \u00af pts, T \u02dc gt) = \u2212T \u02dc gt log (SonoSAM(I, \u00af pts)) 9: Update \u00af ptspos \u2190\u00af ptspos 10: end for 11: Flip: ptsneg \u2190\u00af ptspos 12: Output O \u2190SonoSAM(I, pts) 3.1 Positive Points Selection We aim to select points that are the most representative of the coarse pathology segmentation mask as the positive prompt points. This selection objective translates to the partitioning around the medoids method\u2019s approach. This approach is preferable compared to a selection based on a minimization of the sum of squared distance (i.e., the k-means) in the case of multiple pathology blobs since the latter might select centroids in between pathology blobs. Thus, k mass centers of the coarse pathology segmentation masks are selected as positive points using the kmedoids clustering algorithm [27]. To reduce the probability of selecting false positive points, a threshold is applied to the coarse pathology segmentation masks before selection. We denote the selected positive points as ptspos = {ptspos i }k i=1. This process is illustrated in Fig. 2. Figure 2: An illustration of our positive (foreground) points selection module, depicted in red. A threshold is applied to the coarse segmentation prediction. A kmedoids clustering algorithm is applied to select k positive pathology points. 3.2 Negative Points Refinement We take inspiration from hard negative selection literature [28, 29, 30], and aim to select the most informative negative points w.r.t. the foreground object. To that end, we formulate a complementary prompt points selection problem w.r.t. the background given the k selected foreground points (3.1), \u00af pts = { \u00af ptspos, \u00af ptsneg}. When the foreground is the pathology, the background is the context anatomy, herein the background is a tendon anatomy. The complementary prompt points selection is optimized to decrease the binary cross-entropy (BCE) loss between the foundation model\u2019s zero-shot tendon segmentation mask prompted on these points and a modified ground-truth tendon 4 Semantic Segmentation Refiner for U/S Applications with Zero-Shot FMs COHEN H ET AL. mask, denoted T \u02dc gt. To avoid predicting tendon points within foreground pathology, the values of the ground-truth tendon mask overlapping with the coarse pathology detection are modified to zero. As points initialization for this complementary problem, we flip the labels of ptspos such that they correspond to negative points, \u00af ptsneg \u2190ptspos. Further, k points are selected at random from T \u02dc gt, denoted \u00af ptspos. While freezing the foundation model, the point prompt optimization is performed for a maximum of 100 steps or until convergence. The optimization is performed such that the selected points are optimal w.r.t. the complementary problem of the tendon segmentation given the foreground pathology predicted by the coarse segmentor. Denote an input image as I, SonoSAM\u2019s zero-shot tendon segmentation given input I and its corresponding optimized prompt points \u00af pts as SonoSAM(I, \u00af pts). Then, the BCE loss of the complementary problem is: \u2113ce( \u00af pts, T \u02dc gt) = \u2212T \u02dc gt log (SonoSAM(I, \u00af pts)) . (1) We used the AdamW [31] optimizer, with learning rate of 4e\u22123, and standard betas to optimize the positive points \u00af ptspos. The optimized positive tendon points selected by this model serve as k negative prompt points, ptsneg \u2190\u00af ptspos, towards the foreground pathology segmentation. This process is illustrated in Fig. 3. Figure 3: An illustration of our negative (background) points selection module. In addition to the positive selected points (Sec. 3.1), negative points are selected randomly from the modified ground-truth tendon mask. The points are flipped to initialize the settings of the complementary tendon segmentation problem. Our points optimization model optimizes prompt points selection w.r.t. the complementary tendon zero-shot segmentation problem (Sec. 3.2). Finally, prompt points are again flipped to account for positive and negative prompt points towards the pathology segmentation. 4 Experiments 4.1 Dataset The data used for this study is ultrasound images of tendons around the shoulder joint. Specifically, we acquired images of the supraspinatus tendon, infraspinatus tendon, and subscapularis. The images are acquired from both the short-axis and the long-axis views. The main parameters of our data are summarized in Table 1. In this work, we aim to segment the partial tear pathology within the tendon, thus our data consists of images paired with the corresponding segmentation mask of anatomies and pathologies. Our data includes semantic labeling of the following classes: DITF, bone, tendon, and muscle. Table 2 summarizes the semantic labeling statistics. In total, our dataset includes 388 images from 124 subjects, 80% of which are used for training, and the remaining 20% are used for validation. The test set comprises 40 images. To prevent data leakage, the test set images are collected from subjects that do not appear in the train data. All images are resized to a constant resolution of 512x512 pixels. All data comply with the Institutional Review Board (IRB) data sharing agreement. 4.2 Evaluation Metric We use the Dice similarity coefficient [32] evaluation metric, commonly used in medical image segmentation research to measure the overlapping pixels between prediction and ground truth masks. The Dice similarity coefficient is defined as 2|A\u2229B| |A|+|B|, where A and B are the pixels of the prediction and the ground truth respectively. 4.3 A Segmentation Model In Low-Data Regimes In this experiment, we investigate the performance and properties of a state-of-the-art semantic segmentation model with a limited training set size of MSK ultrasound images. Our goal is two-fold: (i) to validate our conjecture that high-quality 5 Semantic Segmentation Refiner for U/S Applications with Zero-Shot FMs COHEN H ET AL. (a) 100% of train set. (b) 35% of train set. (c) 15% of train set. (d) 8% of train set. (e) 5% of train set. Figure 4: Positive pathology points retainment in increasingly coarse segmentation mask prediction and our method\u2019s results. Top row: Pathology segmentation mask predicted with a DeepLabV3 model trained on varying percent of the training set. Middle row: Positive points selected on binary pathology mask by our positive points selection module. Bottom row: An illustration of our method\u2019s pathology segmentation output, highlighted in red, compared to the ground-truth segmentation, highlighted in green. The tendon area is shown at the bottom left image for reference. Our method achieves for this test image a Dice similarity coefficient of 0.89, 0.71, 0.73, 0.72, 0.50 when the coarse segmentor is trained on 100%, 35%, 15%, 8%, 5% of the train set, respectively. Table 1: Summary of MSK pathology segmentation dataset main parameters. Parameters/Dataset MSK Ultrasound Images Total frames 388 Original frame size 1536 X 796 or 1044 X 646 pixels Subjects 90 (52.82% males, 47.18% females) Average BMI 24.69 \u00b1 8.92 Vendor GE Healthcare\u2122 Ultrasound system Logiq S8\u2122, Eagle\u2122, LogiqE10\u2122 Data collection Linear Collection Sites USA, Israel prompts can be extracted even from a coarse semantic segmentation prediction, and (ii) to measure the performance degradation in increasingly low-data regimes. These properties are the basis of our two-stage method for exploiting the advantages of a prompt-able foundation segmentation model. Concretely, for an input image I \u2208R512\u00d7512 the segmentation model prediction S \u2208R7\u00d7512\u00d7512 corresponds to a semantic segmentation for each class as detailed in Table 2. 4.4 Segmentation Refinement With Zero-Shot Foundation Models Positive Points Selection A combination of a constant and an adaptive threshold is applied to the coarse segmentation prediction prior to positive point selection. Denote by c0 the coarse segmentation mask prediction at the foreground channel (DITF in our case). 6 Semantic Segmentation Refiner for U/S Applications with Zero-Shot FMs COHEN H ET AL. Table 2: Semantic labeling statistics at the 512X512 patches level. M: Million. Class MSK Type Number of images (% of total) Total Area (pixels) Mean fraction out of total patch area Discontinuity in tendon fiber Pathology 179 (46.13%) 1.11M 1.09% Bone 288 (74.22%) 2.75M 2.7% Tendon Anatomy 388 (100%) 10.64M 10.46% Muscle 388 (100%) 28.13M 27.65% We apply a double thresholding mechanism to disregard the noise in the prediction. \u02dc c = c0 > tmin (2) c = \u02dc c > 0.4 \u2217max(\u02dc c) (3) The initial threshold screens predictions that lack sufficient global (cross-classes) certainty, when the minimum threshold is set to tmin = 0.15. The second thresholding term adaptively screens all predictions that lack sufficient local (classwise) certainty. Further, we set the k-medoids++ medoid initialization method [33] which selects more separated initial medoids than those selected by the other methods. The hyper-parameter k is adaptively set such that the sum of distances of samples to their closest cluster center (inertia) is minimized, k \u2208[4, 6]. Negative Points Refinement We deploy in our experiments the SonoSAM semantic segmentation foundation model since it is expected to better generalize to zero-shot segmentation of ultrasound images than SAM. Due to the randomness in the initialization of the complementary positive points \u00af ptspos selection problem, evaluation is performed over 10 random initialization. 4.5 Training Procedure Our coarse segmentor is DeepLabV3 [9], a state-of-the-art convolutional approach to handle objects in images of varying scales, with a ResNet-50 backbone [34]. As our complete dataset consists of only 275 training images, the model is pre-trained on the ImageNet dataset [35]. To evaluate our method across different data regimes we trained our coarse segmentor on varying n percentage of the training data, n \u2208[5, 8, 12, 20, 35, 60, 100], sub-sampled at random. The model is trained with equally weighted BCE loss and a Dice similarity coefficient loss between the predicted and ground-truth segmentation for each class. Each such experiment is trained for 100 epochs, where the weights of the maximal validation loss have been selected for testing. We used the robust AdamW [31] optimizer, with no learning rate scheduler and parameters of \u03b21 = 0.9, \u03b22 = 0.999 and learning rate of 4e\u22123. The test set remains constant across the different training experiments. The model training and evaluation code is implemented with the PyTorch [36] framework. 5 Results 5.1 Semantic Segmentation Model In Low-Data Regimes The results of this experiment validate our conjecture that positive pathology points are consistently selected in increasingly coarse segmentation mask predictions. As the segmentation model is trained on an increasingly smaller training set, the segmentation mask prediction becomes coarse: the pathology segmentation boundaries become less defined and its prediction probability decreases (Fig. 4, top row). Nevertheless, the positive pathology points selected by our method remain generally consistent (Fig. 4, middle row). Consistent with these results, we find that the average Dice similarity coefficient of the segmentation model decreases rapidly when the model is trained on increasingly smaller training set sizes (Fig. 5, \u2018Segmentation Model\u2019). These results validate our method\u2019s motivation and approach. 5.2 Semantic Segmentation Refinement With Zero-Shot Foundation Model Fig. 5 summarizes the results of our method in comparison with those of the baseline segmentation model in various training set sizes. Our method\u2019s average Dice is higher than the baseline\u2019s in every training set size. Moreover, 7 Semantic Segmentation Refiner for U/S Applications with Zero-Shot FMs COHEN H ET AL. our method\u2019s performance gain is larger as the training set size decreases (\u223c10% average Dice increase in 5% and 8% training set sizes), substantiating the advantage of our method in low-data regimes. Our method\u2019s pathology segmentation output in varying training set sizes compared to the ground-truth segmentation is illustrated in Fig. 4, bottom row. 100.0 60.0 35.0 20.0 15.0 12.0 8.0 5.0 Percent of the training set size (%) 0.20 0.25 0.30 0.35 0.40 0.45 Average Dice score Segmentation Model (DeepLabV3) Ours Figure 5: A summary of the average DITF Dice similarity coefficient of methods in various training set sizes. Depicted are the results of the baseline segmentation model[9] and our segmentation refinement with zero-shot SonoSAM foundation model. Error bars depict the standard deviation of our method\u2019s statistics. To analyze the stochasticity effect of our method\u2019s negative points random initialization (Sec. 3.2), we compare our method\u2019s DITF Dice score statistics over ten random initialization and the baseline segmentation model\u2019s average DITF Dice similarity coefficient. Results show that our method\u2019s performance is robust, exhibiting relatively low standard deviation in all train set sizes (Fig. 5). Additionally, our method\u2019s mean DITF Dice surpasses that of the baseline\u2019s in all but one train set size, and is higher by 4% on average than the baseline. 5.3 Ablation Studies In this section, we present ablation studies substantiating the effectiveness of our negative prompt points refinement (NPPR) model, as well as examining our method\u2019s performance when replacing the SonoSAM foundation model with SAM. 5.3.1 SAM vs. SonoSAM as a segmentation foundation model In this study, we investigate the impact of replacing SonoSAM with SAM as the zero-shot semantic segmentation foundation model in our method. Table 3 shows that harnessing SonoSAM\u2019s generalizability for MSK ultrasound images is preferable to SAM in low-data regimes and on par with SAM otherwise. 5.3.2 Random negative prompt points section In this experiment, we investigate the effectiveness of our negative prompt points refinement model by comparing it to a random negative prompt points selection algorithm. Concretely, k negative prompt points are randomly selected from the modified ground-truth tendon mask, T \u02dc gt. Our positive points selection approach remains unchanged. Results in Table 3 demonstrate that this naive selection algorithm achieves subpar average Dice scores across almost all train set sizes, especially in low-data regimes. These results establish the advantage of our negative points optimization algorithm. 6 Conclusions In this paper, we address the performance degradation of a state-of-the-art semantic segmentation model in low-data regimes. A novel prompt points selection algorithm optimized on a zero-shot segmentation foundation model was presented, as a means of refining a coarse pathology segmentation. Our method\u2019s advantages are brought to light in varying degrees of low-data regimes experiments, demonstrating a larger performance gain compared to the baseline segmentation model as the training set size decreases (Fig. 5). 8 Semantic Segmentation Refiner for U/S Applications with Zero-Shot FMs COHEN H ET AL. Table 3: Ablation studies: quantitative segmentation test results of the mean DITF Dice similarity coefficient (DSC) for different approaches over 10 run cycles. Our method is using zero-shot SonoSAM [6] foundation model. A higher DSC is better, with the best scores marked in bold. NPPR: Negative Prompt Points Refinement. Methods Percent of the training set 100% 60% 35% 20% 15% 12% 8% 5% Ours without NPPR 44.6% 40.0% 34.2% 27.8% 30.3% 27.5% 20.7% 16.6% Ours with SAM 45.5% 41.6% 39.7% 29.3% 32.9% 28.3% 27.6% 23.0% Ours 46.3% 39.3% 39.6% 31.9% 32.8% 31.8% 32.0% 24.6% Further, we validate our method\u2019s robustness to negative point initialization stochasticity and study the effectiveness of our prompt points refinement model (Section 5.3.2). Results demonstrate that the generalization of SonoSAM in extremely low data regimes is better than SAM\u2019s (Section 5.3.1). Our approach can be used for other ultrasound-based medical diagnostics tasks. An inherent limitation of our two-stage method is that its latency is higher than that of a core segmentation model." |