Abstract
Segmenting marine macroalgae from optical imagery typically requires pixel-level annotations that are costly and hard to scale. This work proposes a weakly supervised pipeline that derives segmentation masks from image-level classification labels alone, eliminating manual spatial annotations. The method has three stages: (1) training a six-layer convolutional classifier from scratch, without weight transfer, on 1818 images of three macroalgae genera (Fucus, Laminaria, and Ulva); (2) analyzing the gradients of the classifier’s output with respect to all intermediate convolutional layers to build spatial heatmaps of the most decision-relevant regions; and (3) extracting keypoints via non-maximum suppression and using them as prompts for Segment Anything Model 2 (SAM2). We compare two importance metrics—sensitivity (gradient only) and contribution (gradient times activation)—and show that the former distributes importance more evenly across layers, preserving the resolution of early layers and yielding more precise localizations. The classifier reaches 94.5% accuracy with under 15 min of training on conventional hardware. On 42 manually annotated validation images used exclusively for evaluation, the complete pipeline achieves a mean IoU of 0.44, Dice coefficient of 0.51, precision of 0.70, and recall of 0.54, while 80% of the extracted keypoints fall inside the annotated algae.
1. Introduction
1.1. Problem Statement
The spatial delineation of marine macroalgae genera such as Fucus, Laminaria, and Ulva from optical imagery is fundamental for assessing the health of littoral ecosystems and monitoring algal bloom events. However, semantic segmentation requires pixel-level annotations that are time-consuming, demand specialized personnel, and are difficult to scale. By contrast, image-level classification labels—where each image receives a single class label—require a substantially lower annotation effort.
The central question addressed in this work is whether it is possible to derive accurate spatial segmentations of macroalgae from image-level labels alone, without manual segmentation masks. This falls within the paradigm of weakly supervised segmentation [1], which seeks to extract spatial localization from supervision signals weaker than full masks. Specifically, we exploit the internal structure of convolutional neural networks (CNNs) trained for classification to identify the image regions most influential to the classifier’s decision, under the hypothesis that these regions should correspond to the areas where the algae are located.
A classifier trained with image-level supervision may, however, learn spurious correlations with background elements [2], and the identified regions may cover only the most discriminative zones rather than the entire organism. To address these limitations, this work proposes a pipeline that combines gradient analysis of intermediate convolutional layers with the generalist segmentation model Segment Anything Model 2 (SAM2) [3]: the points of maximum relevance extracted from the classifier serve as spatial prompts for SAM2, which produces the corresponding segmentation masks. The classifier is trained from scratch, without pretrained weights, on fewer than 2000 images and in under 15 min on conventional hardware, showing that the pipeline can be executed with modest data and computational resources.
1.2. State of the Art
The proposed method lies at the intersection of four lines of research: (i) weakly supervised segmentation based on class activation maps, (ii) deep learning for macroalgae detection, (iii) generalist segmentation models of the SAM family, and (iv) gradient-based attribution methods for CNN interpretability. Each is reviewed below.
1.2.1. Weakly Supervised Segmentation and Class Activation Maps
Weakly supervised semantic segmentation (WSSS) aims to obtain pixel-level segmentations using only supervision signals weaker than full masks, such as image-level labels, points, scribbles, or bounding boxes [1]. The most widespread approach exploits the observation that convolutional networks trained for classification implicitly retain spatial localization information in their intermediate layers.
Zhou et al. [4] introduced Class Activation Maps (CAMs), demonstrating that a CNN with Global Average Pooling can generate localization maps from image labels alone. Selvaraju et al. [5] generalized this with Grad-CAM, which employs the gradients flowing into the last convolutional layer as per-channel importance weights, enabling its application to any convolutional architecture. Subsequent variants include Grad-CAM++ [6], which uses higher-order derivatives for multi-instance localization, and Score-CAM [7], a gradient-free alternative based on input perturbations. Of particular relevance is LayerCAM [8], which extends activation map generation to any convolutional layer and integrates maps from different depth levels into a single high-quality map, constituting the most direct methodological precedent for the intermediate-layer gradient analysis employed in our pipeline.
1.2.2. Deep Learning for Macroalgae Detection and Classification
The application of deep learning to macroalgae identification from remote sensing imagery has grown substantially. Balado et al. [9] applied ResNet18, MobileNetV2, and Xception to pixel-level segmentation of five macroalgae species in intertidal zones, achieving 91.9% accuracy—one of the most direct precedents in the biological domain addressed here. In the UAV context, Martínez-Movilla et al. [10,11] developed and extended methodologies for macroalgae monitoring from drone imagery in northwestern Spain and published the first open dataset of high-resolution aerial images covering 33 intertidal macroalgae species from the northeastern Atlantic [12].
Satellite-based approaches include VGGUnet for Sargassum detection from multi-sensor data [13], AlgaeNet for Ulva prolifera detection combining optical and SAR imagery [14], Mask R-CNN for Macrocystis pyrifera mapping [15], and Pix2pix GAN for Sargassum segmentation [16]. At the intersection with interpretability, Ali et al. [17] combined CNN-based algae classification with Grad-CAMs to reveal which morphological features guide the classifier’s decisions.
Progress in other sensing modalities illustrates how deep learning has advanced detection tasks under supervision constraints comparable to those addressed here. In hyperspectral anomaly detection, where no annotation is available at all, Wang et al. [18] proposed a reconstruction network that embeds a sliding dual-window model into a blind-block architecture, so that the receptive field is forced to reconstruct each pixel from its surroundings and anomalies are separated from the background without labels; the same group later coupled non-local and local feature extraction in a self-supervised network that exploits the spatial self-similarity of hyperspectral scenes [19]. Working in the opposite direction, Zhang et al. [20] transferred supervision across modalities, learning object detection for hyperspectral imagery from annotated visible-range images. What these lines share with the present work is the strategy rather than the sensor: rather than demanding denser annotation, they relocate the supervisory signal—into the structure of the network, into the data itself, or into a modality where labels are already abundant. The pipeline proposed here applies that same principle to visible-range intertidal photography, moving supervision from the segmentation mask to the image-level label.
1.2.3. Segment Anything Model
Segment Anything Model (SAM) [21] is a generalist segmentation model comprising a ViT-based image encoder, a prompt encoder (accepting points, boxes, masks, or text), and a lightweight mask decoder. Trained on over one billion masks, SAM demonstrated remarkable zero-shot transfer to diverse segmentation tasks. Its successor, SAM 2 [3], extends the architecture to the temporal domain through a streaming memory transformer, achieving inference speeds six times faster with improved accuracy on static images.
SAM has been evaluated in remote sensing by Osco et al. [22] and adapted to marine ecology by Zheng et al. [23] for coral reef imagery. Chen et al. [24] proposed SAM2-Adapter for domain adaptation through lightweight modules, demonstrating that task-specific performance can be substantially improved without full fine-tuning.
1.2.4. Convolutional Network Interpretability and Gradient-Based Attribution
The gradient analysis employed in this work falls within the field of attribution methods for deep neural networks. Simonyan et al. [25] demonstrated that gradient-based saliency maps highlight regions relevant to classification, and subsequent methods such as Integrated Gradients [26] and SmoothGrad [27] have refined the quality of these attributions.
Crucially for the present method, research on internal CNN representations has shown that early layers detect textures and colors while deeper layers encode complete objects [28,29]. This underpins our choice to analyze intermediate layers, as the spatial information relevant for macroalgae localization may reside at different levels of the convolutional hierarchy. In the remote sensing domain, Kakogeorgiou and Karantzalos [30] concluded that Grad-CAM is among the most interpretable explainability methods, although Adebayo et al. [31] cautioned that certain attribution techniques may function as edge detectors rather than faithful model explanations.
1.2.5. Integration of Activation Maps and Generalist Segmentation Models
The convergence of gradient-based attribution methods with SAM-family models constitutes the line of research most directly related to the present work. Kweon and Yoon [32] proposed S2C, which extracts point prompts from class activation maps to generate class-specific masks with SAM, achieving state-of-the-art WSSS results and constituting the most direct precedent for our pipeline. Zhu et al. [33] developed WeakSAM with a similar strategy, surpassing the state of the art in weakly supervised object detection by 7.4% and instance segmentation by 8.5%. Other works have combined SAM with CAMs for class-label assignment [34] or with CLIP-generated maps in coarse-to-fine frameworks [35].
This paradigm has been validated in specialized domains: Wang et al. [36] proposed APSAM for landslide detection from CAM-derived prompts in remote sensing, and Ren et al. [37] developed an adaptive point selection module for tumor segmentation in digital pathology.
1.2.6. Positioning of the Present Work
The combination of class activation maps with SAM for weakly supervised segmentation has been explored by several groups in 2024–2025 [32,33,36,37]. Against that background, this work makes three contributions.
First, a methodological one: whereas existing CAM-plus-SAM pipelines derive their localization cues from the last convolutional layer alone, we compute gradient attributions across all intermediate layers and aggregate them into a single spatial heatmap, extending the multi-layer principle of Jiang et al. [8] to the generation of segmentation prompts. This lets the fine spatial resolution of the early layers and the semantic selectivity of the deep ones contribute jointly to the location of the prompt points.
Second, an empirical one: we show, over the full validation set, that the attribution metric governs the localization granularity of the resulting prompts. Discarding the activation factor and retaining the gradient magnitude alone shifts importance away from the coarse deep layers and toward the high-resolution early ones, yielding an attribution map approximately 38% finer in spatial granularity at identical computational cost, since both metrics come from the same backward pass.
Third, a practical one: the entire pipeline operates without pretrained weights, without segmentation annotations, and on fewer than 2000 images, with classifier training completed in under 15 min on conventional hardware. This places weakly supervised segmentation within reach of monitoring groups holding modest photographic corpora, and we demonstrate it on marine macroalgae in intertidal environments, a domain to which this class of pipeline has not previously been applied.
2. Materials and Methods
The proposed method is structured as a pipeline of three sequential stages (Figure 1): (1) training a convolutional classifier on macroalgae images labeled at the image level, (2) analyzing the intermediate representations of the classifier through gradient backpropagation to identify the spatial regions most relevant to the decision, and (3) using these regions as point prompts for a generalist segmentation model (SAM2) that produces the final segmentation mask. Each of these stages is described in detail below.
Figure 1.
Overview of the weakly supervised segmentation pipeline. Supervision enters only as an image-level class label (green); no segmentation mask is used at any stage. The classifier is trained from scratch, and gradient attribution is computed at all six intermediate convolutional layers under the sensitivity metric, yielding the aggregated spatial heatmap of Equation (5). Non-maximum suppression over the smoothed heatmap returns at most five keypoints, which are passed to SAM 2 as positive point prompts; SAM 2 itself is frozen and receives no task-specific training. The lower strip shows the actual output of each stage for a single specimen: the input as resampled to 224 × 224, the aggregated heatmap, the extracted keypoint overlaid on the image, and the resulting mask. In this example a single keypoint clears the acceptance threshold; scenes with several specimens yield up to five.
2.1. Dataset
The dataset employed comprises 1818 photographic images of macroalgae belonging to three genera: Fucus, Laminaria, and Ulva. The per-class distribution is as follows: 728 images of Fucus (40.0%), 297 of Laminaria (16.3%), and 793 of Ulva (43.6%). Each image contains a single type of alga, without mixing of genera, thereby allowing the assignment of an unambiguous image-level classification label. The images were acquired at various coastal locations by human operators using handheld consumer mobile-device cameras. They are conventional three-channel 8-bit sRGB images.
The dataset is not an open-access corpus and was assembled specifically for this study. Initial genus labels were assigned by nine contributors and subsequently reviewed by three graduates in Marine Sciences from the Universidad de Vigo.
The dataset exhibits variability in illumination, scale, orientation, viewing angle, and substrate type. The dataset is split into training and validation partitions using a stratified split that preserves the class proportions, yielding 1454 training images and 364 validation images (approximately 80/20). It exhibits a moderate class imbalance, with Laminaria being the least represented class. To compensate for this imbalance, inverse-frequency weighted sampling is applied during training: each sample is assigned a sampling weight inversely proportional to the size of its class, so that, in expectation, every class contributes equally to each mini-batch regardless of its original frequency. The validation partition is not subjected to any resampling, so that model evaluation reflects the true class distribution.
Before training, all images were resized to 512 × 512 pixels using Lanczos interpolation, without preserving their original aspect ratio. At training time, they were resized to 224 × 224 pixels, scaled to [0, 1] without channel-wise normalization, and augmented using random horizontal and vertical flips, rotations within ±15°, colour jitter, and translations of up to 5%. Validation images underwent only resizing and scaling.
2.2. Convolutional Classifier Architecture
A convolutional neural network (CNN) is chosen as the base architecture because it preserves the spatial structure of the image throughout its intermediate layers. Unlike fully connected or transformer-based architectures, CNNs process the image through local filters that maintain the spatial neighborhood relationship between pixels: each neuron in an intermediate layer possesses a receptive field corresponding to a localized region of the input image, enabling a direct correspondence between internal activations and spatial positions.
Formally, let be an input image, and let be the feature map produced by the -th convolutional layer. Each element encodes the response of the -th filter at spatial position , and this position can be deterministically back-projected to a region in the original image space.
The architecture (Figure 2) comprises six sequential convolutional layers, each with stride 2, Batch Normalization, and Leaky ReLU activation (). The channel progression is , while the spatial resolution is halved at each layer, from down to . A global max pooling reduces each feature map to a 256-dimensional vector, followed by dropout () and a linear layer projecting to the three-class output space. Although the classification head collapses spatial information, the intermediate convolutional layers retain spatial structure at different resolution levels, which is exploited in the subsequent gradient analysis stage.
Figure 2.
Architecture of the convolutional classifier and attribution path. The input RGB image (224 × 224 × 3) passes through six convolutional layers (Conv with stride 2 + Batch Normalization + Leaky ReLU, alpha = 0.2); block height is proportional to spatial resolution and colour deepens with depth. Below each block, in red, is the back-projection block: the side, in input pixels, of the image region covered by a single neuron of that layer, which grows from 2 × 2 in conv1 to 56 × 56 in conv6. This quantity is what makes the two attribution metrics differ in localization granularity. A global max-pooling layer collapses the final feature map to a 256-dimensional vector, followed by dropout (p = 0.3) and a fully connected layer producing the three-class output. The dashed red arrows denote the gradient-based attribution path, computed at all six intermediate convolutional layers rather than at the last one alone.
The model is trained by minimizing cross-entropy loss with the Adam optimizer, gradient clipping, and early stopping based on validation loss.
A deliberate design decision is the use of a model trained entirely from scratch, without transferring weights from any pretraining corpus. Although transfer learning typically accelerates convergence, it introduces a confound for the interpretability analysis: the gradient signals would partially reflect representations learned from unrelated imagery. By training exclusively on the target dataset, we ensure that all gradient-derived importance maps are a direct product of the macroalgae classification task.
2.3. Gradient-Based Importance Analysis
Once the classifier has been trained, the next step consists of identifying which spatial regions of an input image are determinant for the model’s decision. To this end, we analyze the gradients of the classifier’s output with respect to the activations of the intermediate convolutional layers, a technique with solid foundations in the neural network interpretability literature [5,25].
2.3.1. Theoretical Foundation
Let denote the logit (pre-softmax output) corresponding to the predicted class . For a convolutional layer with activation map , the importance of each neuron can be defined through two alternative metrics.
The first, termed sensitivity importance, relies solely on the gradient magnitude:
This metric quantifies the sensitivity of the prediction to variations in the activation at position , reflecting the potential influence of each neuron regardless of whether it is currently activated. It constitutes the most direct form of gradient analysis, connected to the saliency maps of Simonyan et al. [25].
The second, termed contribution importance, incorporates the activation value as a multiplicative factor:
This product constitutes a first-order Taylor approximation of each neuron’s effective contribution to the output, consistent with the Grad-CAM approach [5]. It reflects the actual influence of each neuron for a given image.
The two metrics differ substantially in how they distribute importance across the convolutional hierarchy. Since activations in deeper layers tend to be of greater magnitude, the contribution metric assigns disproportionate importance to the deep, low-resolution layers. The sensitivity metric, by contrast, evaluates each neuron without bias toward cumulative activation magnitude, distributing importance more evenly across layers and allowing the high-resolution early layers to contribute significantly to the final heatmap. The empirical comparison and the justification of the final choice are presented in Section 3.2.
In what follows, the generic notation refers to the selected importance metric. It is important to note that these values are image-dependent: the gradients are computed for each specific input image, and the relevant regions vary depending on the position, scale, and morphology of the alga present.
2.3.2. Channel-Level and Layer-Level Importance
From the individual neuron importance, aggregate metrics are defined that allow evaluation of the relative contribution of each channel and each layer to the classifier’s decision.
The importance of a channel in layer is obtained by averaging over all spatial positions:
Analogously, the importance of a layer is computed as the mean of the importances of all its channels:
These metrics enable the establishment of an importance hierarchy both among channels within a given layer and among the different layers of the network. In particular, they allow analysis of how the contribution of layers varies according to their depth.
2.3.3. Spatial Heatmap Construction
To obtain a spatial relevance map, the neuron importances from each layer are projected onto the original image resolution. Let denote the rectangular image block onto which neuron of layer is back-projected; because every convolutional layer has stride 2 and no intermediate pooling, this block has size pixels and the blocks of a given layer tile the image without overlap (equivalent to a nearest-neighbor up-sampling of the layer’s importance map). The aggregate heatmap is constructed as
where is the indicator function, equal to when the pixel falls within the back-projection block of neuron in layer and otherwise. Since this block mapping is fixed by the stride, the correspondence between each neuron position and the image region it covers is directly computable. This procedure is applied across all convolutional layers simultaneously, integrating information from multiple levels of abstraction: the early layers contribute fine spatial localization, while the deeper layers contribute semantic relevance.
2.3.4. Keypoint Extraction
From the heatmap M, at most N = 5 points are extracted. The heatmap is first smoothed on the 224 × 224 grid using an isotropic Gaussian filter with σ = 3.0 px and a truncation radius of 4σ, corresponding to an effective kernel size of 25 × 25 px. Non-Maximum Suppression then selects each maximum and suppresses a circular neighbourhood of radius r = 50 px; extraction stops when the next maximum is below τ = 0.8 times the global maximum. The selected points are finally rescaled to the original image coordinates and supplied to SAM2.
2.4. Segmentation via SAM2
The keypoints extracted in the previous stage are used as input prompts for Segment Anything Model 2 (SAM2) [3], a generalist segmentation model trained on a massive image corpus that enables the segmentation of arbitrary objects from point prompts, bounding boxes, or partial masks. Specifically, the SAM 2.1 Base variant (sam2.1_b checkpoint) is employed, which offers a favorable balance between segmentation accuracy and computational efficiency, consistent with the design criterion of the present work of maintaining the entire pipeline executable on conventional hardware.
Segmentation was performed using the Ultralytics implementation (version 8.4.56) without fine-tuning. Each keypoint was supplied separately as a positive prompt, and the resulting masks were combined by pixel-wise union. Mask logits were binarized at 0, equivalent to a foreground probability of 0.5, and the mask-confidence threshold was set to 0. SAM2 applies no separate score threshold to input points in this mode; weak points were filtered upstream using τ = 0.8.
The choice of SAM2 as the final segmentation model is motivated by several criteria. First, SAM2 requires no training or fine-tuning specific to the macroalgae domain, thereby eliminating the need for annotated segmentation masks. Second, its ability to segment from point prompts aligns naturally with the output of the previous stage, where the classifier’s maximum importance points indicate the regions where algae are located. Third, the combination of a domain-specific classifier with a generalist segmenter allows leveraging the strengths of both approaches: the discriminative precision of the former and the spatial delineation capability of the latter.
The complete pipeline therefore operates as follows: given a new image, (1) the classifier determines the algae class present, (2) gradients are computed to construct the heatmap and extract keypoints, and (3) SAM2 receives these points as positive prompts and generates the corresponding segmentation mask. The entire process is fully automatic once the classifier has been trained and requires no manual intervention beyond the image-level labeling used for initial training.
2.5. Analysis of Layer Contribution by Depth
A relevant aspect of the proposed method is the possibility of analyzing how the contribution of different convolutional layers to the spatial heatmap varies as a function of their depth within the network.
The early layers of a CNN operate on high spatial resolution representations and capture low-level features (edges, textures, color gradients) [28,29]. These layers tend to produce importance maps that align more precisely with the contours of the object of interest, providing finer spatial localization.
Conversely, the deeper layers operate on representations of low spatial resolution but high semantic content. These layers are critical for the classification decision, as they encode the most abstract and discriminative features among classes; however, their importance maps, when back-projected onto the original image, yield broader and more diffuse activation regions, which hinders precise delineation of the organism.
This observation has direct implications for the method’s design: the integration of information from multiple depth levels enables combining the spatial precision of early layers with the semantic relevance of deeper layers, producing a more balanced and representative heatmap.
3. Results
3.1. Classifier Training
Prior to the gradient-based localization analysis, a convolutional classifier was trained on the macroalgae dataset with the objective of learning sufficiently discriminative representations to distinguish the three genera under study. All experiments employ the training/validation split described in Section 2.1 (80% and 20% of the dataset, respectively).
During the architecture selection phase, three variants of the six-layer convolutional backbone described in Section 2.2 were considered, differing solely in their final spatial aggregation strategy: (i) a variant with global Adaptive Average Pooling, (ii) a variant with global Adaptive Max Pooling, and (iii) a variant without any global pooling, in which the last feature maps are flattened prior to the linear classification head. The no-pooling variant preserves the full spatial extent of the last layer’s activations, but as a consequence makes the prediction sensitive to the exact position of the discriminative regions within the image. By contrast, pooling-based variants aggregate information across the entire spatial domain, yielding a position-invariant descriptor that is more robust when organisms may appear at arbitrary locations and scales. The Adaptive Max Pooling variant was adopted, retaining the maximum activation value within each output channel of the last convolutional layer rather than its spatial average; this mechanism emphasizes the most prominent activations, which can be advantageous for macroalgae images where the most discriminative texture regions may occupy only a portion of the feature map.
Training was conducted with online data augmentation. The best model achieved a validation accuracy of 94.5% on the held-out validation set (344 out of 364 samples correctly classified). This figure is considered satisfactory given the limited size of the dataset and the absence of any pretrained initialization: the model has learned exclusively from the 1818 macroalgae images comprising the corpus, without any prior exposure to external image collections. The result demonstrates that the convolutional backbone, trained from scratch under purely image-level supervision, is capable of acquiring sufficiently discriminative internal representations to correctly identify the genus present in the vast majority of validation images.
Table 1 presents the confusion matrix of the retained model. Fucus and Ulva achieve precisions of 97.2% and 96.2%, with recalls of 95.9% and 94.3%, respectively. Laminaria, the least represented genus, obtains 91.5% recall and 84.4% precision.
Table 1.
Confusion matrix of the convolutional classifier on the validation set (364 samples). Rows correspond to the true label and columns to the predicted label. The last column reports per-class recall and the last row reports per-class precision. Diagonal entries, corresponding to correct classifications, are shown in bold.
Figure 3 shows the convergence of the classifier. Training stopped after 43 epochs using early stopping with a patience of ten epochs, retaining the checkpoint with the lowest validation loss at epoch 33. Training and validation loss decreased without sustained divergence before model selection. Validation accuracy was slightly higher because data augmentation and dropout were active during training but disabled during validation.
Figure 3.
Convergence of the classifier over 43 training epochs: (a) cross-entropy loss and (b) classification accuracy for the training and validation partitions. The dashed line marks epoch 33, selected according to the minimum validation loss.
This classifier constitutes the foundation for the subsequent stage of the pipeline. The intermediate convolutional layers of the trained network encode spatial representations whose gradients, with respect to the classification output, serve as the basis for identifying the image regions where macroalgae are located, as described in Section 2.3.
3.2. Analysis of the Intermediate Convolutional Layers
With the classifier trained, the distribution of importance across the intermediate convolutional layers of the network was analyzed, with the objective of determining which importance metric—sensitivity () or contribution (), as defined in Section 2.3.1—is more suitable for the construction of the spatial heatmaps that feed the segmentation stage.
3.2.1. Sensitivity Importance (Gradient Only)
Figure 4 shows the per-layer decomposed heatmap for a representative image, using the sensitivity metric , which relies exclusively on the gradient magnitude without multiplication by the activation value. It is observed that all convolutional layers consistently identify the same spatial regions of the image, corresponding to the areas where the macroalga is located, indicating a notable coherence across the different levels of abstraction in the network.
Figure 4.
Per-layer decomposition of the spatial heatmap using the sensitivity metric (gradient only) for a representative image. Each panel shows the importance map of a single convolutional layer, from the first (highest spatial resolution) to the sixth (lowest spatial resolution).
A particularly relevant aspect is that the early layers, which operate on feature maps of high spatial resolution ( in the first layer), produce importance maps with a significantly finer spatial granularity than the deep layers ( in the sixth layer). This resolution difference translates into a more precise delineation of the organism’s contours in the early layers, as opposed to the broader and more diffuse activation regions of the deeper layers.
The aggregated per-layer importance distribution (Figure 5) reveals that, under the sensitivity metric, the early layers retain a significant proportion of the total importance. This balanced distribution is advantageous for the localization task, as it allows the high-resolution layers to contribute effectively to the final heatmap, which is especially relevant when organisms exhibit variable sizes and morphologies within the image.
Figure 5.
Distribution of aggregated importance across the six convolutional layers under the sensitivity metric. The early layers retain a significant share of the total importance.
3.2.2. Contribution Importance (Gradient × Activation)
When the contribution metric is employed, which weights the gradient by the activation value—the gradient-weighted-activation principle that underlies Grad-CAM [5]—the distribution of importance across layers changes drastically (Figure 6 and Figure 7). The deep layers concentrate nearly all of the importance, dominating the resulting heatmap. This behavior is expected from a theoretical standpoint: by multiplying the gradient with the activation, the deep layers—whose activation values are of greater magnitude due to the accumulation of successive transformations throughout the network—receive a disproportionately elevated weighting relative to the early layers.
Figure 6.
Per-layer decomposition of the spatial heatmap using the contribution metric (gradient × activation) for the same representative image. The deep layers dominate the heatmap.
Figure 7.
Distribution of aggregated importance across the six convolutional layers under the contribution metric. Importance is heavily concentrated in the deeper layers.
Although this metric captures more faithfully the effective contribution of each neuron to the classifier’s decision, the dominance of the deep layers introduces an inherent risk for the spatial localization task: the last convolutional layers operate on representations of very low resolution ( pixels), meaning that each neuron covers a region of pixels in the original image. When the heatmap is dominated by these layers, the resulting localization is necessarily coarse and does not permit precise delineation of the organism’s contours.
3.2.3. Quantitative Comparison Across the Validation Set
To move beyond the single-image illustration of Figure 6 and Figure 7 and to compare our gradient-only formulation against the standard Grad-CAM-style attribution on equal footing, the per-layer importance distribution was computed for both metrics over the entire validation set (364 images, the same split that yields the 94.5% classifier of Section 3.1). For each image, the layer importance defined in Section 2.3.2 was normalized into a distribution ; the two metrics are obtained from a single shared forward–backward pass and differ only in the multiplication by the activation value. Table 2 reports the mean per-layer share over the 364 images; the distribution is highly stable, with per-layer standard deviations below 4 percentage points.
Table 2.
Mean per-layer share of attribution importance over the 364 validation images, together with the corresponding back-projection block size.
Table 2 shows that the contribution metric concentrates 66.4 ± 4.4% of its importance in the low-resolution layers, whereas the sensitivity metric retains 47.8 ± 4.5% in the high-resolution layers. Consequently, their importance-weighted block sizes are 33.8 ± 1.9 px and 20.9 ± 1.9 px, respectively, making the sensitivity map approximately 38% finer. This value describes spatial granularity rather than localization accuracy; actual localization is evaluated against manual annotations in Section 3.4, where 80% of keypoints fall inside the annotated algae with a mean positioning error of 14 px.
Crucially, this gain in localization granularity carries no computational penalty: both metrics are derived from the same single backward pass, so the attribution step costs the same regardless of the choice—approximately 6 ms per image on a laptop-class GPU. This is consistent with the central design goal of the pipeline, namely accurate weakly supervised localization at negligible cost: the entire per-image attribution adds only milliseconds on top of a classifier that trains from scratch in under 15 min.
3.2.4. Choice of Importance Metric
In light of the foregoing results, the present work adopts the sensitivity metric (gradient only) as the method for constructing the spatial heatmaps. The fundamental reason is that this metric distributes importance more evenly across the layers of the network, allowing the early layers—which possess the highest spatial resolution—to contribute substantially to the final heatmap. In a domain such as macroalgae, where organisms exhibit irregular morphologies and variable sizes, the fine localization capability afforded by the high-resolution layers is decisive for the quality of the point prompts supplied to SAM2.
Conversely, the contribution metric, despite being theoretically more rigorous as an estimate of the actual influence of each neuron, produces heatmaps dominated by the low-resolution deep layers, which compromises the spatial precision of the extracted keypoints. In practice, this loss of resolution translates into less precise prompts that may indicate regions adjacent to the organism rather than its interior, thereby reducing the quality of the segmentations produced by SAM2.
3.3. Qualitative Segmentation Results Using SAM2
Once the heatmaps were constructed using the sensitivity metric and keypoints were extracted through the non-maximum suppression algorithm described in Section 2.3.4, these points were supplied as positive prompts to SAM2 to obtain the final segmentation. The qualitative results of this stage on representative images from the dataset are presented below.
3.3.1. Cases with a Concentrated Region of Interest
Figure 8 illustrates two images in which the spatial importance is concentrated in a well-defined region, such that the keypoint extraction algorithm selects a single prompt per image. In both cases, the zone of maximum activation in the heatmap coincides precisely with the location of the macroalga, confirming that the classifier has learned to focus its attention on the organism rather than on contextual elements.
Figure 8.
Extracted keypoints overlaid on two representative images with concentrated regions of interest. A single point is selected per image, corresponding to the zone of maximum activation in the heatmap.
When these points are provided as prompts to SAM2, the segmentation model generates masks that delineate the macroalgae contours with notable precision, including morphological irregularities and complex edges. Figure 9 shows the resulting segmentations. Despite the fact that the only localization information provided to SAM2 is a single point per image, the obtained masks cover virtually the entirety of the organism, evidencing the synergy between the classifier’s localization capability and SAM2’s delineation capability.
Figure 9.
Segmentation masks produced by SAM2 using the keypoints shown in Figure 8. Despite receiving only a single point prompt per image, the masks accurately delineate the macroalgae contours.
3.3.2. Case with Multiple Regions of Interest
To illustrate the pipeline’s behavior in more complex scenarios, Figure 10 presents a case in which the image contains multiple macroalgae specimens spatially separated. In this situation, the heatmap exhibits several high-activation regions distributed across the image, and the non-maximum suppression algorithm extracts three keypoints, each corresponding to a distinct cluster of macroalgae.
Figure 10.
Extracted keypoints for an image containing multiple spatially separated macroalgae specimens. Three points are selected by the non-maximum suppression algorithm, each corresponding to a distinct cluster.
Figure 11 shows the segmentation produced by SAM2 from these three prompts. The model generates two segmentation masks that cover the main regions of the image where macroalgae are concentrated. However, smaller specimens located in the upper area of the image are not segmented, highlighting an inherent limitation of the proposed approach: the quality of the segmentation depends directly on the precision and completeness of the keypoints extracted from the heatmap. When the heatmap, due to its inherently smooth nature and the finite resolution of the convolutional layers, does not generate distinct local maxima for small or peripheral specimens, these are excluded from the prompt set and, consequently, are not segmented by SAM2.
Figure 11.
Segmentation masks produced by SAM2 from the three keypoints shown in Figure 10. Two masks cover the main macroalgae regions; smaller peripheral specimens remain unsegmented.
This limitation is consistent with the constraints inherent to the weakly supervised segmentation paradigm: the classifier, trained on a moderately sized dataset (1818 images), may not capture with sufficient resolution the totality of patterns present in complex scenes with multiple instances. Nevertheless, the pipeline’s ability to correctly segment the main regions of the image, without any segmentation annotations and with a classifier trained entirely from scratch, constitutes a significant result that validates the proposed approach.
3.4. Segmentation Accuracy Against Manual Ground Truth
To evaluate segmentation quality, 42 validation images were manually annotated at pixel level. These reference masks were produced independently of SAM2 and were used exclusively for evaluation, without introducing pixel-level supervision during training. Against these masks, the complete pipeline achieved a mean IoU of 0.44, Dice coefficient of 0.51, precision of 0.70, and recall of 0.54. Regarding localization, 80% of the extracted keypoints fell inside the annotated algae, with a mean distance of 14 px to the nearest annotated algal pixel.
3.5. Ablation and Comparison of Attribution Methods
To evaluate the prompt-generation strategy and compare the proposed attribution map with published alternatives, each configuration was run through the complete pipeline and evaluated by IoU against the same 42 manually annotated images. In the ablation, one factor was varied at a time and no parameter was retuned using these annotations.
Table 3 shows that N = 3, 5, and 10 produce the same mean IoU because the relative threshold, rather than the maximum allowed number, determines the number of prompts in most images; restricting N to 1 reduces IoU to 0.40. The NMS radius has the largest effect, ranging from 0.41 to 0.52, while restricting the map to deep layers reduces IoU to 0.36. Although r = 12 and the early-layer configuration outperform the reported setting, they were not adopted because they were identified using the evaluation set; changing the method accordingly would constitute test-set tuning. Paired Wilcoxon tests found significant differences for r = 12 (p = 0.006), r = 100 (p = 0.017), N = 1 (p = 0.008), and τ = 0.9 (p = 0.041); the remaining differences are treated as measured trends.
Table 3.
Ablation of the prompt-generation stage. The reported configuration is shown in bold.
Table 4 presents the controlled comparison of the different attribution maps, while keeping the keypoint extraction and SAM2 stages fixed.
Table 4.
Mean IoU against manual ground truth when varying only the attribution map while keeping the keypoint extraction and SAM2 stages fixed.
The proposed map obtains a mean IoU 0.09 higher than Grad-CAM and 0.07 higher than single-layer sensitivity, although neither difference is statistically significant on the 42 paired images (p = 0.291 and p = 0.573, respectively). The proposed map exceeds LayerCAM by only 0.01 IoU; this marginal difference is treated as comparable performance, and no superiority is claimed. The proposed formulation is retained because it requires only gradients, avoids storing forward activations, and is consistent with the layer analysis in Section 3.2. Direct numerical comparison with complete published WSSS pipelines is not appropriate because no common pixel-annotated macroalgae benchmark is available; the controlled comparison instead keeps the classifier, prompts, SAM2, and images fixed.
4. Discussion
4.1. Methodological Implications
Using intermediate layers rather than the final convolutional layer alone balances semantic specificity and spatial resolution. Grad-CAM [5] is conventionally applied to the deepest layer, which in this network has a 4 × 4 resolution and back-projects each unit onto a 56 × 56 pixel input block. Earlier layers provide blocks as small as 2 × 2 pixels but are less semantically selective. Aggregating gradients across depths combines their spatial detail with the class specificity of deeper representations, while the class-logit gradient keeps the attribution class-conditional. This rationale is shared with multi-layer approaches such as LayerCAM [8].
The two attribution metrics answer different questions. The contribution metric measures the influence actually expressed by an active unit, producing a semantically anchored map, but activation magnitudes introduce a bias toward deeper, lower-resolution layers. The sensitivity metric |g| avoids this activation-scale dependence and preserves more high-resolution information, although it may assign importance to inactive units and produce noisier responses. Channel and layer aggregation, Gaussian smoothing, and using the map only to place point prompts reduce this limitation. In the controlled evaluation, the proposed map reaches 0.44 IoU, compared with 0.35 for Grad-CAM and 0.43 for LayerCAM. The difference from Grad-CAM is treated as a measured trend rather than an established advantage, while LayerCAM is regarded as comparable.
It has been shown that convolutional neural networks, owing to the preservation of spatial structure in their intermediate representations, constitute a suitable tool not only for image classification but also for the implicit localization of objects of interest. The comparison between two importance metrics—sensitivity (gradient magnitude) and contribution (gradient times activation)—has revealed that the sensitivity metric is more suitable for the construction of spatial heatmaps, as it distributes importance in a balanced manner across layers of different depths and avoids the bias toward deep layers of lower spatial resolution. Measured over the full validation set, the gradient-only metric retains 47.8 ± 4.5% of the importance in the high-resolution early layers, compared with 24.4 ± 3.8% for the contribution metric, yielding an importance-weighted spatial granularity approximately 38% finer (20.9 ± 1.9 px versus 33.8 ± 1.9 px) at no additional computational cost. The contribution metric, despite being theoretically more rigorous as an estimate of the actual influence of each neuron, concentrates importance in the last convolutional layers due to the accumulation of activations, which compromises localization precision. The resulting heatmaps, combined with a non-maximum suppression algorithm, generate keypoints that are employed as prompts for SAM2, closing the loop between classification and segmentation.
Furthermore, it has been shown that early convolutional layers provide more precise spatial localization of regions of interest, while deeper layers, despite being more determinant for classification, produce more diffuse activation maps that hinder spatial delineation. The integration of information from multiple depth levels is therefore essential for obtaining a heatmap that balances spatial precision and semantic relevance.
4.2. Limitations
The principal limitation of the method lies in the inherently weak nature of the supervision employed. In the absence of segmentation annotations, the classifier may learn spurious correlations between the algae class and background or visual context elements (substrate type, illumination conditions, presence of water or sand) [2]. This may cause the regions of maximum importance to not always correspond to the organism itself but rather to correlated contextual elements. Additionally, the classifier tends to focus its attention on the most discriminative regions of the alga without necessarily covering its full extent [31], which may result in incomplete prompts for SAM2.
4.3. Application Scenarios
The pipeline is most suitable for photographic archives and recurring coastal-monitoring campaigns in which image-level taxonomic labels are available but pixel-level annotation and computing resources are limited. It is not intended to replace fully supervised segmentation when precise mask area or individual boundaries constitute the scientific measurement; such applications require task-specific pixel-level annotations and validation.
4.4. Future Work
A particularly promising line of future work involves using the segmentations obtained to iteratively improve the classifier itself. Once an initial estimate of the algae-containing regions is available, classifier training could be refined through the introduction of selective perturbations and noise in background regions (those not identified as algae). In this manner, the model would be forced to base its decision exclusively on the organism’s features, progressively eliminating biases associated with the visual context.
Our hypothesis is that, through an iterative training scheme—where the segmentation obtained in one iteration is used to refine the training data for the next—it is possible to improve both the model’s causality (i.e., ensuring the classifier attends to the algae rather than spurious correlations) and the quality of the resulting segmentations, all without additional human intervention. This automatic feedback approach could converge toward an increasingly robust classifier and increasingly precise segmentation, reducing the system’s dependence on the particular conditions of the initial dataset.
Additionally, extending the method to multispectral or hyperspectral imagery, commonly used in satellite or drone remote sensing, could enhance the classifier’s discriminative capacity by incorporating non-visible spectral bands that improve differentiation among macroalgae genera. Similarly, expanding the dataset, both in volume and in diversity of acquisition conditions, would increase the robustness and accuracy of the complete pipeline.
5. Conclusions
The present work has demonstrated the viability of obtaining macroalgae segmentations from a classifier trained solely with image-level labels, without the need for manual segmentation annotations. The proposed pipeline, based on the combination of gradient analysis across the intermediate convolutional layers of a CNN and the generalist segmentation model SAM2, enables a drastic reduction in the required annotation effort—limiting it to image classification—while providing useful automatic spatial delineations without pixel-level supervision.
A notable advantage of the proposed approach is its low computational cost and modest data requirements. The entire pipeline—classifier training, gradient analysis, and segmentation via SAM2—can be executed on conventional hardware, without the need for specialized computing infrastructure. The classifier, trained entirely from scratch on a dataset of fewer than 2000 images and without resorting to pretrained weights from external collections, achieves a classification accuracy of 94.5% with a training time of under 15 min. This result shows that the classification and prompt-generation stages can be trained with modest data and conventional computing resources. On 42 manually annotated validation images used only for evaluation, the complete pipeline reaches a mean IoU of 0.44, Dice coefficient of 0.51, precision of 0.70, and recall of 0.54, while 80% of the extracted keypoints fall inside the annotated algae.
Author Contributions
Conceptualization, Á.G.C.P., P.M.-D.; Methodology, P.O.-C.; Software, P.M.-D., P.O.-C.; Formal analysis, P.M.-D.; Investigation, Á.G.C.P.; Resources, P.O.-C.; Data curation, P.M.-D.; Writing—original draft, Á.G.C.P., P.M.-D.; Writing—review & editing, P.O.-C.; Visualization, Á.G.C.P., P.M.-D.; Supervision, P.O.-C.; Project administration, F.A.-A.; Funding acquisition, F.A.-A. All authors have read and agreed to the published version of the manuscript.
Funding
This work has received financial support from Consellería de Educación, Ciencia, Universidades e Formación Profesional and co-funded by UE.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
A subset of the test images used to evaluate the pipeline is openly available in Zenodo at https://doi.org/10.5281/zenodo.18925815 (accessed on 4 August 2026). The complete dataset of 1818 images of three macroalgae genera (Fucus, Laminaria, and Ulva) is available from the authors upon reasonable request.
Conflicts of Interest
The authors declare no conflicts of interest.
Nomenclature
| Symbol | Definition |
| Input RGB image, of shape | |
| Pre-softmax logit for class k | |
| Convolutional-layer index, l = 1,…,6 | |
| Activation map of layer l, of shape | |
| Channels, height, and width of layer l | |
| Channel and spatial position of a neuron | |
| Importance of neuron (c, i, j), defined by Equation (1) or (2) | |
| Mean importance of channel c in layer l, Equation (3) | |
| Mean importance of layer l, Equation (4) | |
| Fraction of total importance assigned to layer l | |
| Input-image region back-projected from neuron (i, j) of layer l | |
| Side length, in input pixels, of region | |
| Importance-weighted back-projection block size | |
| Aggregated spatial heatmap, Equation (5) | |
| Indicator function | |
| Standard deviation of Gaussian smoothing, in pixels | |
| NMS suppression radius, in pixels | |
| Maximum number of keypoints per image | |
| Relative intensity threshold for accepting a keypoint |
References
- Chen, Z.; Bie, Q.; Yuan, B.; Xia, G.-S. Weakly-Supervised Semantic Segmentation with Image-Level Labels: From Traditional Models to Foundation Models. ACM Comput. Surv. 2024, 57, 1–29. [Google Scholar] [CrossRef] [Scilit]
- Choe, J.; Oh, S.J.; Lee, S.; Chun, S.; Akata, Z.; Shim, H. Evaluating Weakly Supervised Object Localization Methods Right. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020. [Google Scholar]
- Ravi, N.; Gabeur, V.; Hu, Y.-T.; Hu, R.; Ryali, C.; Ma, T.; Khedr, H.; Rädle, R.; Rolland, C.; Gustafson, L.; et al. SAM 2: Segment Anything in Images and Videos. arXiv 2024, arXiv:2408.00714. [Google Scholar]
- Zhou, B.; Khosla, A.; Lapedriza, A.; Oliva, A.; Torralba, A. Learning Deep Features for Discriminative Localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 2921–2929. [Google Scholar]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. Int. J. Comput. Vis. 2020, 128, 336–359. [Google Scholar] [CrossRef] [Scilit]
- Chattopadhay, A.; Sarkar, A.; Howlader, P.; Balasubramanian, V.N. Grad-CAM++: Generalized Gradient-Based Visual Explanations for Deep Convolutional Networks. In Proceedings of the IEEE Winter Conference on Applications of Computer Vision (WACV), Lake Tahoe, NV, USA, 12–15 March 2018; pp. 839–847. [Google Scholar]
- Wang, H.; Wang, Z.; Du, M.; Yang, F.; Zhang, Z.; Ding, S.; Mardziel, P.; Hu, X. Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, Seattle, WA, USA, 14–19 June 2020. [Google Scholar]
- Jiang, P.-T.; Zhang, C.-B.; Hou, Q.; Cheng, M.-M.; Wei, Y. LayerCAM: Exploring Hierarchical Class Activation Maps for Localization. IEEE Trans. Image Process. 2021, 30, 5875–5888. [Google Scholar] [CrossRef] [Scilit]
- Balado, J.; Olabarria, C.; Martínez-Sánchez, J.; Rodríguez-Pérez, J.R.; Arias, P. Semantic Segmentation of Major Macroalgae in Coastal Environments Using High-Resolution Ground Imagery and Deep Learning. Int. J. Remote Sens. 2021, 42, 1785–1800. [Google Scholar] [CrossRef] [Scilit]
- Martínez-Movilla, A.; Rodríguez-Somoza, J.L.; Román, M.; Olabarria, C.; Martínez-Sánchez, J. Rapid Diagnosis of the Geospatial Distribution of Intertidal Macroalgae Using Large-Scale UAVs. Ecol. Inform. 2024, 83, 102845. [Google Scholar] [CrossRef] [Scilit]
- Martínez-Movilla, A.; Rodríguez-Somoza, J.L.; Arias-Sánchez, P.; Martínez-Sánchez, J. Comprehensive Study of Machine Learning Classification Methods Applied to UAV-Based Management of Intertidal Ecosystems. Remote Sens. Appl. Soc. Environ. 2025, 39, 101634. [Google Scholar] [CrossRef] [Scilit]
- Martínez-Movilla, A.; Román, M.; Fontenla-Carrera, G.; Rodríguez-Somoza, J.L.; Olabarria, C.; Martínez-Sánchez, J. Dataset of High-Resolution Aerial Images for Intertidal Macroalgae. Sci. Data 2025, 12, 1848. [Google Scholar] [CrossRef] [Scilit]
- Wang, M.; Hu, C. Satellite Remote Sensing of Pelagic Sargassum Macroalgae: The Power of High Resolution and Deep Learning. Remote Sens. Environ. 2021, 264, 112631. [Google Scholar] [CrossRef] [Scilit]
- Gao, L.; Li, X.; Kong, F.; Yu, R.; Guo, Y.; Ren, Y. AlgaeNet: A Deep-Learning Framework to Detect Floating Green Algae from Optical and SAR Imagery. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2022, 15, 2782–2796. [Google Scholar] [CrossRef] [Scilit]
- Marquez, L.; Fragkopoulou, E.; Cavanaugh, K.C.; Houskeeper, H.F.; Assis, J. Artificial Intelligence Convolutional Neural Networks Map Giant Kelp Forests from Satellite Imagery. Sci. Rep. 2022, 12, 22196. [Google Scholar] [CrossRef] [Scilit]
- Arellano-Verdejo, J.; Lazcano-Hernandez, H.E. Towards Sustainable Coastal Management: Aerial Imagery and Deep Learning for High-Resolution Sargassum Mapping. PeerJ 2024, 12, e18192. [Google Scholar] [CrossRef] [Scilit]
- Ali, M.; Yaseen, M.; Ali, S.; Kim, H.-C. Deep Learning-Based Approach for Microscopic Algae Classification with Grad-CAM Interpretability. Electronics 2025, 14, 442. [Google Scholar] [CrossRef] [Scilit]
- Wang, D.; Zhuang, L.; Gao, L.; Sun, X.; Zhao, X.; Plaza, A. Sliding Dual-Window-Inspired Reconstruction Network for Hyperspectral Anomaly Detection. IEEE Trans. Geosci. Remote Sens. 2024, 62, 1–15. [Google Scholar] [CrossRef] [Scilit]
- Wang, D.; Ren, L.; Sun, X.; Gao, L.; Chanussot, J. Nonlocal and Local Feature-Coupled Self-Supervised Network for Hyperspectral Anomaly Detection. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2025, 18, 6981–6993. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Sun, H.; Gao, H.; Gao, L.; Zhang, B. Hyperspectral Remote Sensing Object Detection via Cross-Domain Learning From Visible Images. IEEE Trans. Geosci. Remote Sens. 2026, 64, 1–18. [Google Scholar] [CrossRef] [Scilit]
- Kirillov, A.; Mintun, E.; Ravi, N.; Mao, H.; Rolland, C.; Gustafson, L.; Xiao, T.; Whitehead, S.; Berg, A.C.; Lo, W.-Y.; et al. Segment Anything. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Paris, France, 1–6 October 2023; pp. 4015–4026. [Google Scholar]
- Osco, L.P.; Wu, Q.; de Lemos, E.L.; Gonçalves, W.N.; Ramos, A.P.M.; Li, J.; Marcato Junior, J. The Segment Anything Model (SAM) for Remote Sensing Applications: From Zero to One Shot. Int. J. Appl. Earth Obs. Geoinf. 2023, 124, 103540. [Google Scholar] [CrossRef] [Scilit]
- Zheng, Z.; Liang, H.; Hua, B.-S.; Wong, Y.H.; Ang, P.; Chui, A.P.Y.; Yeung, S.-K. CoralSCOP: Segment Any COral Image on This Planet. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024. [Google Scholar]
- Chen, T.; Lu, A.; Zhu, L.; Ding, C.; Yu, C.; Ji, D.; Li, Z.; Sun, L.; Mao, P.; Zang, Y. SAM2-Adapter: Evaluating and Adapting Segment Anything 2 in Downstream Tasks: Camouflage, Shadow, Medical Image Segmentation, and More. arXiv 2024, arXiv:2408.04579. [Google Scholar]
- Simonyan, K.; Vedaldi, A.; Zisserman, A. Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps. arXiv 2014, arXiv:1312.6034. [Google Scholar]
- Sundararajan, M.; Taly, A.; Yan, Q. Axiomatic Attribution for Deep Networks. In Proceedings of the 34th International Conference on Machine Learning (ICML), Sydney, NSW, Australia, 6–11 August 2017; pp. 3319–3328. [Google Scholar]
- Smilkov, D.; Thorat, N.; Kim, B.; Viégas, F.; Wattenberg, M. SmoothGrad: Removing Noise by Adding Noise. arXiv 2017, arXiv:1706.03825. [Google Scholar]
- Bau, D.; Zhou, B.; Khosla, A.; Oliva, A.; Torralba, A. Network Dissection: Quantifying Interpretability of Deep Visual Representations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017. [Google Scholar]
- Olah, C.; Mordvintsev, A.; Schubert, L. Feature Visualization. Distill 2017, 2, e7. [Google Scholar] [CrossRef] [Scilit]
- Kakogeorgiou, I.; Karantzalos, K. Evaluating Explainable Artificial Intelligence Methods for Multi-Label Deep Learning Classification Tasks in Remote Sensing. Int. J. Appl. Earth Obs. Geoinf. 2022, 103, 102520. [Google Scholar] [CrossRef] [Scilit]
- Adebayo, J.; Gilmer, J.; Muelly, M.; Goodfellow, I.; Hardt, M.; Kim, B. Sanity Checks for Saliency Maps. Adv. Neural Inf. Process. Syst. 2018, 31, 9505–9515. [Google Scholar]
- Kweon, H.; Yoon, K.-J. From SAM to CAMs: Exploring Segment Anything Model for Weakly Supervised Semantic Segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024; pp. 19499–19509. [Google Scholar]
- Zhu, L.; Zhou, J.; Liu, Y.; Hao, X.; Liu, W.; Wang, X. WeakSAM: Segment Anything Meets Weakly-Supervised Instance-Level Recognition. In Proceedings of the ACM International Conference on Multimedia (MM), Melbourne, VIC, Australia, 28 October–1 November 2024. [Google Scholar]
- Chen, T.; Mai, Z.; Li, R.; Chao, W.-L. Segment Anything Model (SAM) Enhanced Pseudo Labels for Weakly Supervised Semantic Segmentation. arXiv 2023, arXiv:2305.05803. [Google Scholar]
- Yang, X.; Gong, X. Foundation Model Assisted Weakly Supervised Semantic Segmentation. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), Waikoloa, HI, USA, 3–8 January 2024; pp. 523–532. [Google Scholar]
- Wang, J.; Zhang, X.; Ma, X.; Yu, W.; Ghamisi, P. Auto-Prompting SAM for Weakly Supervised Landslide Extraction. IEEE Geosci. Remote Sens. Lett. 2025, 22, 1–5. [Google Scholar] [CrossRef] [Scilit]
- Ren, C.; Zou, L.; Gui, L. 2AM: Weakly Supervised Tumor Segmentation in Pathology via CAM and SAM Synergy. Electronics 2025, 14, 3109. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.










