# Gated Attention-Augmented Double U-Net for White Blood Cell Segmentation

Ilyes Benaissa, Athmane Zitouni, Salim Sbaa, Nizamettin Aydin, Ahmed Chaouki Megherbi, Abdellah Zakaria Sellam, Abdelmalik Taleb-Ahmed, Cosimo Distante

► To cite this version:

Ilyes Benaissa, Athmane Zitouni, Salim Sbaa, Nizamettin Aydin, Ahmed Chaouki Megherbi, et al. Gated Attention-Augmented Double U-Net for White Blood Cell Segmentation. Journal of Imaging, 2025, 11 (11), pp.386. 10.3390/jimaging11110386 . hal-05393584

HAL Id: hal-05393584

https://hal.science/hal-05393584v1

Submitted on 2 Dec 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Article

# Gated Attention-Augmented Double U-Net for White Blood Cell Segmentation

Ilyes Benaissa ¹ID, Athmane Zitouni ¹ID, Salim Sbaa ¹ID, Nizamettin Aydin ²ID, Ahmed Chaouki Megherbi ³ID, Abdellah Zakaria Sellam <fnref n="4" />,⁵ID, Abdelmalik Taleb-Ahmed <fnref n="6" /> and Cosimo Distante <fnref n="4" />,<fnref n="5" />,*ID

<figure><img src="image_2.png" /></figure>

check for
updates

Academic Editors: Rahman Attar and
Le Zhang

Received: 10 September 2025

Revised: 17 October 2025

Accepted: 28 October 2025

Published: 1 November 2025

**Citation:** Benaissa, I.; Zitouni, A.; Sbaa, S.; Aydin, N.; Megherbi, A.C.; Sellam, A.Z.; Taleb-Ahmed, A.; Distante, C. Gated Attention-Augmented Double U-Net for White Blood Cell Segmentation. *J. Imaging* **2025**, *11*, 386. https://doi.org/10.3390/jimaging11110386

**Copyright:** © 2025 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
(https://creativecommons.org/licenses/by/4.0/).

Abstract

Segmentation of white blood cells is critical for a wide range of applications. It aims to identify and isolate individual white blood cells from medical images, enabling accurate diagnosis and monitoring of diseases. In the last decade, many researchers have focused on this task using U-Net, one of the most used deep learning architectures. To further enhance segmentation accuracy and robustness, recent advances have explored the combination of U-Net with other techniques, such as attention mechanisms and aggregation techniques. However, a common challenge in white blood cell image segmentation is the similarity between the cells' cytoplasm and other surrounding blood components, which often leads to inaccurate or incomplete segmentation due to difficulties in distinguishing low-contrast or subtle boundaries, leaving a significant gap for improvement. In this paper, we propose GAAD-U-Net, a novel architecture that integrates attention-augmented convolutions to better capture ambiguous boundaries and complex structures such as overlapping cells and low-contrast regions, followed by a gating mechanism to further suppress irrelevant feature information. These two key components are integrated in the Double U-Net base architecture. Our model achieves state-of-the-art performance on white blood cell benchmark datasets, with a 3.4% Dice score coefficient (DSC) improvement specifically on the SegPC-2021 dataset. The proposed model achieves superior performance as measured by mean the intersection over union (IoU) and DSC, with notably strong segmentation performance even for difficult images.

**Keywords:** medical imaging; white blood cell image segmentation; supervised deep learning; convolutional neural networks; attention-augmented convolution; gating mechanism

1. Introduction

White blood cell (WBC) segmentation is a critical step for the automated classification and AI-based diagnosis of blood cancers. Automating this process overcomes the slow and

<footnote n="1">¹ Laboratory of Vision Systems and Communication (VSC), Department of Electrical Engineering, University of Mohamed Khider Biskra, Biskra 07000, Algeria; ilyes.benaissa@univ-biskra.dz (I.B.); athmane.zitouni@univ-biskra.dz (A.Z.)</footnote>

<footnote n="2">² Computer Engineering Department, Faculty of Computer and Informatics, Istanbul Technical University, Istanbul 34485, Turkey; naydin@itu.edu.tr</footnote>

<footnote n="3">³ Laboratory of Identification, Command, Control and Communication (LI3C), Department of Electrical Engineering, University of Mohamed Khider, Biskra 07000, Algeria</footnote>

<footnote n="4">⁴ Department of Innovation Engineering, University of Salento, 73100 Lecce, Italy</footnote>

<footnote n="5">5 Institute of Applied Sciences and Intelligent Systems, Consiglio Nazionale delle Ricerche (CNR), 73100 Lecce, Italy</footnote>

<footnote n="6">⁶ Laboratory of Institute of Electronics, Microelectronics and Nanotechnology (IEMN), UMR CNRS 8520, Université Polytechnique Hauts-de-France, 59309 Valenciennes, France</footnote>

<footnote>* Correspondence: cosimo.distante@cnr.it</footnote>
labor-intensive nature of manual methods, enabling faster, more consistent, and large-scale analysis [1-3]. Advances in big data and deep learning have accelerated the development and widespread implementation of clinical decision support systems in healthcare [4,5]. However, inconsistencies in imaging protocols and equipment compromise analytical validity, prompting early traditional methods to address these via color adjustment techniques, such as transferring color statistics from a template image in lab space followed by color space decomposition and K-means clustering for nucleus and cytoplasm segmentation [6]. This underscores the need for machine learning techniques that are robust to such variability [7].

Research using microscopic imaging allows for the visualization and analysis of different blood cell types: white blood cells, red blood cells, and platelets. WBCs have five types: neutrophils, eosinophils, monocytes, basophils, and lymphocytes. Each contains a nucleus and cytoplasm [8-10]. Identifying and classifying WBCs are crucial for cell counts and early diagnosis of various diseases, including infections, leukemias, and immune disorders [11-14]. Machine learning and deep learning are increasingly used with traditional methods for image segmentation and are classified as supervised, weakly supervised, or unsupervised based on the availability of labeled data [15-17]. The unsupervised learning process is more complex since it lacks labeled data. On the other hand, weakly supervised learning requires only a small portion of labeled data, while the majority remain unlabeled. Unlike unsupervised and weakly supervised learning, supervised learning requires that all data be carefully labeled, usually by experts, to ensure the credibility and accurate training of models [18].

Various supervised methods are commonly used to solve the biomedical segmentation problem. One of the most used methods in this field is U-Net [19], an auto-encoder that uses skip connections between encoder and decoder blocks to retain important fine-grained features that may be lost during the downsampling and upsampling processes [20]. The skip-connected encoder-decoder design of U-Net makes it a core framework in most medical image segmentation tasks [21]. Despite this advantage, its performance can be limited in handling complex structures or variations in an image, such as small, intricate features or varying resolutions. This has led researchers to develop variations of the U-Net architecture, such as Nested U-Net (or U-Net++) [21], which incorporates nested, dense skip connections to improve feature fusion and better capture fine-grained details, and Double U-Net [22], which consists of two encoders and two decoders. The first encoder utilizes the VGG19 architecture, while the second encoder adopts a structure similar to that of the U-Net encoder, with its decoder connected to the first path by an additional long skip connection to allow features from the first encoder to directly contribute to the second decoder's outputs [23]. These techniques still face challenges in acquiring enhanced global representations for accurately defining the specific WBC positions and boundaries [24], which can restrict the performance of segmentation. Recent studies have focused more on attention-based U-Net [25], creating a wide range of U-Net-like varieties such as Attention-Augmented U-Net (AA-U-Net) [26] to combine the strength of U-Net and capture both local and long-range features by virtue of the attention mechanism [27-29].

In this paper, we propose an enhanced double encoder-decoder architecture for WBC segmentation, termed Gated Attention-Augmented Double U-Net (GAAD-U-Net), which is modified from the baseline Double U-Net architecture [22]. To deal with the encoder path of our network, we employ a tailored strategy that reduces both the parameter count and computational complexity while preserving key semantic information in the early layers. This approach helps integrate long-range spatial cues into the low-level feature maps. The robust features obtained from these initial layers are then passed through custom-built gated attention-augmented convolution blocks, which amplify critical feature
representations through a multi-path attention mechanism. Each path utilizes a distinct
series of convolutional operations, enabling the network to capture multi-scale receptive
fields more effectively.

Our Double U-Net framework incorporates skip connections to mitigate potential gradient vanishing issues as the model deepens. In the decoder stage, the encoded feature maps at each downsampling layer are combined via skip connections with the corresponding upsampled output. The same gated attention-augmented blocks are subsequently applied to refine these fused features, enhancing the overall segmentation performance. Notably, GAAD-U-Net does not require ancillary data, such as pre-initialized masks or boundary supervision, making it straightforward to train the model in an end-to-end manner. We summarize our main contributions in this work as follows:

* Attention-augmented convolutions are integrated to selectively emphasize informative features across channels and spatial scales.

* Gating mechanisms are incorporated to suppress irrelevant regions and enhance focus on meaningful anatomical structures.

* Unlike recent studies, this method was tested on both individual WBCs (cropped cell images) or multiple cells within one image. Our approach handles both scenarios effectively.

* The proposed method achieves accurate and efficient segmentation without relying on additional support inputs or specialized preprocesses.

## 2. Related Work

Recent advancements in segmentation methods help identify the WBCs within blood images, since they distinguish each cell's features from the background. This process will later ease accurate cell counting, morphological analysis, and blood disease diagnosis. Within this section, a literature overview of existing computer vision algorithms used for this task is presented and divided into two main approaches: (1) convolutional neural networks and (2) attention mechanism-integrated networks.

### (1) Convolutional Neural Networks

In order to solve WBC issues, the Lu et al. [30] approach integrates ResNet as a backbone for the Nested U-Net architecture to enhance feature extraction. They tested their methodology on four WBC datasets and reported an average micro IoU of 0.96. However, according to [31], they did not compare their methodology with other deep semantic segmentation networks. In the work presented by Roy and Ameer [32], it can be observed that the authors implemented the architecture of DeepLabv3+, which is essentially based on deep semantic understanding. The ResNet-50 network was applied to this model as its backbone to extract features from images. The experimental settings were three different public datasets. These approaches led to a high mean IoU of 0.921. However, the study had a shortcoming in terms of the specific detail relating to the efficiency of the model in segmenting nuclear components. Guo et al. [31] integrated the concept of indeterminacy from neutrosophic WBCs sets on widely recognized CNNs to ensure robustness in varying image conditions, such as the brightness and resolution, obtaining 0.90887 and 0.82069 for the mean IoU and mean BFScore, respectively, on the SegPC-2021 dataset. Zhang et al. [33] proposed RotU-Net, an encoder-decoder U-Net-like architecture. The key change in this paper is leveraging the weight rotator block alongside the feature expansion module and feature restoration module as a bottleneck for the original U-Net architecture, achieving a 0.8201 DSC on the SegPC dataset.

### (2) Attention Mechanism-Based Networks

The Chen Li et al. [34] approach involved a proposal of an attention-based nested U-Net set-up, which segments white blood cells by inserting attention gates into the
traditional Nested U-Net to help extract the features in each layer of the network. It achieved an IoU of 0.8017 on a small WBC dataset. Dongming Li et al. [35] proposed an architecture called CBAM-DC-UNet that combines both a convolutional block attention module (CBAM) and dilated convolution (DC) in the traditional U-Net design. The authors replaced the original RMSProp optimizer with the RAdam optimizer, which adapts to the learning rate efficiency. This showed great efficiency when dealing with complex scenarios, like adherent cells and ambiguous boundaries. However, the segmentation was not performed on the nucleus and cytoplasm separately. Instead, it focused more on segmenting the WBC instance as a single class. Liu et al. [36] suggested a robust model named DCSAU-Net specifically developed for medical image segmentation, including WBC segmentation. This model enhances the U-Net design by integrating a split-attention block that facilitates multi-dimensional attention across various channel dimensions. Recent advancements underscore the value of multi-scale channel-spatial attention for preserving intricate details in medical imaging, as reviewed in super-resolution contexts for endoscopic tasks [37], where integrated channel and spatial modules (e.g., in CCSBESR) enhance edge fidelity via parallax-aware refinement. Our GAAD-U-Net set-up extends this paradigm by embedding AAC and SE blocks within a Double U-Net framework, enabling superior multi-scale boundary detection in WBC segmentation without ancillary data. Extensive experiments have further proven its exceptional performance in segmentation tasks and yielded a mean IoU of 0.806 and a 0.886 DSC. GA2Net [38] is another robust model that uses hierarchical gated feature aggregation, adaptive skip connections, and mask-guided attention mechanisms in the decoder while incorporating deep supervision at multiple stages to better delineate tissue boundaries across diverse medical imaging tasks, achieving a 0.9274 DSC. However, this method was not fully automated in the WBC segmentation task and relied on preprocessed, cropped WBC images, limiting its practical applicability in fully automated blood smear analysis.

Table 1 shows a concise overview of key architectural distinctions across other models. Both GAAD-U-Net and AA-U-Net utilize the same foundational AAC block, but their approaches differ markedly. AA-U-Net applies a single global context injection at the bottleneck of a standard U-Net set-up, while GAAD-U-Net employs a dual-phase Double U-Net architecture, deploying modules across both stages and replacing the bottleneck with a sequential refinement cascade (AAC → Gating → ASPP) for enhanced feature analysis. Its dual-phase skip connections also provide a more sophisticated fusion than AA-U-Net's basic connections. Comparatively, GAAD-U-Net uses spatial self-attention via AAC to capture long-range pixel dependencies, unlike DCSAU-Net's channel-wise attention via CSA for feature recalibration. Architecturally, GAAD-U-Net focuses on a two-stage, coarse-to-fine process with a complex bottleneck, while DCSAU-Net emphasizes efficient multi-scale extraction in a single-pass U-Net framework.

<table><caption>**Table 1.** Key differences between our model and baseline, AA-U-Net, and DCSAU-Net.</caption><thead><tr><th>Feature</th><th>Double U-Net</th><th>AA-U-Net</th><th>DCSAU-Net</th><th>GAAD-U-Net (Ours)</th></tr></thead><tbody><tr><td>Base</td><td>Double U-Net</td><td>U-Net</td><td>U-Net</td><td>Double U-Net</td></tr><tr><td>Attention</td><td>None</td><td>AAC</td><td>CSA</td><td>AAC</td></tr><tr><td>Mechanism</td><td>N/A</td><td>Multi-Head Self-Attention</td><td>Multi-Path Soft Attention</td><td>Multi-Head Self-Attention</td></tr><tr><td>Placement</td><td>N/A</td><td>Bottleneck</td><td>Encoder or Decoder skips</td><td>Both bottlenecks with Gating, ASPP</td></tr><tr><td>Attention Enhancement Modules</td><td>N/A</td><td>None</td><td>PFC</td><td>Gating, ASPP, Dual-Skip</td></tr><tr><td>Benefit</td><td>Dual-Phase Refinement</td><td>Wider Context</td><td>Multi-Scale Efficiency</td><td>Feature Refinement and Wider Context</td></tr></tbody></table>
Despite the superiority of these latest methods, it is worth mentioning three common
cons that have been widely arising in the state of the art:

(1) **Performance in complex cases:** While state-of-the-art models perform extremely well in most cases, they may struggle with complex scenarios, such as close boundaries or overlapping cells. This creates a research gap where new methods need to be developed to enhance the performance of these models in broader scenarios.

(2) **Evaluating performance for WBCs as a single component:** Most state-of-the-art models segment WBCs as a single component, which limits detailed analysis by evaluating the segmentation performance of the cytoplasm and nucleus separately. By treating the cytoplasm and nucleus as separate entities, we can capture subtle variations in their shapes and textures, leading to improved segmentation performance and more reliable results in medical imaging applications.

(3) **Adhesion issues:** Most existing studies focus on segmenting isolated WBCs in images, neglecting the common real-world scenario where WBCs adhere to or overlap with other blood cells such as red blood cells and blood platelets. This limitation leads to models that perform well in controlled settings but struggle in complex cases with cell clusters.

While state-of-the-art techniques in WBC segmentation have shown promising results, several limitations persist that hinder their widespread adoption and performance in diverse scenarios. Many methods struggle to generalize to diverse datasets with varying resolutions, lighting conditions, and staining techniques, reducing their robustness in real-world applications. Additionally, most approaches segment WBCs as a single entity, failing to distinguish between cytoplasm and nucleus, which limits their utility in capturing the subtle morphological details crucial for disease diagnosis. Advanced models often come with high computational complexity, requiring significant hardware resources and making them less practical for deployment in resource-constrained settings. Furthermore, challenges like overlapping cells, noisy images, and ambiguous boundaries continue to impact accuracy, while reliance on small, curated datasets exacerbates issues like overfitting. The tradeoff between accuracy and speed and the limited interpretability of complex models further complicate their integration into clinical workflows, highlighting the need for more robust, efficient, and interpretable solutions.

To address these limitations, we present GAAD-U-Net, a novel approach to WBC segmentation that leverages the power of attention-augmented convolution to enhance the performance of the Double U-Net architecture. By incorporating attention mechanisms, GAAD-U-Net focuses on the most relevant features within the cytoplasm and nucleus, enabling precise segmentation of these critical components even in challenging scenarios such as overlapping cells or ambiguous boundaries. The integration of attention-augmented layers ensures the model captures both the global context and fine-grained details, overcoming issues like poor contrast and morphological variability. Additionally, the Double U-Net framework improves hierarchical feature extraction, allowing for better generalization across diverse datasets. GAAD-U-Net is designed to balance high segmentation accuracy with computational efficiency, making it suitable not only for achieving state-of-the-art performance but also for real-world deployment in clinical applications. Through these innovations, GAAD-U-Net addresses the key challenges faced by existing methods and takes a significant step toward more reliable and interpretable WBC segmentation.

3. Method

We propose a dual-path Double-U-Net architecture that incorporates a gated attention-augmented convolution (Gated AAC) module within its bottleneck. This design, as shown in Figure 1, facilitates tailored feature extraction by dedicating separate processing streams to the nucleus and cytoplasm components, thereby enhancing sensitivity to fine morpho-
logical details. The Gated AAC module leverages attention to focus on salient features and a gating mechanism to refine representations, while the cascaded U-Net structure captures multi-scale context. This approach yields distinct, component-specific segmentations critical for advancing automated hematological analysis.

<figure><img src="image_3.png" /><figcaption>**Figure 1.** Overview of the proposed GAAD-U-Net architecture for white blood cell segmentation. (a) Phase 1 utilizes a VGG19 encoder, a Gated AAC block, an ASPP module, and a decoder to generate the initial segmentation. (b) Phase 2 refines this output using a second encoder-decoder pipeline. (c) The Gated AAC block, detailed in (c.1,c.2), represents attention and gating mechanisms, respectively.</figcaption></figure>

## 3.1. Background Knowledge

### 3.1.1. Double U-Net Baseline

WBC images are microscopic in nature and contain highly detailed structures, including cell boundaries, nuclei, and tissue textures, which can be challenging to capture in a single pass. Additionally, annotated datasets for white blood cell segmentation are often limited due to the high cost and expertise required for manual labeling. To address these challenges, we employ a two-stage U-Net-based architecture, where the first U-Net generates a coarse segmentation and the second U-Net refines details by improving boundary delineation and reducing false positives through error correction from the first stage. This sequential refinement process enhances segmentation performance, particularly in scenarios with limited training data, by enabling better feature learning and reducing overfitting.
### 3.1.2. Attention-Augmented Convolution (AAC) Block

The attention-augmented convolution (AAC) block shown in Figure 1(c.1) enhances standard convolutional operations by integrating self-attention mechanisms, combining features extracted via convolution with those obtained through self-attention mechanisms and enabling the model to capture both local and global spatial dependencies. Given an input tensor $x \in \mathbb{R}^{B \times C \times H \times W}$, where B is the batch size, C is the number of input channels, and $H \times W$ are the spatial dimensions, the AAC block is formulated as

$$y_{\text{aac}} = \text{Concat}(\text{Conv2D}(x), \text{Attention}(x)), \qquad (1)$$

where the following definitions apply:

* $\text{Conv2D}(x)$ is a standard 2D convolution on the input tensor $x$, producing a feature map $y_{\text{conv}} \in \mathbb{R}^{B \times C_{\text{conv}} \times H \times W}$, where $C_{\text{conv}}$ is the number of output channels for the convolutional branch.

* $\text{Attention}(x)$ is the self-attention on $x$ that calculates attention weights to obtain global spatial relationships. The attention module produces a feature map $y_{\text{attn}} \in \mathbb{R}^{B \times C_{\text{attn}} \times H \times W}$, where $C_{\text{attn}}$ is the number of output channels of the attention branch.

* $\text{Concat}(\cdot)$ concatenates the output of the attention and convolution branches along the channel axis to produce the final output $y_{\text{aac}} \in \mathbb{R}^{B \times (C_{\text{conv}}+C_{\text{attn}}) \times H \times W}$.

The self-attention mechanism of the AAC block is calculated as follows:

$$\text{Attention}(x) = \text{Softmax}\left(\frac{QK^T}{\sqrt{d_k}}\right)V, \qquad (2)$$

where the following definitions apply:

* $Q, K, V$ are the query, key, and value matrices, respectively, obtained from linear transformations of the input tensor $x$. These matrices are computed as

$$Q = W_Q x, \quad K = W_K x, \quad V = W_V x,$$

where $W_Q, W_K, W_V$ are learnable weight matrices ($W_Q$ is the query projection matrix, $W_K$ is the key projection matrix, and $W_V$ is the value projection matrix).

* The dimensionality of the key vectors is $d_k$, which is used to scale the dot product attention scores and prevent vanishing gradients.

* $\text{Softmax}(\cdot)$ normalizes the attention scores to produce a probability distribution over the spatial locations.

Inspired by Patil et al. [39], who successfully integrated the AAC module into the conventional U-Net architecture, we extended this approach to our dual-phase framework. Given that U-Net serves as the baseline for most modern medical segmentation architectures, we recognized that AAC blocks offer significant potential beyond their traditional applications in classification and object detection, specifically for biomedical segmentation tasks.

The integration of an attention-augmented convolution (AAC) block within a network bottleneck enables the simultaneous capture of both local and global feature representations. For microscopic image analysis, such as WBC segmentation, this dual functionality is critical; the AAC block captures fine-grained details like cell boundaries and nuclei while concurrently modeling the overall cellular morphology. This synthesis of convolutional and self-attention mechanisms facilitates a more exhaustive feature extraction, thereby improving segmentation accuracy.

Furthermore, the bottleneck design enhances computational efficiency by minimizing parameters and computations without degrading performance. By optimizing the feature representation to emphasize the most salient information, this integration estab-
lishes a powerful and efficient framework for feature extraction in complex biomedical imaging tasks.

### 3.1.3. Gating Mechanism

As presented Figure 1(c.2), the gating block applies a gating mechanism to an input tensor $x \in \mathbb{R}^{B \times C \times H \times W}$, where B is the batch size, C is the number of input channels, and $H \times W$ are the spatial dimensions. The formula for the gating mechanism is defined by

$$z = x \odot \sigma(\text{Conv2D}_2(\text{ReLU}(\text{BatchNorm}(\text{Conv2D}_1(x))))), \quad (3)$$

where the following properties apply:

* $\text{Conv2D}_1$ is a $1 \times 1$ convolution that reduces the number of channels from C to C/2, producing an intermediate feature map $y_1 \in \mathbb{R}^{B \times C/2 \times H \times W}$.

* $\text{BatchNorm}$ applies batch normalization to $y_1$, resulting in $y_2 \in \mathbb{R}^{B \times C/2 \times H \times W}$.

* $\text{ReLU}$ applies the rectified linear unit activation function to $y_2$, producing $y_3 \in \mathbb{R}^{B \times C/2 \times H \times W}$.

* $\text{Conv2D}_2$ is a $1 \times 1$ convolution that expands the number of channels back from C/2 to C, yielding $y_4 \in \mathbb{R}^{B \times C \times H \times W}$.

* The sigmoid function is denoted by $\sigma$, which generates the gating mask $g \in \mathbb{R}^{B \times C \times H \times W}$.

* Element-wise (Hadamard) multiplication is signified by $\odot$, scaling the input $x$ with the gating mask $g$ to produce the final output $z \in \mathbb{R}^{B \times C \times H \times W}$.

The gating mechanism is added to enhance the model's ability to focus on salient features while disregarding less important ones, thereby improving feature selection and representation learning. In the context of microscopic and WBC images, where fine-grained details and subtle variations are crucial, the gating mechanism enables the network to prioritize essential structures, such as cell boundaries or nuclei, while mitigating noise.

When employed after attention-augmented convolution, the gating mechanism further refines the feature maps by integrating the global context captured by attention with localized feature selection. This is particularly beneficial for WBC images, as identifying cell types or anomalies requires both the global context and detailed local textures. The blend of attention and gating enhances feature extraction.

## 3.2. Architecture

The GAAD-U-Net architecture, depicted in Figure 1, represents a significant enhancement of the conventional Double U-Net model for white blood cell segmentation. This novel design incorporates two distinct phases, each representing a U-Net network, optimized for feature extraction and segmentation refinement.

The key change in our architecture lies in integrating a Gated AAC module in the bottlenecks of the Double U-Net model. This method is particularly beneficial in medical imaging tasks, where understanding relationships across the entire image can significantly improve performance.

Table A1 outlines the block-wise specifics of the GAAD-U-Net architecture with the output shape of each block and its trainable parameters.

Table A3a highlights the configuration parameters of the AAC block used in our architecture. This block combines standard convolution with self-attention mechanisms, utilizing 512 input and output channels with a kernel size of three. The attention mechanism is configured with 32-dimensional keys and values distributed across four attention heads. It implements relative positional encoding (relative = true) and operates at a stride of one on feature maps with a spatial dimension of 28 × 28. This architecture allows the block to
capture both local spatial relationships through convolution and long-range dependencies
through multi-headed self-attention.

3.2.1. GAAD-U-Net First Phase

The first phase of GAAD-U-Net, shown in Figure 1a, employs the first four VGG-19 encoder blocks, where AAC modules are strategically integrated into the bottleneck of this VGG-19 set-up. This AAC block enhances the network's ability to focus on salient features critical for accurate cell segmentation. Following the AAC block, a gating block is used to improve the focus on relevant anatomical structures while suppressing irrelevant regions and mitigating semantic gaps, which reduces false positives in segmentation. An Atrous Spatial Pyramid Pooling (ASPP) module is applied after the gated AAC to capture multiscale contextual information.

The decoder section of Phase 1 (left) comprises four sequentially arranged decoder
blocks, each implementing upsampling and feature refinement. Each Phase 1 decoder block
performs bilinear upsampling to double the spatial dimensions, concatenates with the
corresponding encoder skip connections to preserve fine-grained details, and then processes
the merged features through successive convolutions followed by a squeeze-and-excitation
(SE) layer to enhance channel-wise feature extraction and recalibration. This design ensures
optimal spatial resolution recovery while maintaining focus on discriminative features
during the reconstruction process, effectively combining local detail preservation with
semantic feature refinement for accurate segmentation output.

3.2.2. GAAD-U-Net Second Phase

Phase 2 (right), illustrated in Figure 1b, builds upon the multiplication of the initial segmentation and ground truth, incorporating four encoder blocks with an AAC module, where each block applies successive convolutions with SE. The encoder block implementation includes conditional max pooling. The first block processes input directly without downsampling, while subsequent blocks apply 2 × 2 max pooling for spatial dimension reduction. Each block concludes with an SE layer that adaptively recalibrates channel responses, improving the network's sensitivity to informative features while suppressing less relevant ones. This modification allows for more nuanced feature extraction at the deepest level of the network. Similar to Phase 1, Phase 2 also employs an ASPP module and a series of four decoder blocks, though these differ significantly in their fusion strategy. Each second decoder block implements a triple-input concatenation approach, combining upsampled features with skip connections from both the Phase 2 encoder and corresponding Phase 1 decoder outputs. This dual-phase skip connection strategy leverages the complementary strengths of both encoding paths; Phase 1's VGG-19 features provide robust low-level cellular boundary information, while Phase 2's encoder captures refined high-level semantic context.

For WBC segmentation, this cross-phase feature integration is crucial as it enables
simultaneous preservation of fine cellular membrane details and broader morphological
patterns, addressing the challenge of accurately delineating complex WBC boundaries
while maintaining cellular structure integrity. The outputs from both phases are con-
catened to produce the final segmentation result. This dual-phase approach, enriched
with AAC and gating mechanisms, aims to capture both fine-grained cellular details and
broader contextual information, potentially leading to superior segmentation performance
in complex scenarios.
# 4. Experimental Results and Analysis

## 4.1. *Datasets*

In this study, we evaluated our method using four publicly available labeled seg-
mentation datasets, augmented by a fifth dataset derived from the original SegPC-2021 to
enhance cell-level analysis.

The original datasets included SegPC-2021 [40], CellaVision [41], JTSC [41], and Raabin-WBC [42]. The four datasets presented the challenge of classifying white blood cells into three classes (nucleus, cytoplasm, and the background) at the pixel level. Originally, SegPC-2021, comprising a total of 775 high-resolution images 2560 × 1920 and 2040 × 1536 in size, was distributed across three parts of the challenge. Specifically, 298 images were made accessible during the training phase, with 200 during the validation phase and the remaining 277 during the test phase. The reference annotations for the test set of 277 images have not been made publicly accessible. In accordance with the evaluation protocol outlined in [38], we extracted instances of white blood cells (WBCs) and created images 224 × 224 pixels in size to test the model on individual cells from the SegPC-2021 dataset. As a result, a second dataset was created, which we will refer to as the cropped SegPC-2021 dataset in our study. The CellaVision dataset contains 100 images with a resolution of 300 × 300 pixels. This dataset features ground-truth segmentation of the nucleus and cytoplasm, which was performed by a hematology expert. The JTSC dataset comprises 300 images of individual white blood cells, each with a resolution of 120 × 120 pixels. It also features ground-truth segmentation performed by an expert. This dataset was acquired by the Jiangxi Tecom Science Corporation in China. The Raabin-WBC dataset is a publicly accessible collection comprising approximately 40,000 images of normal peripheral WBCs at a size of 575 × 575 pixels, along with artifacts such as color spots. Each image has been meticulously labeled, with a significant subset annotated by two experts to ensure data accuracy and reliability. For the segmentation task, ground truth masks for nuclei and cytoplasm are provided for 1145 selected cells. The protocol followed for our work was also used by Guo et al. [31]. The split of each dataset is shown in Table A2.

To provide a more comprehensive understanding of the datasets used in this study, we present a random selection of sample images for each dataset. These images showcase the variability in cell shape, size, and the variability in image contrast and brightness, which are crucial for training and evaluating the performance of our modified deep learning architecture. The following samples in Figure 2 illustrate the diversity and complexity of the images contained in the datasets and offer a detailed visual comparison of samples from five WBC datasets utilized for model training and assessment in medical image analysis and cell segmentation:

(1) **SegPC-2021 dataset:** This dataset provides a high concentration of purple-stained nucleated cells, presumably leukocytes, placed against a pale pink backdrop. The cells are clearly delineated and distinct, exhibiting strong contrast. The staining is uniform, rendering cell borders distinctly observable. The image quality is excellent, featuring a strong focus, minimum background noise, and thus enhanced accurate segmentation.

(2) **Cropped SegPC-2021 dataset:** This dataset was derived from the original SegPC-2021 dataset. Consequently, the evaluation of the model was applied to the WBC instance level without additional processing of the images.

(3) **The JTSC dataset:** This dataset consists of photographs that emphasize individual cells at a high magnification. The cells display distinct internal architectures, comprising nuclei and cytoplasmic features. The background ranges from pale yellow to white, offering superior contrast. This dataset seems suitable for comprehensive cellular component analysis, although it may not accurately reflect the intricacies of cell distribution in a standard blood smear.
(4) **CellaVision dataset:** This collection displays grouped leukocytes exhibiting complex nuclear patterns. The cells exhibit greater sizes and details compared with the other datasets, including discernible lobes and granules. The background includes red blood cells, complicating the segmentation operation. This dataset presumably comprises photos from automated digital morphology systems, providing high-resolution representations of certain cell clusters. These datasets exhibit various complications.

(5) **Raabin-WBC dataset:** [42] To introduce diversity, the dataset includes images captured from various smears using two different cameras and microscopes. This variability presents a challenge for deep learning models, as they must generalize across differing imaging conditions and equipment. The Raabin-WBC dataset supports multiple machine learning tasks, including classification, detection, segmentation, and localization of WBCs.

<figure><img src="image_4.png" /><figcaption>**Figure 2.** Sample of original images from different WBC datasets for model training and evaluation.</figcaption></figure>

The variation in image attributes—such as brightness, contrast, cell distribution, and smear preparation—across these datasets is crucial for developing robust WBC segmentation algorithms. It ensures that models trained on these data can adapt to real-world clinical samples, accounting for differences in staining techniques, microscopy settings, and sample preparation methods across different laboratories. As a result, these datasets present several challenges:

* Cell density: Ranges from single cells (JTSC) to dense aggregates (SegPC-2021 and CellaVision).

* Staining variation: Uniform in SegPC-2021 and more inconsistent in Raabin-WBC.

* Background: Clean in JTSC and SegPC-2021 and more intricate with RBCs in CellaVision.

* Magnification: Varies from low (SegPC-2021) to high (JTSC and CellaVision).

## 4.2. Evaluation Metric

### 4.2.1. Intersection over Union (IoU)

The intersection over union (IoU) or Jaccard index measures the overlap between the predicted (A) and ground truth (B) segmentations:
$$IoU = \frac{|A \cap B|}{|A \cup B|} \qquad (4)$$

where the following definitions apply:

* $A \cap B$ is the intersection of A and B.

* $A \cup B$ is the union of A and B.

The IoU ranges from 0 (no overlap) to 1 (perfect overlap).

### 4.2.2. Dice Similarity Coefficient (DSC)

The DSC measures the overlap, emphasizing the intersection size:

$$DSC = \frac{2|A \cap B|}{|A| + |B|} = \frac{2TP}{2TP + FP + FN} \qquad (5)$$

where the following definitions apply:

* TP represents true positives.

* FP represents false positives.

* FN represents false negatives.

The DSC ranges from 0 to 1, with 1 indicating perfect agreement.

### 4.2.3. Accuracy

Accuracy measures the proportion of correctly classified pixels:

$$Accuracy = \frac{TP + TN}{TP + TN + FP + FN} \qquad (6)$$

where the following definition applies:

* TN represents true negatives.

The accuracy ranges from 0 to 1, with 1 indicating all predictions were correct.

### 4.2.4. Surface Distance Metrics

To quantitatively evaluate boundary fidelity, we employed two established surface distance metrics: the 95th percentile Hausdorff distance (HD95) and the average symmetric surface distance (ASSD). These are defined as follows:

$$HD95(A, B) = \max \left( K_{95\%}^{a \in A} \left\{ \min_{b \in B} \|a - b\| \right\}, K_{95\%}^{b \in B} \left\{ \min_{a \in A} \|b - a\| \right\} \right) \qquad (7)$$

$$ASSD(A, B) = \frac{1}{|A| + |B|} \left( \sum_{a \in A} \min_{b \in B} \|a - b\| + \sum_{b \in B} \min_{a \in A} \|b - a\| \right) \qquad (8)$$

where the following definitions apply:

* A is the set of surface points of the ground truth segmentation.

* B is the set of surface points of the predicted segmentation.

* a is an individual point belonging to set A ($a \in A$).

* b is an individual point belonging to set B ($b \in B$).

* K95% is the operator that calculates the 95th percentile from a set of distances.

### 4.3. Implementation Details

All experiments were implemented using the PyTorch 2.4.0 framework on a single NVIDIA RTX 3060 (12 GB) GPU, an Intel Core i7-10th Gen 8-core CPU, and 64 GB of RAM.
The Dice loss function was used, and all models were trained with the Adam optimizer [43] at a learning rate of $1 \times 10^{-4}$. To adjust the learning rate, we applied polynomial learning rate decay as a scheduler.

Batch sizes were set to 4 or 16, depending on the image size. For the SegPC-2021 dataset (which contains multiple cells per image), the input images were resized to $512 \times 512$. In contrast, the image size for the other datasets was fixed at $224 \times 224$.

All experiments were conducted on the same train, validation, and test sets to ensure fair comparisons. Additionally, state-of-the-art comparisons from previous papers were included in the tables as they were reported.

## 4.4. Data Augmentation

Due to the lack of datasets for WBC segmentation tasks, we incorporated data augmentation methods to reduce the risk of model overfitting. Our augmentation method included geometric transformations (horizontal and vertical flipping and rotation), each with a probability of 0.5. We also included color space augmentations (Gaussian noise and brightness alteration) with the same probability. The augmentation techniques were carefully adjusted to introduce a set of variations without compromising data integrity, thereby enhancing the model's robustness. With these techniques, we aimed to enhance the network's ability to generalize well so that the features learned would be insensitive to typical distortions in real-world environments.

## 4.5. Results

The evaluation, as presented in Tables 2–5 demonstrates the superior performance of our proposed GAAD-U-Net architecture compared with DCSAU-Net and GA2Net across five diverse WBC segmentation datasets. GAAD-U-Net achieved the lowest HD95 and ASSD values in 7 out of 10 metric-dataset combinations, indicating its enhanced capability for precise boundary delineation. Notably, GAAD-U-Net exhibited substantial improvements on the SegPC-2021 dataset, with HD95 and ASSD reductions of approximately 11.7% and 9.9%, respectively, compared with DCSAU-Net, underscoring its robustness in handling complex cellular arrangements. The model also showed remarkable performance on CellaVision, achieving HD95 and ASSD values of 1.1974 and 0.1912, representing improvements of 35.7% and 50.7%, respectively, over DCSAU-Net. While DCSAU-Net performed best on the Raabin-WBC dataset, with an HD95 of 0.3380 and ASSD of 0.0681, and GA2Net achieved the lowest ASSD on JTSC (0.0663), GAAD-U-Net maintained competitive or superior performance across all other evaluations. These results validate the efficacy of GAAD-U-Net's dual-phase AAC integration and gating mechanisms in producing more accurate boundary representations, which is critical for reliable WBC morphological analysis in clinical applications.

Figure 3 illustrates the evolution of these metrics over the 100 training epochs for both the training and validation datasets. The left plot shows that the training and validation accuracy consistently improved, converging to 99% and 97.5%, respectively. These results highlight GAAD-U-Net's ability to accurately segment cellular boundaries, even in challenging cases. The DSC values, shown in the center plot, stabilized at approximately 0.98 and 0.95 for the training and validation datasets, respectively. This indicates that the model maintained a high spatial overlap between the predicted masks and the ground truth annotations. Minor fluctuations in the validation DSC reflect tissue variability and potential challenges associated with generalization to unseen samples. The IoU scores shown in the right plot averaged about 0.97 for training and about 0.93 for validation. These high scores confirm the accuracy of our segmentation.
<table><caption>**Table 2.** Comparison of segmentation methods on SegPC-2021 dataset based on accuracy, precision, recall, DSC, and mIoU. Best scores are in **bold**.</caption><thead><tr><th>Method</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>DSC</th><th>Mean IoU</th></tr></thead><tbody><tr><td>U-Net (2015) [19]</td><td>0.939</td><td>0.842</td><td>0.879</td><td>0.855</td><td>0.766</td></tr><tr><td>Attention U-Net (2018) [44]</td><td>0.940</td><td>0.845</td><td>0.866</td><td>0.849</td><td>0.757</td></tr><tr><td>R2U-Net (2018) [45]</td><td>0.933</td><td>0.852</td><td>0.831</td><td>0.834</td><td>0.744</td></tr><tr><td>ResU-Net++ (2019) [46]</td><td>0.934</td><td>0.838</td><td>0.858</td><td>0.840</td><td>0.736</td></tr><tr><td>U-Net++ (2020) [34]</td><td>0.942</td><td>0.855</td><td>0.876</td><td>0.857</td><td>0.770</td></tr><tr><td>Double U-Net (2020) [22]</td><td>0.937</td><td>0.833</td><td>0.896</td><td>0.858</td><td>0.763</td></tr><tr><td>UNet3+ (2020) [47]</td><td>0.939</td><td>0.848</td><td>0.866</td><td>0.852</td><td>0.766</td></tr><tr><td>TransUNet (2021) [48]</td><td>0.939</td><td>0.822</td><td>0.869</td><td>0.838</td><td>0.741</td></tr><tr><td>LeViT-UNet (2021) [49]</td><td>0.939</td><td>0.850</td><td>0.837</td><td>0.837</td><td>0.738</td></tr><tr><td>DCSAU-Net (2023) [36]</td><td>0.950</td><td>0.871</td><td>0.910</td><td>0.886</td><td>0.806</td></tr><tr><td>GA2Net (2024) [38]</td><td>0.953</td><td>0.866</td><td>0.793</td><td>0.877</td><td>0.793</td></tr><tr><td><strong>GAAD-U-Net (ours)</strong></td><td><strong>0.960</strong></td><td><strong>0.873</strong></td><td><strong>0.924</strong></td><td><strong>0.901</strong></td><td><strong>0.830</strong></td></tr></tbody></table>

<table><caption>**Table 3.** Comparison of model performance based on accuracy, DSC, and mean IoU on cropped SegPC-2021. Best scores are in **bold**.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>DSC</th><th>Mean IoU</th></tr></thead><tbody><tr><td>U-Net (2015) [19]</td><td>0.9390</td><td>0.8808</td><td>0.8820</td></tr><tr><td>U-Net++ (2020) [34]</td><td>0.9420</td><td>0.9102</td><td>0.9092</td></tr><tr><td>Double U-Net (2020) [22]</td><td>0.9470</td><td>0.8941</td><td>0.7991</td></tr><tr><td>MultiResUNet (2021) [50]</td><td>-</td><td>0.8649</td><td>0.8676</td></tr><tr><td>TransU-Net (2021) [48]</td><td>0.9390</td><td>0.8233</td><td>0.8338</td></tr><tr><td>MissFormer (2023) [51]</td><td>-</td><td>0.8082</td><td>0.8209</td></tr><tr><td>UCTransNet (2021) [52]</td><td>-</td><td>0.9174</td><td>0.9159</td></tr><tr><td>DCSAU-Net (2023) [36]</td><td>0.9504</td><td>0.8860</td><td>0.8060</td></tr><tr><td>GA2-Net (2024) [38]</td><td>-</td><td>0.9274</td><td>0.9254</td></tr><tr><td><strong>GAAD-U-Net (Ours)</strong></td><td><strong>0.9852</strong></td><td><strong>0.9614</strong></td><td><strong>0.9330</strong></td></tr></tbody></table>

<table><caption>**Table 4.** Quantitative performance comparison of segmentation models across three public WBC datasets: CellaVision, JTSC, and Raabin-WBC. Best scores are in **bold**.</caption><thead><tr><th rowspan="2">Metrics</th><th colspan="3">CellaVision</th><th colspan="3">JTSC</th><th colspan="3">Raabin-WBC</th></tr><tr><th>Acc.</th><th>DSC</th><th>Mean IoU</th><th>Acc.</th><th>DSC</th><th>Mean IoU</th><th>Acc.</th><th>DSC</th><th>Mean IoU</th></tr></thead><tbody><tr><td>U-Net (2015) [19]</td><td>0.9422</td><td>0.8922</td><td>0.8215</td><td>0.9720</td><td>0.9519</td><td>0.9104</td><td>0.9860</td><td>0.9068</td><td>0.8800</td></tr><tr><td>Double U-Net (2020) [22]</td><td>0.9792</td><td>0.9495</td><td>0.9096</td><td>0.9803</td><td>0.9621</td><td>0.9319</td><td>0.9843</td><td>0.9091</td><td>0.8832</td></tr><tr><td>TransUNet (2021) [48]</td><td>0.9790</td><td>0.9534</td><td>0.9145</td><td>0.9737</td><td>0.9603</td><td>0.9249</td><td>0.9870</td><td>0.9094</td><td>0.8840</td></tr><tr><td>DCSAU-Net (2023) [36]</td><td>0.9737</td><td>0.9460</td><td>0.9018</td><td>0.9767</td><td>0.9592</td><td>0.9235</td><td>0.9865</td><td>0.9102</td><td>0.8867</td></tr><tr><td>GA2Net (2024) [38]</td><td>0.9560</td><td>0.8989</td><td>0.8403</td><td>0.9812</td><td>0.9680</td><td>0.9389</td><td>0.9865</td><td>0.9055</td><td>0.8700</td></tr><tr><td><strong>GAAD-U-Net (Ours)</strong></td><td><strong>0.9830</strong></td><td><strong>0.9589</strong></td><td><strong>0.9214</strong></td><td><strong>0.9832</strong></td><td><strong>0.9714</strong></td><td><strong>0.9674</strong></td><td><strong>0.9884</strong></td><td><strong>0.9119</strong></td><td><strong>0.8885</strong></td></tr></tbody></table>

<table><caption>**Table 5.** Boundary-fidelity comparison of DCSAU-Net, GA2Net, and GAAD-U-Net across different datasets using HD95 and ASSD surface metrics. Best scores are marked in **bold**.</caption><thead><tr><th rowspan="2">Model</th><th colspan="2">SegPC-2021</th><th colspan="2">Cropped SegPC-2021</th><th colspan="2">CellaVision</th><th colspan="2">JTSC</th><th colspan="2">Raabin-WBC</th></tr><tr><th>HD95</th><th>ASSD</th><th>HD95</th><th>ASSD</th><th>HD95</th><th>ASSD</th><th>HD95</th><th>ASSD</th><th>HD95</th><th>ASSD</th></tr></thead><tbody><tr><td>DCSAU-Net</td><td>11.8905</td><td>1.7358</td><td>0.5435</td><td>0.1148</td><td>1.8626</td><td>0.3877</td><td>0.6720</td><td>0.0942</td><td><strong>0.3380</strong></td><td><strong>0.0681</strong></td></tr><tr><td>GA2Net</td><td>20.2653</td><td>4.0739</td><td>0.5830</td><td>0.1092</td><td>2.1052</td><td>0.3864</td><td>0.4634</td><td><strong>0.0663</strong></td><td>0.3653</td><td>0.0693</td></tr><tr><td><strong>GAAD-U-Net</strong></td><td><strong>10.5024</strong></td><td><strong>1.5632</strong></td><td><strong>0.4453</strong></td><td><strong>0.0943</strong></td><td><strong>1.1974</strong></td><td><strong>0.1912</strong></td><td><strong>0.4211</strong></td><td>0.0689</td><td>0.3470</td><td>0.0706</td></tr></tbody></table>

For the JTSC dataset, the results are presented in Figure 4, which illustrates the training and validation performance of the GAAD-U-Net model over 100 training epochs. The first plot illustrates the accuracy, showing a steady improvement in training accuracy that stabilized at around 99%, while validation accuracy leveled off at approximately 98%. The
second plot illustrates the mean DSC, which is indicative of the model's segmentation quality, showing that the training DSC stabilized above 0.98, while the validation DSC was about 0.96. The third plot displays the mean intersection over union (IoU), which followed a similar trend, with the training IoU exceeding 0.96 and the validation IoU approaching 0.94. The slight discrepancy between the training and validation metrics suggests minimal overfitting; however, the results underscore the model's robust and consistent performance in segmentation tasks for the JTSC dataset.

<figure><img src="image_5.png" /><figcaption>**Figure 3.** CellaVision performance monitoring plot for training and validation (from left to right). Accuracy, mean DSC, and mean IoU.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>**Figure 4.** JTSC performance monitoring plot for training and validation (from left to right). Accuracy, mean DSC, and mean IoU.</figcaption></figure>

The GAAD-U-Net training progression on the SegPC-2021 dataset, spanning over 150 epochs, as shown in Figure 5, demonstrated consistent improvement across all evaluated metrics, with both the training and validation curves exhibiting clear convergence patterns. The accuracy metric revealed strong performance, with the training accuracy stabilizing at nearly 99% and the validation accuracy maintained at approximately 95% after initial oscillations, indicating effective generalization with minimal overfitting. The mean DSC followed a similar trajectory, with training and validation scores converging to approximately 0.92 and 0.85, respectively. The mean IoU metric further validates the model's robust performance, showing training IoU stabilization at 0.89 and validation IoU stabilization at 0.80, collectively demonstrating the model's capability to effectively segment cervical cells while maintaining good generalization properties across unseen data.

<figure><img src="image_7.png" /><figcaption>**Figure 5.** SegPC-2021 performance monitoring plot for training and validation (from left to right). Accuracy, mean DSC, and mean IoU.</figcaption></figure>
The training progression for the cropped version of the SegPC-2021 dataset is illustrated in Figure 6. The plots show rapid and stable convergence, with both training and validation accuracy reaching above 96%. The mean DSC and IoU scores for the validation set stabilize at approximately 0.95 and 0.93, respectively, demonstrating the model's generalization ability when segmenting individual, cropped WBC.

<figure><img src="image_8.png" /><figcaption>**Figure 6.** Cropped SegPC-2021 performance monitoring plot for training and validation (from left to right). Accuracy, mean DSC, and mean IoU.</figcaption></figure>

Finally, the performance on the Raabin-WBC dataset is depicted in Figure 7. The model demonstrates robust learning, with the training and validation curves for accuracy, DSC, and IoU tracking each other closely. This indicates a lack of significant overfitting. The validation accuracy converges around 98.8%, with a validation DSC of approximately 0.91 and IoU around 0.89, confirming the model's effectiveness across this dataset as well.

<figure><img src="image_9.png" /><figcaption>**Figure 7.** Raabin-WBC performance monitoring plot for training and validation (from left to right). Accuracy, mean DSC, and mean IoU.</figcaption></figure>

## 4.6. Prediction Visualizations

In comparing the segmentation outputs in Figure 8, several notable observations emerged regarding accuracy, boundary delineation, and morphological fidelity. First, although DCSAU-Net [36] recovered the general shape and location of nuclei (blue and white) and cytoplasm (red and gray), it exhibited slight over- and under-segmentation in certain regions. For instance, the bounding boxes highlight areas where cytoplasmic boundaries either encroached upon adjacent cells (over-segmentation) or failed to capture the complete cell contour (under-segmentation), potentially leading to fragmented or smeared shapes. Such errors were particularly visible when the cells were tightly clustered or when subtle intensity variations challenged the model's capability to distinguish cell boundaries accurately.

In contrast, the proposed GAAD-U-Net model showed more consistent segmentation performance, as evidenced by closer alignment with the ground truth outlines and fewer artifacts within the highlighted boxes. The refined delineation around the nuclei and cytoplasmic regions suggests that GAAD-U-Net's architecture better preserves spatial context and fine details. Likely, its attention mechanisms (or equivalent advanced modules)
facilitate learning of more discriminative features, improving its ability to capture subtle intensity transitions at the cell periphery. This enhanced boundary adherence is crucial in cellular morphological analyses, where small segmentation discrepancies can propagate into significant downstream errors, such as altering the cell size or shape statistics.

<figure><img src="image_10.png" /><figcaption>**Figure 8.** Visual comparison of WBC segmentation results across multiple datasets (from top to bottom): SegPC-2021 (whole), SegPC-2021 (cropped), JTSC, and CellaVision. Nuclei and cytoplasm are shown in blue and red, respectively, for both SegPC-2021 variants (rows 1 and 2). For CellaVision, JTSC, and Raabin-WBC, nuclei and cytoplasm are displayed in white and gray, respectively.</figcaption></figure>

## 4.7. Ablation Study

To evaluate the effectiveness of our proposed GAAD-U-Net architecture, we conducted an ablation study to analyze the individual contributions of its two key components: the AAC strategy and the gating block. We compared four configurations across five datasets using the accuracy, DSC, and IoU metrics. This evaluation is detailed in Table 6.

### 4.7.1. AAC Integration Impact

The integration of the AAC strategy into our baseline model demonstrated consistent performance improvements across all datasets. When implemented as a standalone enhancement (AAC+Base), this module effectively improved the model's ability to capture long-range dependencies and focus on relevant features, as presented in Table 6. On the SegPC-2021 dataset, incorporating the AAC module increased the DSC by 2.3%. Similarly, the mean IoU improved by 1.94%. The AAC module had a significantly greater impact on the Cropped SegPC-2021 dataset, elevating the DSC and mean IoU by 6.7% and 14.0%, respectively. For the JTSC dataset, there was an observed boost due to AAC integration in terms of the DSC and mean IoU, representing improvements of 1.0% and 3.5%, respectively. The CellaVision dataset showed substantial gains with AAC implementation, with a 1.2% DSC increase and 1.0% mean IoU improvement. On the Raabin-WBC dataset, the AAC module integration showed minor improvements in both metrics. The AAC component effectively enhanced the model's feature representation capabilities across diverse datasets by incorporating attention mechanisms that helped the network focus on the most relevant image regions while suppressing noise and irrelevant information. The attention mechanism's ability to establish global contextual relationships among features proves particularly valuable in segmenting white blood cells with complex morphologies.
### 4.7.2. Gating Module Significance

The gating module was designed to adaptively control information flow through the network, allowing it to filter irrelevant information and focus on the features most critical for accurate segmentation. As Table 6 shows, when the gating module was implemented alone with the base architecture (Gating+Base), it exhibited varying degrees of improvement across different datasets. On the SegPC-2021 dataset, the gating module marginally decreased performance compared with the baseline, with a 0.8% drop in the DSC and a 0.32% decrease in the mean IoU. However, on other datasets, the gating module demonstrated positive contributions. For the Cropped SegPC-2021 dataset, incorporating the gating module resulted in a 6.8% increase in the DSC and a substantial 14.0% improvement in the mean intersection over union (IoU). On the JTSC dataset, incorporating the gating module showed minor improvement in the DSC and a 1.3% improvement in the mean IoU. On the CellaVision dataset, our model showed minor improvement when the gating module was used, with a slight increase in the DSC and mean IoU scales. For the Raabin-WBC dataset, the integration of the gating module resulted in DSC and mean IoU values that were nearly identical to those of the baseline, indicating only minimal differences. Notably, while the gating module alone showed mixed results, its true potential was realized when combined with the AAC strategy in the full GAAD-U-Net architecture. This suggests that the gating module's adaptive feature filtering capabilities complement the AAC's attention mechanism. To this end, gating is able to create a synergistic effect that enhances overall performance beyond what either component can achieve independently. The gating module appeared to be particularly effective on datasets with complex backgrounds and cellular morphologies, where controlling information flow becomes crucial for accurate segmentation.

<table><caption>**Table 6.** Ablation study on performance metrics across five datasets for different model variations: Base, AAC+Base, Gating+Base, and GAAD-U-Net. The best results for each dataset are highlighted in **bold**.</caption><thead><tr><th>Dataset</th><th>Metric</th><th>Base</th><th>Base+AAC</th><th>Base+Gating</th><th>Base+AAC+Gating</th></tr></thead><tbody><tr><td rowspan="3">SegPC-2021</td><td>Accuracy</td><td>0.9370</td><td>0.9470</td><td>0.9320</td><td><strong>0.9597</strong></td></tr><tr><td>DSC</td><td>0.8580</td><td>0.8780</td><td>0.8509</td><td><strong>0.9011</strong></td></tr><tr><td>Mean IoU</td><td>0.7630</td><td>0.7824</td><td>0.7598</td><td><strong>0.8301</strong></td></tr><tr><td rowspan="3">Cropped SegPC-2021</td><td>Accuracy</td><td>0.9470</td><td>0.9722</td><td>0.9722</td><td><strong>0.9852</strong></td></tr><tr><td>DSC</td><td>0.8980</td><td>0.9585</td><td>0.9587</td><td><strong>0.9614</strong></td></tr><tr><td>Mean IoU</td><td>0.7991</td><td>0.9112</td><td>0.9112</td><td><strong>0.9330</strong></td></tr><tr><td rowspan="3">JTSC</td><td>Accuracy</td><td>0.9285</td><td>0.9831</td><td>0.9300</td><td><strong>0.9832</strong></td></tr><tr><td>DSC</td><td>0.9621</td><td>0.9713</td><td>0.9646</td><td><strong>0.9714</strong></td></tr><tr><td>Mean IoU</td><td>0.9319</td><td>0.9645</td><td>0.9444</td><td><strong>0.9674</strong></td></tr><tr><td rowspan="3">CellaVision</td><td>Accuracy</td><td>0.9792</td><td><strong>0.9845</strong></td><td>0.9792</td><td>0.9830</td></tr><tr><td>DSC</td><td>0.9495</td><td><strong>0.9611</strong></td><td>0.9496</td><td>0.9589</td></tr><tr><td>Mean IoU</td><td>0.9096</td><td>0.9189</td><td>0.9100</td><td><strong>0.9214</strong></td></tr><tr><td rowspan="3">Raabin-WBC</td><td>Accuracy</td><td>0.9843</td><td>0.9870</td><td>0.9851</td><td><strong>0.9884</strong></td></tr><tr><td>DSC</td><td>0.9091</td><td>0.9112</td><td>0.9088</td><td><strong>0.9119</strong></td></tr><tr><td>Mean IoU</td><td>0.8832</td><td>0.8846</td><td>0.8822</td><td><strong>0.8885</strong></td></tr></tbody></table>

## 5. Discussion

Many deep learning segmentation methods were used in the field of medical imaging, including microscopic images and WBC images. The encoder-decoder U-Net [19] architecture is well known for this task, allowing the fusion of low-level to high-level semantic information through skip connections. Double-U-Net [22], as its name suggests, is one of its variants that utilizes two U-Nets to refine the initial segmentation through a second
phase. Our approach employs attention-augmented convolution in both U-Nets to retain as much global and local salient information as possible within the image and then refine it with a gating module before feeding the output to the ASPP module, which focuses on extracting refined information from different scales. Furthermore, our work highlighted the impact of the AAC module and the gating module on the performance using the DSC and IoU metrics stated in Table 6.

The experimental results, as shown in the tables, indicate that the GAAD-U-Net model achieved good performance due to the integration of AAC, as it extends the traditional Double U-Net [22] receptive field, thereby augmenting its ability to capture global information. In addition, Table 6 shows that when the sole use of the gating module with the traditional Double U-Net architecture did not yield a significant improvement, its true potential was observed when combined with the AAC strategy in the full GAAD-U-Net architecture. This suggests that the gating module's adaptive feature filtering capabilities complement the AAC's attention mechanism. Based on this, gating is able to create a synergistic effect that enhances overall performance beyond what either component can achieve independently. The gating module appeared to be particularly effective on datasets with complex backgrounds and cellular morphologies, where controlling information flow becomes crucial for accurate segmentation.

To further illustrate the improvement of the GAAD-U-Net model in WBC image segmentation, we present a visual comparison of the results of all models for challenging images that displayed individual cells and multiple cells in a single image, as shown in Figure 8. The qualitative results demonstrate that our proposed model generated segmentation masks that more effectively captured foreground details in low-quality images, such as those with incomplete staining or obscurity, compared with other state-of-the-art methods. However, our model struggled in some complex scenarios that contained multiple targets or extremely intricate details, as shown in Figure 9. In summary, our model demonstrated superior performance in white blood cell segmentation, accurately capturing cell boundaries and achieving an average improvement of 1.4% in the DSC and 1.7% in the mIoU, Dice, and IoU scores compared with other state-of-the-art segmentation methods. Our model achieved superior accuracy and better boundary delineation than existing methods, establishing a new benchmark in the field of WBC image segmentation.

<figure><img src="image_11.png" /><figcaption>**Figure 9.** Failure cases where GAAD-U-Net struggled to segment the target WBC in images across five different WBC image segmentation datasets. Failure regions are bounded inside yellow boxes. Nuclei and cytoplasm are shown in blue/white and red/grey.</figcaption></figure>
# 6. Conclusions

In this work, we introduced GAAD-U-Net, a novel architecture for WBC segmentation that builds upon a double encoder-decoder (Double U-Net) framework. Our approach integrates AAC blocks with a gating module at the bottleneck of both encoder-decoder branches, enabling the network to capture rich local and global contextual features while filtering out irrelevant information. This design improves the delineation of complex structures, particularly excelling in the segmentation of the cytoplasm, a challenging task due to the subtle intensity variations and a smear-like appearance in microscopic images.

Extensive evaluations across five diverse datasets demonstrated that GAAD-U-Net achieved superior performance compared with current state-of-the-art methods, as evidenced by significant improvements in the DSC and IoU metrics. Our model robustly handled individual cropped WBCs and images containing multiple cells, underscoring its versatility and potential for broad clinical application.

However, these performance gains come at the cost of a higher parameter count and increased computational complexity, which may result in slower inference speeds and pose challenges in resource-constrained environments. Future work will focus on optimizing the architecture through model compression techniques and adaptive attention strategies, aiming to reduce computational overhead while preserving or even enhancing segmentation accuracy. This detailed exploration not only highlights the strengths of GAAD-U-Net but also outlines clear avenues for further refinement, paving the way for its practical deployment in clinical settings.

**Author Contributions:** Conceptualization, I.B., A.Z., A.C.M. and C.D.; methodology, I.B. and A.T.-A.; software, I.B.; validation, I.B., S.S. and N.A.; formal analysis, I.B.; investigation, I.B. and A.Z.S.; resources, C.D.; data curation, I.B.; writing—original draft preparation, I.B., N.A., C.D. and A.Z.S.; writing—review and editing, I.B., A.T.-A. and C.D.; visualization, I.B.; supervision, A.Z. and A.T.-A.; project administration, A.Z. and C.D.; funding acquisition, C.D. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** The study was conducted in accordance with the Declaration of Helsinki, and ethical review and approval were waived for this study due to the data used were obtained from the public databases.

**Informed Consent Statement:** Patient consent was waived due to the data used were obtained from the public databases.

**Data Availability Statement:** All datasets utilized in this study are publicly available and originate from previously published, ethically approved sources. No new human or animal data were collected or generated for this research. **SegPC-2021 Dataset:** Provided by the IEEE VIP Cup 2021 challenge, this dataset is publicly accessible under the challenge's open-access terms of use, and it was employed in full compliance with its licensing conditions. The modified SegPC-2021 (cropped) dataset used in this work was derived from the publicly available version of the dataset, and no additional human subject information was introduced or modified. **Raabin-WBC Dataset:** The Raabin-WBC dataset is an open-source dataset released by Raabin Lab (Tehran, Iran) under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). All images were fully anonymized prior to release. **CellaVision and JTSC Datasets:** These datasets are publicly available, and they were used solely for non-commercial research purposes. All images were de-identified, containing no personally identifiable or sensitive patient information.

**Acknowledgments:** The authors thank Arturo Argentieri from the CNR-ISASI unit of Lecce (Italy) for his technical contribution to the multi-GPU computing facilities.

**Conflicts of Interest:** The authors declare no conflicts of interest.
## Appendix A. Architecture

Table A1 details each stage of the proposed dual-path encoder-decoder architecture. The input tensor has a shape [4, 3, 224, 224] (batch of four RGB images). The first encoder path is based on VGG-19 blocks, progressively increasing the channel depth from 64 up to 512 and reducing the spatial resolution accordingly. Each subsequent AAC, gating, and ASPP module further processes the feature maps at [4, 512, 28, 28]. (ASPP expands channels to 1024) Decoder1 then upsamples the output back to the original resolution, producing an intermediate result. A matrix multiplication layer merges the encoder and the previous output, feeding into the second encoder-decoder path (blocks marked with "*" reuse weights). Finally, Decoder2 reconstructs the full-resolution prediction. The "Parameters" column lists the trainable weights in each block, illustrating the model's complexity at each stage.

<table><caption>**Table A1.** Proposed architecture details with output tensor sizes and trainable block parameters.</caption><thead><tr><th>Block</th><th>Tensor Size</th><th>Parameters</th></tr></thead><tbody><tr><td>Input</td><td>[4, 3, 224, 224]</td><td>-</td></tr><tr><td>VGG19_block1</td><td>[4, 64, 224, 224]</td><td>38,720</td></tr><tr><td>VGG19_block2</td><td>[4, 128, 112, 112]</td><td>221,440</td></tr><tr><td>VGG19_block3</td><td>[4, 256, 56, 56]</td><td>2,065,408</td></tr><tr><td>VGG19_block4</td><td>[4, 512, 28, 28]</td><td>8,259,584</td></tr><tr><td>AAC</td><td>[4, 512, 28, 28]</td><td>2,656,720</td></tr><tr><td>Gating Module</td><td>[4, 512, 28, 28]</td><td>263,424</td></tr><tr><td>ASPP</td><td>[4, 1024, 28, 28]</td><td>20,453,376</td></tr><tr><td>Decoder1_block1</td><td>[4, 512, 28, 28]</td><td>9,177,600</td></tr><tr><td>Decoder1_block2</td><td>[4, 256, 56, 56]</td><td>2,295,040</td></tr><tr><td>Decoder1_block3</td><td>[4, 128, 112, 112]</td><td>574,080</td></tr><tr><td>Decoder1_block4</td><td>[4, 64, 224, 224]</td><td>143,680</td></tr><tr><td>Output_1</td><td>[4, 3, 224, 224]</td><td>195</td></tr><tr><td>matmul</td><td>[4, 3, 224, 224]</td><td>-</td></tr><tr><td>Encoder2_block1</td><td>[4, 64, 224, 224]</td><td>39,360</td></tr><tr><td>Encoder2_block2</td><td>[4, 128, 112, 112]</td><td>223,744</td></tr><tr><td>Encoder2_block3</td><td>[4, 256, 56, 56]</td><td>893,952</td></tr><tr><td>Encoder2_block4</td><td>[4, 512, 28, 28]</td><td>3,573,760</td></tr><tr><td>AAC *</td><td>[4, 512, 28, 28]</td><td>2,656,720</td></tr><tr><td>Gating Module *</td><td>[4, 512, 28, 28]</td><td>263,424</td></tr><tr><td>ASPP *</td><td>[4, 1024, 28, 28]</td><td>20,453,376</td></tr><tr><td>Decoder2_block1</td><td>[4, 512, 28, 28]</td><td>11,569,664</td></tr><tr><td>Decoder2_block2</td><td>[4, 256, 56, 56]</td><td>2,893,056</td></tr><tr><td>Decoder2_block3</td><td>[4, 128, 112, 112]</td><td>723,584</td></tr><tr><td>Decoder2_block4</td><td>[4, 64, 224, 224]</td><td>181,056</td></tr><tr><td>Final_output</td><td>[4, 3, 224, 224]</td><td>195</td></tr></tbody></table>

## Appendix B. Dataset

Table A2 outlines the data splits for the WBC segmentation datasets used in this study. Each dataset was divided into training, validation, and test subsets, with the total number of images also reported. For some datasets, such as CellaVision and JTSC, only training and test splits were provided, as no dedicated validation set was used. Notably, Cropped SepPC-2021 represents an augmented version of SepPC-2021 with significantly more samples. These diverse datasets support a comprehensive evaluation of model performance across different WBC imaging conditions and annotation styles.

<footnote>* Reused block.</footnote>
<table><caption>**Table A2.** Study WBC segmentation datasets protocol.</caption><thead><tr><th>Dataset</th><th>Train</th><th>Val</th><th>Test</th><th>Total</th><th>Input Size</th><th>Augmentations</th><th>Links</th></tr></thead><tbody><tr><td>SegPC-2021</td><td>360</td><td>89</td><td>49</td><td>493</td><td>512 × 512</td><td>Horizontal flip<br>Rotation<br>Cutout<br>probability = 0.25<br>Horizontal flip<br>Vertical flip</td><td>https://www.kaggle.com/datasets/sbilab/segpc2021dataset (accessed on: 20 April 2025)</td></tr><tr><td>Cropped SegPC-2021</td><td>1843</td><td>263</td><td>527</td><td>2633</td><td>224 × 224</td><td>Scaling<br>probability = 0.5<br>Vertical flip<br>Horizontal flip</td><td>https://www.kaggle.com/datasets/sbilab/segpc2021dataset (accessed on: 20 April 2025)</td></tr><tr><td>CellaVision</td><td>75</td><td>-</td><td>25</td><td>100</td><td>224 × 224</td><td>Rotation<br>Gaussian noise<br>Brightness alteration<br>probability = 0.5<br>Vertical flip<br>Horizontal flip</td><td>https://github.com/zxaoyou/segmentation_WBC (accessed on: 20 April 2025)</td></tr><tr><td>JTSC</td><td>225</td><td>-</td><td>75</td><td>300</td><td>224 × 224</td><td>Rotation<br>Gaussian noise<br>Brightness alteration<br>probability = 0.5<br>Vertical flip<br>Horizontal flip</td><td>https://github.com/zxaoyou/segmentation_WBC (accessed on: 20 April 2025)</td></tr><tr><td>Raabin-WBC</td><td>800</td><td>112</td><td>233</td><td>1145</td><td>224 × 224</td><td>Rotation<br>Gaussian noise<br>Brightness alteration<br>probability = 0.5</td><td>https://raabindata.com/ (accessed on: 20 April 2025)</td></tr></tbody></table>

## Appendix C. Hyperparameter

Table A3b summarizes the hyperparameters used to optimize the model in this study. These parameters were determined based on recent studies on this topic.

<table><caption>**Table A3.** Configuration parameters for the model.</caption><tbody><tr><td colspan="2">(a) AAC Module Parameters.</td></tr><tr><td>Parameter</td><td>Value</td></tr><tr><td>In Channels</td><td>512</td></tr><tr><td>Out Channels</td><td>512</td></tr><tr><td>Kernel Size</td><td>3</td></tr><tr><td>Attention Key Dim.</td><td>32</td></tr><tr><td>Value Key Dim.</td><td>32</td></tr><tr><td>Number of Heads</td><td>4</td></tr><tr><td>Relative</td><td>True</td></tr><tr><td>Stride</td><td>1</td></tr><tr><td>Shape</td><td>28</td></tr><tr><td colspan="2">(b) Hyperparameter Settings.</td></tr><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epochs</td><td>100 (150 for segPC-2021)</td></tr><tr><td>Batch Size</td><td>4</td></tr><tr><td>Optimizer</td><td>Adam Optimizer</td></tr><tr><td>Initial Learning Rate</td><td>1 × 10<sup>-4</sup></td></tr><tr><td>Weight Decay</td><td>1 × 10<sup>-4</sup></td></tr><tr><td>Momentum</td><td>0.9</td></tr><tr><td>Gamma</td><td>0.5</td></tr></tbody></table>

Table A3a summarizes the configuration parameters used in the AAC module. The module operates with 512 input and output channels, employing a convolution kernel with a size of three. It incorporates an attention mechanism with four heads, where both the attention key and value dimensions are set to 32. Relative positional encoding is enabled, and the convolution stride is set to one. The feature map shape processed by the module is 28 × 28.
## Appendix D. Computational Profile

Table A4 presents a concise computational profile of the GAAD-U-Net architecture, evaluated on an RTX 3060 GPU using the THOP profiler. It details the kernel sizes, channel widths, parameter counts, per-image GFLOPs, peak VRAM usage, and latency for each encoder and decoder stage across both phases. With a total latency of 189.57 ms, 89,621,024 parameters, and a peak VRAM of 1801.8 MB, the model's good performance is accompanied by a significant latency, reflecting the trade-off inherent in its complex, multi-stage design for enhanced feature refinement.

<table><caption>**Table A4.** Computational profile of GAAD-U-Net on RTX 3060.</caption><thead><tr><th>Stage</th><th>Kernel Sizes</th><th>Channels</th><th>Params</th><th>GFLOPs</th><th>VRAM (MB)</th><th>Latency (ms)</th></tr></thead><tbody><tr><td>Phase1<br>Encoder1<br>VGG1</td><td>3 × 3</td><td>3 → 64</td><td>38,720</td><td>10.12</td><td>1417.7</td><td>6.54</td></tr><tr><td>Phase1<br>Encoder1<br>VGG2</td><td>3 × 3</td><td>64 → 128</td><td>221,440</td><td>14.50</td><td>1385.9</td><td>6.40</td></tr><tr><td>Phase1<br>Encoder1<br>VGG3</td><td>3 × 3</td><td>128 → 256</td><td>2,065,408</td><td>33.82</td><td>1339.6</td><td>12.41</td></tr><tr><td>Phase1<br>Encoder1<br>VGG4</td><td>3 × 3</td><td>256 → 512</td><td>8,259,584</td><td>33.82</td><td>1323.4</td><td>12.56</td></tr><tr><td>Phase1 AAC1</td><td>3 × 3</td><td>512 → 512</td><td>2,656,848</td><td>2.72</td><td>1358.0</td><td>2.62</td></tr><tr><td>Phase1 Gating1</td><td>1 × 1</td><td>512 → 512</td><td>263,424</td><td>0.27</td><td>1293.3</td><td>0.48</td></tr><tr><td>Phase1 ASPP1</td><td>1 × 1, 3 × 3,<br>3 × 3, 1 × 1</td><td>512 → 1024</td><td>20,453,376</td><td>20.41</td><td>1334.4</td><td>7.93</td></tr><tr><td>Phase1<br>Decoder1<br>Block1</td><td>2 × 2 (up),<br>3 × 3, 1 × 1</td><td>1024 → 512</td><td>9,177,600</td><td>15.84</td><td>1321.4</td><td>4.14</td></tr><tr><td>Phase1<br>Decoder1<br>Block2</td><td>2 × 2 (up),<br>3 × 3, 1 × 1</td><td>512 → 256</td><td>2,295,040</td><td>31.17</td><td>1389.9</td><td>11.00</td></tr><tr><td>Phase1<br>Decoder1<br>Block3</td><td>2 × 2 (up),<br>3 × 3, 1 × 1</td><td>256 → 128</td><td>574,080</td><td>37.65</td><td>1578.5</td><td>13.91</td></tr><tr><td>Phase1<br>Decoder1<br>Block4</td><td>2 × 2 (up),<br>3 × 3, 1 × 1</td><td>128 → 64</td><td>143,680</td><td>37.72</td><td>1673.6</td><td>19.62</td></tr><tr><td>Phase1 output</td><td>1 × 1</td><td>64 → 3</td><td>195</td><td>0.00</td><td>50</td><td>0.01</td></tr><tr><td>Phase2<br>Encoder2<br>Block1</td><td>3 × 3</td><td>3 → 64</td><td>39,360</td><td>10.27</td><td>1417.7</td><td>8.03</td></tr><tr><td>Phase2<br>Encoder2<br>Block2</td><td>3 × 3</td><td>64 → 128</td><td>223,744</td><td>14.57</td><td>1401.9</td><td>5.64</td></tr><tr><td>Phase2<br>Encoder2<br>Block3</td><td>3 × 3</td><td>128 → 256</td><td>893,952</td><td>14.53</td><td>1348.6</td><td>5.33</td></tr><tr><td>Phase2<br>Encoder2<br>Block4</td><td>3 × 3</td><td>256 → 512</td><td>3,573,760</td><td>14.51</td><td>1326.4</td><td>3.12</td></tr></tbody></table>
<table><caption>**Table A4.** *Cont.*</caption><thead><tr><th>Stage</th><th>Kernel Sizes</th><th>Channels</th><th>Params</th><th>GFLOPs</th><th>VRAM (MB)</th><th>Latency (ms)</th></tr></thead><tbody><tr><td>Phase2 AAC2</td><td>3 × 3</td><td>512 → 512</td><td>2,656,848</td><td>2.72</td><td>1358.0</td><td>2.81</td></tr><tr><td>Phase2 Gating2</td><td>1 × 1</td><td>512 → 512</td><td>263,424</td><td>0.27</td><td>1293.3</td><td>0.27</td></tr><tr><td>Phase2 ASPP2</td><td>1 × 1, 3 × 3,<br>3 × 3, 1 × 1</td><td>512 → 1024</td><td>20,453,376</td><td>20.41</td><td>1334.4</td><td>8.20</td></tr><tr><td>Phase2<br>Decoder2<br>Block1</td><td>2 × 2 (up),<br>3 × 3, 1 × 1</td><td>1024 → 512</td><td>11,569,664</td><td>18.26</td><td>1334.4</td><td>5.31</td></tr><tr><td>Phase2<br>Decoder2<br>Block2</td><td>2 × 2 (up),<br>3 × 3, 1 × 1</td><td>512 → 256</td><td>2,893,056</td><td>40.84</td><td>1440.1</td><td>13.79</td></tr><tr><td>Phase2<br>Decoder2<br>Block3</td><td>2 × 2 (up),<br>3 × 3, 1 × 1</td><td>256 → 128</td><td>723,584</td><td>47.32</td><td>1707.3</td><td>18.02</td></tr><tr><td>Phase2<br>Decoder2<br>Block4</td><td>2 × 2 (up),<br>3 × 3, 1 × 1</td><td>128 → 64</td><td>181,056</td><td>47.40</td><td>1801.8</td><td>21.44</td></tr><tr><td>Final output</td><td>1 × 1</td><td>64 → 3</td><td>195</td><td>0.00</td><td>50</td><td>0.01</td></tr><tr><td>Total/Peak</td><td>-</td><td>-</td><td>89,621,024</td><td>469.14</td><td>1801.8</td><td>189.57</td></tr></tbody></table>

In our comparative evaluation of the resolution pipeline presented in Table A5, we observed a pronounced throughput escalation from 9.15 to 28.98 images per second and a commensurate latency reduction from 109.34 to 34.51 ms per image when downsampling from 512 × 512 to 224 × 224, underscoring the quadratic sensitivity of convolutional architectures to spatial dimensionality. Augmentation emerged as the dominant bottleneck at higher resolutions (550.73 ms vs. 103.86 ms per sample), attributable to pixel-intensive transformations, while inference scaled subquadratically (190.83 ms vs. 66.48 ms) due to memory-bound feature propagation; both eclipsed negligible overheads like batch loading. For real-world application, it is necessary to navigate a quintessential accuracy-efficiency dialectic, privileging 512 × 512 for granular semantic fidelity in offline regimes yet favoring 224 × 224 for real-time viability, potentially augmented by multi-scale ensembles to temper representational losses.

<table><caption>**Table A5.** Pipeline step timing comparison between 224 × 224 and 512 × 512 image sizes.</caption><thead><tr><th>Pipeline</th><th>Time (ms) 512 × 512</th><th>Time (ms) 224 × 224</th></tr></thead><tbody><tr><td>Augmentation time per sample</td><td>550.73</td><td>103.86</td></tr><tr><td>Initialization and checkpoint loading</td><td>1400.13</td><td>1399.34</td></tr><tr><td>GPU batch loading time</td><td>1.85 (batch of 4)</td><td>1.42 (batch of 16)</td></tr><tr><td>Inference</td><td>190.83</td><td>66.48</td></tr><tr><td>Throughput</td><td>9.15 images/second</td><td>28.98 images/second</td></tr><tr><td>Average latency</td><td>179.34 ms per image</td><td>64.51 ms per image</td></tr></tbody></table>

## Appendix E. Extended Ablation Study

The ablation study shown in Table A6 examined head depth sweeps of 1, 2, 4, 8, and 16 with mean ±95% confidence intervals of the DSC and IoU computed across all five datasets. The results reveal that increasing the number of attention heads in the GAAD-U-Net architecture did not necessarily enhance the model's segmentation performance for WBCs. Employing 16 heads, which processed the largest feature map expansions, exhibited a
decline in performance compared with configurations with fewer heads in some cases, such as a sharp drop to a 0.6444 DSC in Cropped SegPC-2021 and a reduction to a 0.9000 DSC in the CellaVision dataset. This aligns with established insights that excessive heads in multi-head attention mechanisms can introduce redundancy and overfitting. In contrast, projections with moderate head counts preserved the granular boundary details critical for accurate WBC delineation. While dataset-specific analyses indicated that Raabin-WBC benefited more from eight heads (0.9169 DSC), the four-head configuration yielded superior mean IoU and Dice scores in datasets like SegPC-2021 (0.9011 DSC) and Cropped SegPC-2021 (0.9614 DSC). Overall, four-head attention outperformed the others in aggregated metrics for Cropped SegPC-2021 and SegPC-2021 and maintained moderate results across the rest dataset. while JTSC showed stable high performance across all configurations, nearing a 0.97 DSC, leading four-head attention to achieve the optimal balance, delivering the highest cross-dataset performance.

<table><caption>**Table A6.** Ablation study on the number of AAC heads across five WBC datasets. Metrics are reported as DSC and IoU with 95% confidence intervals.</caption><thead><tr><th rowspan="2">Dataset</th><th rowspan="2">Metric</th><th colspan="3">1 Head</th><th colspan="3">2 Heads</th><th colspan="3">4 Heads</th><th colspan="3">8 Heads</th><th colspan="3">16 Heads</th></tr><tr><th>Mean</th><th>Lower</th><th>Upper</th><th>Mean</th><th>Lower</th><th>Upper</th><th>Mean</th><th>Lower</th><th>Upper</th><th>Mean</th><th>Lower</th><th>Upper</th><th>Mean</th><th>Lower</th><th>Upper</th></tr></thead><tbody><tr><td rowspan="2">Cropped SegPC-2021</td><td>DSC (%)</td><td>0.9607</td><td>0.9578</td><td>0.9635</td><td>0.9594</td><td>0.9574</td><td>0.9621</td><td>0.9614</td><td>0.9534</td><td>0.9694</td><td>0.8884</td><td>0.8786</td><td>0.8981</td><td>0.6444</td><td>0.6197</td><td>0.6690</td></tr><tr><td>IoU (%)</td><td>0.9257</td><td>0.9205</td><td>0.9308</td><td>0.9323</td><td>0.9279</td><td>0.9366</td><td>0.9330</td><td>0.9229</td><td>0.9431</td><td>0.7333</td><td>0.7221</td><td>0.7444</td><td>0.5343</td><td>0.5170</td><td>0.5516</td></tr><tr><td rowspan="2">SegPC-2021</td><td>DSC (%)</td><td>0.8862</td><td>0.8615</td><td>0.9109</td><td>0.8890</td><td>0.8632</td><td>0.9149</td><td>0.9011</td><td>0.8761</td><td>0.9261</td><td>0.8790</td><td>0.8571</td><td>0.9109</td><td>0.8849</td><td>0.8581</td><td>0.9116</td></tr><tr><td>IoU (%)</td><td>0.8044</td><td>0.7646</td><td>0.8442</td><td>0.8198</td><td>0.7686</td><td>0.8509</td><td>0.8301</td><td>0.7964</td><td>0.8638</td><td>0.8023</td><td>0.7599</td><td>0.8446</td><td>0.8035</td><td>0.7614</td><td>0.8455</td></tr><tr><td rowspan="2">CellaVision</td><td>DSC (%)</td><td>0.8914</td><td>0.8532</td><td>0.9295</td><td>0.9136</td><td>0.8936</td><td>0.8936</td><td>0.9589</td><td>0.9564</td><td>0.9614</td><td>0.9515</td><td>0.9490</td><td>0.9540</td><td>0.9251</td><td>0.9156</td><td>0.9346</td></tr><tr><td>IoU (%)</td><td>0.8143</td><td>0.7566</td><td>0.8721</td><td>0.8500</td><td>0.8320</td><td>0.8680</td><td>0.9214</td><td>0.9158</td><td>0.9270</td><td>0.9282</td><td>0.9226</td><td>0.9338</td><td>0.8714</td><td>0.8594</td><td>0.8834</td></tr><tr><td rowspan="2">JTSC</td><td>DSC (%)</td><td>0.9695</td><td>0.9640</td><td>0.9749</td><td>0.9712</td><td>0.9662</td><td>0.9764</td><td>0.9714</td><td>0.9689</td><td>0.9739</td><td>0.9719</td><td>0.9668</td><td>0.9770</td><td>0.9720</td><td>0.9671</td><td>0.9770</td></tr><tr><td>IoU (%)</td><td>0.9415</td><td>0.9314</td><td>0.9516</td><td>0.9449</td><td>0.9354</td><td>0.9543</td><td>0.9674</td><td>0.9618</td><td>0.9730</td><td>0.9460</td><td>0.9365</td><td>0.9556</td><td>0.9462</td><td>0.9369</td><td>0.9556</td></tr><tr><td rowspan="2">Raabin-WBC</td><td>DSC (%)</td><td>0.8643</td><td>0.8618</td><td>0.8668</td><td>0.9002</td><td>0.8972</td><td>0.9032</td><td>0.9119</td><td>0.9099</td><td>0.9139</td><td>0.9170</td><td>0.9144</td><td>0.9194</td><td>0.9152</td><td>0.9128</td><td>0.9176</td></tr><tr><td>IoU (%)</td><td>0.7886</td><td>0.7830</td><td>0.7942</td><td>0.8795</td><td>0.8740</td><td>0.8850</td><td>0.8873</td><td>0.8804</td><td>0.8967</td><td>0.8988</td><td>0.8944</td><td>0.9032</td><td>0.8911</td><td>0.8865</td><td>0.8957</td></tr></tbody></table>

Table A7 presents the evaluation of AAC integration in GAAD-U-Net phases. Being configured with AAC in Phase 1, Phase 2, or both outperformed the baseline (no AAC), confirming attention enhancements for a cell's delineation. Dual-phase AAC achieved peak performance (>0.90 DSC and IoU on most datasets), leveraging synergy for spatial refinement and semantic stability. Phase 1 excelled on variable morphology datasets like Cropped SegPC-2021 (0.9620 DSC, 0.9755 IoU) and Raabin-WBC (0.9124 DSC, 0.9008 IoU), and AAC in both phases did not yield superior results on these two datasets as the additional Phase 2 attention may have introduced redundancy or over-processing, potentially interfering with the optimal feature representations already established in Phase 1 for these specific dataset characteristics. Nonetheless, AAC demonstrated robust performance across all configurations, particularly when integrated in both phases, underscoring its efficacy for WBC segmentation tasks.

<table><caption>**Table A7.** Ablation study for AAC integration for Phase 1 and Phase 2 in GAAD-U-Net architecture. Entries marked with ✓ indicate AAC application in the respective phase, while ✗ marks indicate its absence. Reported metrics are mean DSC and mean IoU across five WBC datasets, where bold values highlight highest results.</caption><thead><tr><th rowspan="2">Phase 1</th><th rowspan="2">Phase 2</th><th colspan="2">SegPC-2021</th><th colspan="2">Cropped SegPC-2021</th><th colspan="2">CellaVision</th><th colspan="2">JTSC</th><th colspan="2">Raabin-WBC</th></tr><tr><th>DSC</th><th>IoU</th><th>DSC</th><th>IoU</th><th>DSC</th><th>IoU</th><th>DSC</th><th>IoU</th><th>DSC</th><th>IoU</th></tr></thead><tbody><tr><td>✗</td><td>✗</td><td>0.8580</td><td>0.7630</td><td>0.8980</td><td>0.7991</td><td>0.9495</td><td>0.9096</td><td>0.9621</td><td>0.9319</td><td>0.9091</td><td>0.8832</td></tr><tr><td>✓</td><td>✗</td><td>0.8796</td><td>0.7966</td><td><strong>0.9620</strong></td><td><strong>0.9755</strong></td><td>0.9523</td><td>0.9129</td><td>0.9672</td><td>0.9526</td><td><strong>0.9124</strong></td><td><strong>0.9008</strong></td></tr><tr><td>✗</td><td>✓</td><td>0.8807</td><td>0.8054</td><td>0.9589</td><td>0.9733</td><td>0.9542</td><td>0.9155</td><td>0.9630</td><td>0.9437</td><td>0.9099</td><td>0.8844</td></tr><tr><td>✓</td><td>✓</td><td><strong>0.9011</strong></td><td><strong>0.8301</strong></td><td>0.9614</td><td>0.9740</td><td><strong>0.9589</strong></td><td><strong>0.9214</strong></td><td><strong>0.9714</strong></td><td><strong>0.9674</strong></td><td>0.9119</td><td>0.8885</td></tr></tbody></table>
# Appendix F. Generalization Tests

## Appendix F.1. Cross-Dataset Evaluation

For explicit cross-dataset generalization evaluation, our leave-one-out evaluation across five WBC datasets (Table A8) revealed a cross-DSC averaging 32–41% for the models and a 56–68% retention loss from the peak potential, which highlights the domain gaps in staining and scale. DCSAU-Net trailed at a 32% average cross-DSC (34% retention), with its dilated convolutional blocks and spatial attention modules faltering in Cellavision-to-whole-SegPC shifts (0.3% DSC and just 0.3% retention) as the attention failed to suppress smear-wide debris, amplifying noise in dense regions. GA2Net improved to a 38% cross-DSC (40% retention), where it achieved high scores on JTSC tests (76% DSC from Cropped SegPC training with 82% retention) due to the spatial gates suppressing multi-scale backgrounds, but it collapsed to 73% on the whole-smear transfers from cropped sources (24% DSC) due to overreliance on isolated-cell foreground priors. Our GAAD-U-Net topped out at a 41% cross-DSC (44% retention), surging 28% over the baselines on Raabin-WBC to Cellavision (78% DSC, 83% retention) via AAC integration in the phases’ bottleneck, which sharpened ambiguous boundaries, while the gating mechanism preserved 65% of the cropped gains over the whole-smear contrasts. This validates its anomaly-handling blocks for clinical shifts, priming a 10–15% uplift with scale adaptations.

<table><caption>**Table A8.** Cross-dataset generalization evaluation on different WBC datasets. Best scores are in **bold**, and in-domain results were not considered.</caption><thead><tr><th rowspan="2">Model</th><th rowspan="2">Train Dataset</th><th colspan="2">Test: SegPC-2021</th><th colspan="2">Test: Cropped SegPC-2021</th><th colspan="2">Test: Cellavision</th><th colspan="2">Test: JTSC</th><th colspan="2">Test: Raabin-WBC</th></tr><tr><th>DSC</th><th>IoU</th><th>DSC</th><th>IoU</th><th>DSC</th><th>IoU</th><th>DSC</th><th>IoU</th><th>DSC</th><th>IoU</th></tr></thead><tbody><tr><td rowspan="5">DCSAU-Net</td><td>SegPC-2021</td><td>0.8860</td><td>0.8060</td><td>0.2689</td><td>0.2056</td><td>0.2990</td><td>0.2638</td><td>0.3050</td><td>0.2509</td><td>0.3033</td><td>0.2778</td></tr><tr><td>Cropped SegPC-2021</td><td>0.1546</td><td>0.1170</td><td>0.8860</td><td>0.8060</td><td>0.3931</td><td>0.3310</td><td>0.4206</td><td>0.3250</td><td>0.4875</td><td>0.4167</td></tr><tr><td>Cellavision</td><td>0.0031</td><td>0.0025</td><td>0.1889</td><td>0.1206</td><td>0.9460</td><td>0.9018</td><td>0.3390</td><td>0.2569</td><td>0.5521</td><td>0.4632</td></tr><tr><td>JTSC</td><td><strong>0.0578</strong></td><td><strong>0.0349</strong></td><td>0.6722</td><td>0.5344</td><td>0.3362</td><td>0.2790</td><td>0.9592</td><td>0.9235</td><td>0.3678</td><td>0.3214</td></tr><tr><td>Raabin-WBC</td><td>0.0475</td><td>0.0204</td><td>0.5330</td><td>0.4451</td><td>0.5567</td><td>0.4697</td><td>0.3563</td><td>0.2979</td><td>0.9102</td><td>0.8867</td></tr><tr><td rowspan="5">GA2Net</td><td>SegPC-2021</td><td>0.8770</td><td>0.7930</td><td><strong>0.3748</strong></td><td><strong>0.2800</strong></td><td>0.5712</td><td>0.5042</td><td><strong>0.4536</strong></td><td><strong>0.3145</strong></td><td><strong>0.4536</strong></td><td><strong>0.3875</strong></td></tr><tr><td>Cropped SegPC-2021</td><td>0.2437</td><td>0.1838</td><td>0.9274</td><td>0.9254</td><td><strong>0.4383</strong></td><td><strong>0.3582</strong></td><td><strong>0.7649</strong></td><td><strong>0.6611</strong></td><td>0.4304</td><td>0.3754</td></tr><tr><td>Cellavision</td><td>0.0207</td><td>0.0113</td><td>0.2276</td><td>0.1525</td><td>0.8989</td><td>0.8403</td><td><strong>0.4978</strong></td><td><strong>0.4109</strong></td><td>0.6583</td><td>0.5581</td></tr><tr><td>JTSC</td><td>0.0373</td><td>0.0284</td><td>0.5739</td><td>0.4425</td><td><strong>0.3741</strong></td><td><strong>0.3275</strong></td><td>0.9680</td><td>0.9389</td><td>0.3849</td><td>0.3507</td></tr><tr><td>Raabin-WBC</td><td>0.0499</td><td><strong>0.0276</strong></td><td>0.5172</td><td>0.4314</td><td>0.7162</td><td>0.6175</td><td><strong>0.4374</strong></td><td><strong>0.3837</strong></td><td>0.9055</td><td>0.8700</td></tr><tr><td rowspan="5">GAAD-UNet</td><td>SegPC-2021</td><td>0.9011</td><td>0.8301</td><td>0.3397</td><td>0.2444</td><td><strong>0.6059</strong></td><td><strong>0.5376</strong></td><td>0.2719</td><td>0.2299</td><td>0.3024</td><td>0.2769</td></tr><tr><td>Cropped SegPC-2021</td><td><strong>0.2667</strong></td><td><strong>0.1955</strong></td><td>0.9614</td><td>0.9330</td><td>0.4300</td><td>0.3798</td><td>0.7381</td><td>0.6396</td><td><strong>0.4380</strong></td><td><strong>0.3784</strong></td></tr><tr><td>Cellavision</td><td><strong>0.0376</strong></td><td><strong>0.0293</strong></td><td><strong>0.3278</strong></td><td><strong>0.2569</strong></td><td>0.9589</td><td>0.9214</td><td>0.4369</td><td>0.3611</td><td><strong>0.7839</strong></td><td><strong>0.7176</strong></td></tr><tr><td>JTSC</td><td>0.0422</td><td>0.0318</td><td><strong>0.7427</strong></td><td><strong>0.6231</strong></td><td>0.3524</td><td>0.3043</td><td>0.9714</td><td>0.9674</td><td><strong>0.3937</strong></td><td><strong>0.3592</strong></td></tr><tr><td>Raabin-WBC</td><td><strong>0.0513</strong></td><td>0.0265</td><td><strong>0.5408</strong></td><td><strong>0.4574</strong></td><td><strong>0.7822</strong></td><td><strong>0.6881</strong></td><td>0.3575</td><td>0.3060</td><td>0.9119</td><td>0.8885</td></tr></tbody></table>

## Appendix F.2. Scale and Color Sensitivity

We evaluated scale robustness by resizing the SegPC-2021 tests from 300–700 px under subject-exclusive splits, yielding a GAAD-U-Net DSC of 0.88–0.94 (IoU of 0.80–0.92, with +7% overall gain) and proving its efficacy across resolutions. Performance peaks at 700 px (DSC = 0.94, IoU = 0.92) and dipped 6% at 300 px (DSC = 0.88, IoU = 0.80), retaining 94% at 500 px+ (Figure A1). The results indicate that the model is robust to downscaling yet leverages high-resolution detail for improved performance.

To probe stain and intensity robustness, we jittered on a random WBC image from the Cropped SegPC-2012 dataset (±20% contrast, ±30% brightness, +15% over-stain, +25% saturation). The high brightness peaked at a DSC of 0.941 and IoU of 0.892 (+1% gain), while the low brightness dipped to a DSC of 0.900 and IoU of 0.825 (4% drop). Overall, GAAD-U-Net maintained a DSC term over 0.9, proving its robustness under synthetic color jitter and contrast changes. Figure A2 underscores the clinical deployment strength.
<figure><img src="image_12.png" /><figcaption>**Figure A1.** Performance sensitivity for different image scales on SegPC-2021 dataset.</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>**Figure A2.** Performance of GAAD-U-Net under various color and staining conditions. DSC and IoU scores are reported for each condition test.</figcaption></figure>

## Appendix G. Gating Mechanism Evaluation

To validate the selectivity of the gating mechanism, we conducted an ablation study on our architecture, evaluating its effect on the true positive (TP) and false positive (FP) rates. In this context, a reduction in TP s signifies the suppression of valid WBC regions, whereas a decrease in FP s indicates the filtering of irrelevant background areas. The results are presented alongside the prediction masks in Figure A3.

<figure><img src="image_14.png" /><figcaption>**Figure A3.** Gating mechanism pixel suppression test. Nucleus and cytoplasm masks are in blue and red, respectively.</figcaption></figure>

## Appendix H. Fail Cases

Figure A4 illustrates sample cases wherein the GAAD-U-Net architecture exhibited suboptimal performance for WBCs, owing to overlapping structures. This limitation arises from the inherent constraints of semantic segmentation paradigms, which struggle to delineate individual instances within crowded regions. To mitigate this challenge, an
instance segmentation framework could be employed to enhance discriminatory capabilities. Figure A5 depicts WBC images subjected to staining artifacts, wherein our model encountered difficulties attributable to the irregular patterns prevalent in the affected areas. Furthermore, Figure A6 highlights instances of segmentation failure for the cytoplasm class, primarily due to the ambiguous boundaries shared with the background. These latter challenges—namely handling staining variations and resolving boundary ambiguities—may be effectively addressed through domain adaptation techniques, thereby conferring greater robustness to the overall system.

<figure><img src="image_15.png" /><figcaption>**Figure A4.** Samples where GAAD-U-Net struggled in overlapping WBC cases. Nucleus and cytoplasm masks are in blue and red, respectively.</figcaption></figure>

<figure><img src="image_16.png" /><figcaption>**Figure A5.** Samples where GAAD-U-Net struggled in stained WBC images. Nucleus and cytoplasm masks are in blue and red, respectively.</figcaption></figure>

<figure><img src="image_17.png" /><figcaption>**Figure A6.** Samples where GAAD-U-Net failed to segment due to ambiguous cytoplasm boundaries. Nucleus and cytoplasm masks are in blue and red, respectively.</figcaption></figure>
## References

1. 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, Paris, France, 2–3 October 2023; pp. 4015–4026.

2. Ma, J.; He, Y.; Li, F.; Han, L.; You, C.; Wang, B. Segment anything in medical images. *Nat. Commun.* **2024**, *15*, 654. [CrossRef] [PubMed]

3. Madni, H.A.; Umer, R.M.; Zottin, S.; Marr, C.; Foresti, G.L. FL-W3S: Cross-domain federated learning for weakly supervised semantic segmentation of white blood cells. *Int. J. Med. Inform.* **2025**, *195*, 105806. [CrossRef] [PubMed]

4. Sutton, R.T.; Pincock, D.; Baumgart, D.C.; Sadowski, D.C.; Fedorak, R.N.; Kroeker, K.I. An overview of clinical decision support systems: Benefits, risks, and strategies for success. *NPJ Digit. Med.* **2020**, *3*, 17. [CrossRef] [PubMed]

5. Fang, S.; Hong, S.; Li, Q.; Li, P.; Coats, T.; Zou, B.; Kong, G. Cross-modal similar clinical case retrieval using a modular model based on contrastive learning and k-nearest neighbor search. *Int. J. Med. Inform.* **2025**, *193*, 105680. [CrossRef]

6. Zhang, C.; Xiao, X.; Li, X.; Chen, Y.J.; Zhen, W.; Chang, J.; Zheng, C.; Liu, Z. White Blood Cell Segmentation by Color-Space-Based K-Means Clustering. *Sensors* **2014**, *14*, 16128–16147. [CrossRef]

7. Suganyadevi, S.; Seethalakshmi, V.; Balasamy, K. A review on deep learning in medical image analysis. *Int. J. Multimed. Inf. Retr.* **2022**, *11*, 19–38. [CrossRef]

8. Çınar, A.; Tuncer, S.A. Classification of lymphocytes, monocytes, eosinophils, and neutrophils on white blood cells using hybrid Alexnet-GoogleNet-SVM. *SN Appl. Sci.* **2021**, *3*, 503. [CrossRef]

9. Meng, J.; Lu, Y.; He, W.; Fan, X.; Zhou, G.; Wei, H. Leukocyte segmentation based on DenseREU-Net. *J. King Saud Univ.—Comput. Inf. Sci.* **2024**, *36*, 102236. [CrossRef]

10. Putzu, L.; Porcu, S.; Loddo, A. Distributed collaborative machine learning in real-world application scenario: A white blood cell subtypes classification case study. *Image Vis. Comput.* **2025**, *162*, 105673. [CrossRef]

11. Sellam, A.Z.; Benlamoudi, A.; Cid, C.A.; Dobelle, L.; Slama, A.; Hillali, Y.E.; Taleb-Ahmed, A. Deep Learning Solution for Quantification of Fluorescence Particles on a Membrane. *Sensors* **2023**, *23*, 1794. [CrossRef]

12. Escobar, F.I.F.; Alipo-on, J.R.T.; Novia, J.L.U.; Tan, M.J.T.; Abdul Karim, H.; AlDahoul, N. Automated counting of white blood cells in thin blood smear images. *Comput. Electr. Eng.* **2023**, *108*, 108710. [CrossRef]

13. Zhao, M.; Yang, H.; Shi, F.; Zhang, X.; Zhang, Y.; Sun, X.; Wang, H. MSS-WISN: Multiscale Multistaining WBCs Instance Segmentation Network. *IEEE Access* **2022**, *10*, 65598–65610. [CrossRef]

14. Fu, L.; Chen, J.; Zhang, Y.; Huang, X.; Sun, L. CNN and Transformer-based deep learning models for automated white blood cell detection. *Image Vis. Comput.* **2025**, *161*, 105631. [CrossRef]

15. Liu, Y.; Mazumdar, S.; Bath, P.A. An unsupervised learning approach to diagnosing Alzheimer's disease using brain magnetic resonance imaging scans. *Int. J. Med. Inform.* **2023**, *173*, 105027. [CrossRef] [PubMed]

16. Martinez-Millana, A.; Saez-Saez, A.; Tornero-Costa, R.; Azzopardi-Muscat, N.; Traver, V.; Novillo-Ortiz, D. Artificial intelligence and its impact on the domains of universal health coverage, health emergencies and health promotion: An overview of systematic reviews. *Int. J. Med. Inform.* **2022**, *166*, 104855. [CrossRef]

17. Aletti, G.; Benfenati, A.; Naldi, G. A Semiautomatic Multi-Label Color Image Segmentation Coupling Dirichlet Problem and Colour Distances. *J. Imaging* **2021**, *7*, 208. [CrossRef]

18. Wang, R.; Lei, T.; Cui, R.; Zhang, B.; Meng, H.; Nandi, A.K. Medical image segmentation using deep learning: A survey. *IET Image Process.* **2022**, *16*, 1243–1267. [CrossRef]

19. Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. In *Proceedings of the Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015, Munich, Germany, 5–9 October 2015*; Navab, N., Hornegger, J., Wells, W.M., Frangi, A.F., Eds.; Springer: Cham, Switzerland, 2015; pp. 234–241.

20. Bougourzi, F.; Distante, C.; Dornaika, F.; Taleb-Ahmed, A.; Hadid, A.; Chaudhary, S.; Yang, W.; Qiang, Y.; Anwar, T.; Breaban, M.E.; et al. COVID-19 Infection Percentage Estimation from Computed Tomography Scans: Results and Insights from the International Per-COVID-19 Challenge. *Sensors* **2024**, *24*, 1557. [CrossRef]

21. Zhou, Z.; Siddiquee, M.M.R.; Tajbakhsh, N.; Liang, J. UNet++: Redesigning Skip Connections to Exploit Multiscale Features in Image Segmentation. *IEEE Trans. Med. Imaging* **2019**, *39*, 1856–1867 [CrossRef]

22. Jha, D.; Riegler, M.A.; Johansen, D.; Halvorsen, P.; Johansen, H.D. DoubleU-Net: A Deep Convolutional Neural Network for Medical Image Segmentation. *arXiv* **2020**, arXiv:2006.04868.

23. Rahil, M.; Anoop, B.N.; Girish, G.N.; Kothari, A.R.; Koolagudi, S.G.; Rajan, J. A Deep Ensemble Learning-Based CNN Architecture for Multiclass Retinal Fluid Segmentation in OCT Images. *IEEE Access* **2023**, *11*, 17241–17251. [CrossRef]

24. Benaissa, I.; Zitouni, A.; Sbaa, S. Using Multiclass Semantic Segmentation for Close Boundaries and Overlapping Blood Cells. In Proceedings of the 2024 8th International Conference on Image and Signal Processing and their Applications (ISPA), Biskra, Algeria, 21–22 April 2024; pp. 1–5. [CrossRef]
25. Meng, W.; Liu, S.; Wang, H. AFC-Unet: Attention-fused full-scale CNN-transformer unet for medical image segmentation. *Biomed. Signal Process. Control* **2025**, *99*, 106839. [CrossRef]

26. Rajamani, K.T.; Rani, P.; Siebert, H.; ElagiriRamalingam, R.; Heinrich, M.P. Attention-augmented U-Net (AA-U-Net) for semantic segmentation. *Signal Image Video Process.* **2023**, *17*, 981–989. [CrossRef] [PubMed]

27. Sun, Y.; Tao, H.; Stojanovic, V. End-to-end multi-scale residual network with parallel attention mechanism for fault diagnosis under noise and small samples. *ISA Trans.* **2024**, *157*, 419–433. [CrossRef] [PubMed]

28. Gao, Z.; Shi, Y.; Li, S. Self-attention and long-range relationship capture network for underwater object detection. *J. King Saud Univ.—Comput. Inf. Sci.* **2024**, *36*, 101971. [CrossRef]

29. Zeng, Z.; Liu, J.; Huang, X.; Luo, K.; Yuan, X.; Zhu, Y. Efficient Retinal Vessel Segmentation with 78K Parameters. *J. Imaging* **2025**, *11*, 306. [CrossRef]

30. Lu, Y.; Qin, X.; Fan, H.; Lai, T.; Li, Z. WBC-Net: A white blood cell segmentation network based on UNet++ and ResNet. *Appl. Soft Comput.* **2021**, *101*, 107006. [CrossRef]

31. Guo, Y.; Shahin, A.I.; Garg, H. An indeterminacy fusion of encoder-decoder network based on neutrosophic set for white blood cells segmentation. *Expert Syst. Appl.* **2024**, *246*, 123156. [CrossRef]

32. Roy, R.M.; Ameer, P.M. Segmentation of leukocyte by semantic segmentation model: A deep learning approach. *Biomed. Signal Process. Control* **2021**, *65*, 102385. [CrossRef]

33. Zhang, F.; Wang, F.; Zhang, W.; Wang, Q.; Liu, Y.; Jiang, Z. RotU-Net: An Innovative U-Net With Local Rotation for Medical Image Segmentation. *IEEE Access* **2024**, *12*, 21114–21128. [CrossRef]

34. Li, C.; Tan, Y.; Chen, W.; Luo, X.; He, Y.; Gao, Y.; Li, F. ANU-Net: Attention-based nested U-Net to exploit full resolution features for medical image segmentation. *Comput. Graph.* **2020**, *90*, 11–20. [CrossRef]

35. Li, D.; Yin, S.; Lei, Y.; Qian, J.; Zhao, C.; Zhang, L. Segmentation of White Blood Cells Based on CBAM-DC-UNet. *IEEE Access* **2023**, *11*, 1074–1082. [CrossRef]

36. Xu, Q.; Ma, Z.; HE, N.; Duan, W. DCSAU-Net: A deeper and more compact split-attention U-Net for medical image segmentation. *Comput. Biol. Med.* **2023**, *154*, 106626. [CrossRef] [PubMed]

37. Hayat, M.; Gupta, M.; Suanpang, P.; Nanthaamornphong, A. Super-Resolution Methods for Endoscopic Imaging: A Review. In Proceedings of the 2024 12th International Conference on Internet of Everything, Microwave, Embedded, Communication and Networks (IEMECON), IJaipur, India, 24 August 2024; pp. 1–6. [CrossRef]

38. Fiaz, M.; Noman, M.; Cholakkal, H.; Anwer, R.M.; Hanna, J.; Khan, F.S. Guided-attention and gated-aggregation network for medical image segmentation. *Pattern Recognit.* **2024**, *156*, 110812. [CrossRef]

39. Patil, P.S.; Holambe, R.S.; Waghmare, L.M. An Attention Augmented Convolution-Based Tiny-Residual UNet for Road Extraction. *IEEE Trans. Artif. Intell.* **2024**, *5*, 3951–3964. [CrossRef]

40. Gupta, A.; Gehlot, S.; Goswami, S.; Motwani, S.; Gupta, R.; Faura, Á.G.; Štepec, D.; Martinčič, T.; Azad, R.; Merhof, D.; et al. SegPC-2021: A challenge & dataset on segmentation of Multiple Myeloma plasma cells from microscopic images. *Med. Image Anal.* **2023**, *83*, 102677. [CrossRef]

41. Zheng, X.; Wang, Y.; Wang, G.; Liu, J. Fast and robust segmentation of white blood cell images by self-supervised learning. *Micron* **2018**, *107*, 55–71. [CrossRef]

42. Kouzehkanan, Z.M.; Saghari, S.; Tavakoli, S.; Rostami, P.; Abaszadeh, M.; Mirzadeh, F.; Satlsar, E.S.; Gheidishahran, M.; Gorgi, F.; Mohammadi, S.; et al. A large dataset of white blood cells containing cell locations and types, along with segmented nuclei and cytoplasm. *Sci. Rep.* **2022**, *12*, 1123. [CrossRef]

43. Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. arXiv **2017**, arXiv:1412.6980. [CrossRef]

44. Oktay, O.; Schlemper, J.; Folgoc, L.L.; Lee, M.; Heinrich, M.; Misawa, K.; Mori, K.; McDonagh, S.; Hammerla, N.Y.; Kainz, B.; et al. Attention U-Net: Learning Where to Look for the Pancreas. arXiv **2018**, arXiv:1804.03999. [CrossRef]

45. Alom, M.Z.; Hasan, M.; Yakopcic, C.; Taha, T.M.; Asari, V.K. Recurrent Residual Convolutional Neural Network based on U-Net (R2U-Net) for Medical Image Segmentation. arXiv **2018**, arXiv:1802.06955.

46. Jha, D.; Smedsrud, P.H.; Riegler, M.A.; Johansen, D.; Lange, T.D.; Halvorsen, P.; Johansen, H.D. ResUNet++: An Advanced Architecture for Medical Image Segmentation. In Proceedings of the 2019 IEEE International Symposium on Multimedia (ISM), San Diego, CA, USA, 9–11 December 2019; pp. 225–2255. [CrossRef]

47. Huang, H.; Lin, L.; Tong, R.; Hu, H.; Zhang, Q.; Iwamoto, Y.; Han, X.; Chen, Y.W.; Wu, J. UNet 3+: A Full-Scale Connected UNet for Medical Image Segmentation. In Proceedings of the ICASSP 2020—2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain, 4–8 May 2020; pp. 1055–1059. [CrossRef]

48. Chen, J.; Lu, Y.; Yu, Q.; Luo, X.; Adeli, E.; Wang, Y.; Lu, L.; Yuille, A.L.; Zhou, Y. TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation. arXiv **2021**, arXiv:2102.04306. [CrossRef]

49. Xu, G.; Wu, X.; Zhang, X.; He, X. LeViT-UNet: Make Faster Encoders with Transformer for Medical Image Segmentation. arXiv **2021**, arXiv:2102.043062107.08623.
50. Ibtehaz, N.; Rahman, M.S. MultiResUNet: Rethinking the U-Net architecture for multimodal biomedical image segmentation. *Neural Netw.* **2020**, *121*, 74–87. [CrossRef]

51. Huang, X.; Deng, Z.; Li, D.; Yuan, X.; Fu, Y. MISSFormer: An Effective Transformer for 2D Medical Image Segmentation. *IEEE Trans. Med. Imaging* **2023**, *42*, 1484–1494. [CrossRef] [PubMed]

52. Wang, H.; Cao, P.; Wang, J.; Zaiane, O.R. UCTransNet: Rethinking the Skip Connections in U-Net from a Channel-Wise Perspective with Transformer. In Proceedings of the AAAI Conference on Artificial Intelligence, Virtual, 22 February–1 March 2022; Volume 36, pp. 2441–2449. [CrossRef]

**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.