Next Article in Journal
A Micro-Quantitative and FFPE-Compatible Workflow for Immunohistochemistry-Guided Spatial Proteomic Analysis of Cellular Subpopulations Within the Tumor Microenvironment
Next Article in Special Issue
Cross-Domain Robust Pruning for Polyp Segmentation: Multi-Encoder Feature Fusion Beats Single-Encoder Baselines
Previous Article in Journal
Interpretable Skin Cancer Identification Using a Hybrid Deep Learning and XAI Framework on HAM10000
Previous Article in Special Issue
The Potential Clinical Utility of the Customized Large Language Model in Gastroenterology: A Pilot Study
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Unified Framework for Classification and Segmentation of Ambiguous Dual-Type Lesions in Colonoscopic Images

1
Department of Control Science and Engineering, Harbin Institute of Technology, Harbin 150001, China
2
Suzhou Research Institute, Harbin Institute of Technology, Suzhou 215104, China
3
Weihai Municipal Hospital, Cheeloo College of Medicine, Shandong University, Weihai 264299, China
4
School of Information Science and Engineering, Harbin Institute of Technology, Weihai 264209, China
*
Author to whom correspondence should be addressed.
Bioengineering 2026, 13(6), 679; https://doi.org/10.3390/bioengineering13060679
Submission received: 28 April 2026 / Revised: 4 June 2026 / Accepted: 10 June 2026 / Published: 11 June 2026
(This article belongs to the Special Issue Advanced Technique for Endoscopic Diagnosis in Biomedical Engineering)

Abstract

Accurate analysis of lesions in colonoscopic images is essential for computer-aided diagnosis. However, most existing methods are designed for single-lesion segmentation and assume a predefined lesion category, limiting their applicability in real-world scenarios where multiple lesion types exhibit similar visual characteristics. To address this issue, we propose a unified framework for the joint classification and segmentation of dual-type lesions in colonoscopic images, enabling simultaneous identification and localization of submucosal lesions and polyps/adenomas. The proposed method integrates joint supervision, context-aware feature enhancement, and ambiguity-aware optimization to improve consistency between semantic recognition and spatial delineation. In particular, a soft-label supervision strategy is introduced to alleviate semantic ambiguity, while an imbalance-aware loss design enhances segmentation accuracy and reduces false negative predictions. Extensive experiments on both private and public datasets demonstrate that the proposed method achieves superior performance compared with representative CNN- and transformer-based approaches. Notably, the method shows clear advantages in segmentation accuracy, localization precision, and robustness under challenging conditions. Ablation studies further confirm the effectiveness of each component in the proposed framework. These results indicate that the proposed approach provides an effective solution for dual-type lesion analysis and has the potential to assist clinical decision-making in gastrointestinal endoscopy.

Graphical Abstract

1. Introduction

Medical image segmentation plays a fundamental role in computer-aided diagnosis, providing essential support for clinical decision-making, treatment planning, and disease monitoring [1]. In gastrointestinal endoscopy, accurate identification and delineation of lesions are particularly important for early detection and intervention. With the rapid development of deep learning, segmentation models have significantly outperformed traditional rule-based approaches in terms of robustness and accuracy [2].
Most existing studies in colonoscopic image analysis focus on single-lesion segmentation, particularly polyp detection, where the lesion category is assumed to be known in advance [3]. Early methods for colonic polyp segmentation mainly relied on rule-based image processing strategies, including thresholding [4], edge detection [5], region growing [6], and morphological operations [7]. Although these approaches are relatively simple to implement and computationally efficient, they largely depend on hand-crafted feature extraction, making it difficult to maintain stable segmentation performance in complex colonoscopic images.
With the advancement of deep learning, research attention has gradually shifted toward supervised segmentation frameworks based on encoder–decoder architectures. By learning in an end-to-end manner, these methods progressively integrate high-level semantic information with low-level spatial details, thereby significantly improving pixel-wise delineation of polyp regions. Representative works, such as U-Net and its subsequent variants, have established the fundamental technical paradigm for this research direction [8], including U-Net++ [9], the DeepLab series [10], and other related extensions [11]. Building upon this paradigm, recent studies have further explored multi-scale representation, boundary recovery, and cross-level feature fusion. For example, PraNet places greater emphasis on recovering ambiguous lesion boundaries [12], Polyp-PVT enhances global semantic modeling through Transformer-based representations [13], and XCC-Net improves segmentation performance through structural optimization [14]. Although these methods have achieved strong performance on public benchmarks, they remain limited in more realistic clinical scenarios, where different lesion types may coexist and exhibit similar visual appearances. In gastrointestinal endoscopy, some precancerous abnormalities, dysplasia, and cancerous lesions can appear visually similar, which increases the difficulty of reliable lesion analysis [15].
The key difficulty in this setting lies in the semantic ambiguity between lesion types and the coupling between classification and segmentation objectives [16]. When lesion categories are unknown and visually similar, models optimized solely for pixel-wise segmentation tend to focus on region coverage while neglecting category discrimination, leading to inconsistent predictions between lesion identity and spatial localization [17]. Therefore, classification and segmentation should not be treated as independent tasks, but rather jointly modeled to exploit their intrinsic complementarity, since shared representations can exploit the complementary information between the two tasks and improve both analytical capability and prediction consistency. This rationale is supported by recent studies on multi-task medical image analysis, which show that joint learning of related tasks can leverage their intrinsic correlations to improve performance and generalization [18].
Recent studies have explored joint learning frameworks that integrate classification and segmentation into a unified model. Tang et al. [19] proposed TransMT-Net, which unifies lesion classification and region segmentation within a single framework for gastrointestinal endoscopic image analysis. Wu et al. [20] developed ELNet to jointly perform lesion classification and region segmentation for esophageal lesion analysis. Zhou et al. [21] constructed a multi-task framework for automatic breast ultrasound images, further demonstrating the synergistic value between classification and segmentation. Barzegar and Khan [2] further designed SemiSeg-CAW for ultrasound image analysis, where a classification branch was introduced to facilitate multi-task collaborative optimization. These approaches demonstrate that global semantic information from classification can provide useful constraints for spatial prediction, while segmentation can enhance fine-grained localization. However, in colonoscopic applications, existing studies still mainly focus on polyp-related tasks [22], there remains limited research specifically targeting ambiguous dual-type lesion analysis in colonoscopic images, where both category discrimination and boundary delineation are critical.
To address these challenges, this paper proposes a jointly supervised framework for dual-type lesion analysis in colonoscopic images, which unifies classification and segmentation within a single learning paradigm. The proposed method is designed from three complementary perspectives, including input representation, network architecture, and optimization strategy, to improve the consistency between lesion recognition and spatial localization.
The main contributions of this work can be summarized as follows:
(1)
Task-level contribution: We formulate a unified classification-segmentation framework for dual-type colonoscopic lesions, enabling the model to handle scenarios where lesion categories are unknown and visually ambiguous, rather than assuming a single predefined lesion type.
(2)
Representation and architecture design: We introduce a jointly supervised encoder–decoder framework with auxiliary supervision and lightweight context enhancement, which improves the utilization of shallow features and enhances boundary-aware representation for accurate lesion delineation.
(3)
Optimization strategy: We develop a joint optimization objective that integrates smoothed cross-entropy, Gaussian soft labels, Tversky loss, and false negative surrogate loss, allowing the model to simultaneously improve category discrimination, segmentation quality, and robustness against under-segmentation.
Extensive experiments on both private and public datasets demonstrate that the proposed method achieves superior performance in terms of lesion recognition, segmentation accuracy, and localization consistency, highlighting its potential for assisting clinical decision-making in gastrointestinal endoscopy.
The remainder of this paper is organized as follows. Section 2 reviews the related work. Section 3 presents the proposed method. Section 4 describes the experimental settings and results. Section 5 provides a discussion of the findings. Finally, Section 6 concludes the paper.

2. Related Work

For the classification and segmentation of dual-type lesions in colonoscopic images, related studies can be reviewed from two main perspectives. On the one hand, most existing endoscopic lesion segmentation methods are developed under single-lesion scenarios, mainly focusing on lesion region extraction, boundary recovery, and multi-scale feature modeling. On the other hand, recent studies have begun to explore joint modeling of classification and segmentation, aiming to integrate global semantic information and local spatial information within a unified learning framework.

2.1. Single-Lesion Endoscopic Lesion Segmentation

Automatic lesion segmentation in colonoscopic images has been extensively studied, particularly for polyp detection and delineation. Existing methods can generally be categorized into three directions [23].
The first group of methods is based on encoder–decoder architectures, which perform pixel-wise lesion region recovery by progressively integrating high-level semantic information with low-level spatial details. This type of method constitutes the basic technical framework of current endoscopic lesion segmentation. PolypSegNet modifies the network connections and feature transmission strategy of the conventional encoder–decoder architecture to improve fine-grained segmentation of polyp regions [24]. PSNet further introduces a dual-encoder and dual-decoder structure to enhance the complementary utilization of hierarchical features, thereby improving pixel-wise representation of complex polyp regions [25]. The second group of methods introduces attention mechanisms, context enhancement modules, or lightweight backbones into the basic segmentation framework to improve the modeling of complex background interference and locally discriminative features. Zhang et al. [26] enhanced contextual perception across regions of different scales through an adaptive context selection mechanism, allowing the model to better handle polyps with large size variations. Wei et al. [27] employed a shallow attention mechanism to suppress background noise and strengthen the representation of high-resolution shallow features for small polyps and weak-boundary regions. The third group of methods pays greater attention to multi-scale representation, boundary recovery, and cross-level feature interaction, aiming to alleviate the segmentation difficulties caused by scale variation, irregular morphology, and ambiguous boundaries of polyps. Liu et al. [28] strengthened the interaction among features at different levels through multi-level feature fusion and attention mechanisms, thereby enhancing the collaborative representation of polyp regions and detailed structures. EENet explicitly incorporates an edge enhancement mechanism into the segmentation network and improves the quality of polyp contour prediction through boundary-sensitive features [29]. Related reviews have shown that mainstream polyp segmentation methods have continuously evolved along these directions and achieved steady progress on public datasets [30].
Although existing methods have established relatively mature technical routes for single-lesion region segmentation, most of them assume that the lesion category to be segmented is known before modeling. Therefore, their performance improvements mainly lie in lesion region coverage, boundary recovery, and detailed delineation, while the explicit discrimination of lesion categories is less frequently considered. When the research target is extended from a single polyp to dual-type lesions with unknown categories and visually similar appearances, directly following this paradigm may be insufficient to support the joint modeling requirements of category discrimination and region segmentation.

2.2. Methods for Dual-Lesion Classification and Region Segmentation

To overcome the limitations of single-task learning, recent studies have explored joint frameworks that integrate classification and segmentation within a unified model. These approaches aim to leverage global semantic information from classification to guide spatial localization, while using segmentation to refine fine-grained feature representations. Various strategies have been proposed, including shared encoder architectures, auxiliary classification branches, and attention-based feature fusion mechanisms.
Zhu et al. [31] proposed the DSI-Net for joint classification and segmentation of wireless capsule endoscopy images. Different from simple parameter sharing, their method emphasized explicit cross-task interaction, showing that semantic recognition and lesion delineation can be mutually enhanced through task-specific feature exchange. Yu et al. [32] further developed a multi-task framework for esophageal lesion analysis, in which classification and segmentation were optimized within a unified architecture. Their study suggested that a shared feature space can simultaneously support lesion-level semantic understanding and region-level localization. Fan et al. [33] jointly addressed lesion localization and classification in breast ultrasound analysis, highlighting that category discrimination and spatial localization are intrinsically correlated rather than isolated objectives. Aumente-Maestro et al. [34] further constructed a unified segmentation classification framework for breast ultrasound tumor analysis, showing that multi-task collaboration can improve the overall consistency and reliability of lesion assessment.
Although these methods demonstrate the potential of multi-task learning, most of them are developed for general medical imaging tasks or scenarios with clear category distinctions. Limited attention has been paid to cases where lesion types are both visually similar and difficult to distinguish, such as in colonoscopic images involving submucosal lesions and polyps. In such ambiguous settings, existing joint learning frameworks may fail to achieve consistent optimization between classification and segmentation objectives. Therefore, a dedicated framework is required for ambiguous dual-type lesion analysis in colonoscopic images, enabling stable and accurate lesion category discrimination and region segmentation. Based on this motivation, the following section provides a detailed description of the proposed method from three aspects: preprocessing and soft supervision generation, the deeply supervised encoder–decoder architecture, and the joint optimization objective.

3. Method

3.1. Problem Formulation

In this study, we consider the task of joint lesion classification and segmentation in colonoscopic images, where the lesion category is not known a priori and may exhibit significant visual ambiguity.
Formally, let D = { ( x i , l c i , m i ) } i = 1 N denote a dataset of colonoscopic images, where x i R H × W × 3   represents the input image, l c i { 1 , , C } denotes the lesion category label, and m i { 0 ,   1 } H × W is the corresponding pixel-wise segmentation mask. Here, C is the number of lesion categories.
The goal is to learn a mapping function, defined as follows:
f θ : x l c ^ , m ^ ,
parameterized by θ , which simultaneously predicts the lesion category l c ^ and the segmentation mask m ^ .
Unlike conventional segmentation tasks that assume a single lesion type, the problem considered in this work is more challenging due to two key factors:
(1)
Unknown lesion category
The model must infer the lesion type directly from the input image without prior knowledge, requiring strong global semantic understanding.
(2)
Semantic ambiguity and visual similarity
Different lesion types may exhibit highly similar visual patterns in colonoscopic images, making it difficult to distinguish between them based solely on local features.
These challenges introduce a strong coupling between classification and segmentation tasks. Specifically, accurate segmentation relies on correct semantic understanding of the lesion type, while reliable classification depends on stable and consistent spatial-semantic feature representations. Therefore, optimizing these tasks independently may lead to suboptimal or inconsistent predictions.
To address this issue, we formulate the problem as a joint learning task, where classification and segmentation are optimized simultaneously under a unified framework. In the proposed implementation, this unified objective is instantiated through a jointly optimized deep-supervised architecture, where the overall training loss consists of a main decoding loss and an auxiliary supervision loss, and is defined as:
L t o t a l = L m a i n + λ a u x L a u x ,
where L m a i n and L a u x denote the losses of the main decoding branch and the auxiliary supervision branch, respectively, and λ a u x is the balancing coefficient.
Under this joint learning setting, the key challenge is to design an effective mechanism that enables mutual enhancement between semantic recognition and spatial localization, while maintaining robustness to ambiguous lesion appearances. The proposed method addresses this challenge through coordinated design of input representation, network architecture, and optimization strategy, as detailed in the following sections.

3.2. Overview of the Proposed Framework

The overall framework is designed to address the joint classification–segmentation problem defined in Section 3.1, with a focus on improving consistency between semantic recognition and spatial localization under ambiguous lesion conditions.
Given an input colonoscopic image x , the proposed model aims to simultaneously predict the lesion category l c ^ and the corresponding segmentation mask m ^ . To achieve this, we adopt a unified encoder–decoder architecture with joint supervision, as illustrated in Figure 1.
Specifically, the framework consists of three main components: an input and supervision design stage for data augmentation and soft label generation, a network architecture stage for hierarchical representation learning and multi-scale feature aggregation, and an optimization strategy stage for joint optimization of classification and segmentation objectives.
In the first stage, the input image undergoes input preparation and spatial distribution encoding. Initially, effective field-of-view extraction is applied to suppress irrelevant background regions, followed by basic data augmentation to improve sample diversity and enhance robustness. Subsequently, a spatial distribution encoding process is introduced, where Gaussian-based soft labels are generated from the lesion masks to provide smooth and informative supervision signals. This design encourages the model to focus more consistently on lesion-relevant regions and establishes a foundation for subsequent optimization.
In the second stage, the processed image is fed into a shared encoder–decoder architecture for representation learning and prediction. First, the encoder extracts multi-level feature representations, capturing both local texture details and global contextual information, which are essential for distinguishing visually similar lesion types. Then, the extracted features are passed to the decoder, where multi-scale information is progressively fused to recover spatial resolution and refine lesion boundaries. To further enhance representation capability, a lightweight context enhancement module is incorporated to expand the receptive field and improve sensitivity to subtle structural variations. Meanwhile, auxiliary supervision is applied to intermediate feature maps to facilitate optimization and improve the utilization of shallow features. By enforcing supervision at multiple levels, the model is encouraged to learn more discriminative and robust representations.
In the final stage, an optimization strategy is introduced to jointly constrain classification and segmentation objectives. The overall training objective consists of a main loss and an auxiliary loss, corresponding to the outputs of the decoder and the auxiliary branch, respectively. The main loss simultaneously considers classification accuracy, segmentation quality, and false negative suppression, while the auxiliary loss provides additional guidance for intermediate representations. Furthermore, the soft labels generated in the first stage are incorporated into the classification-related supervision, enabling more stable and spatially consistent learning. Through this coordinated design, the optimization process effectively links input representation, feature learning, and supervisory signals, promoting mutual reinforcement between semantic discrimination and spatial delineation.
Overall, the proposed framework systematically integrates data preparation, representation learning, and joint optimization into a unified pipeline, where each stage is explicitly designed to support the collaborative modeling of semantic discrimination and spatial delineation. By aligning input supervision, feature learning, and optimization objectives toward a shared goal, the framework effectively addresses the challenges of semantic ambiguity and task coupling described in Section 3.1. In the following subsection, we first provide a detailed description of the Input and Supervision Design stage.

3.3. Input and Supervision Design

To improve model robustness and enhance learning under ambiguous lesion conditions, we design an input preprocessing and supervision strategy that integrates data normalization, augmentation, and soft-label guidance.
The first component is Input Preparation, which aims to reduce irrelevant background interference and improve the robustness of model training. All input colonoscopic images are first resized to a unified resolution to ensure a consistent input distribution. Before data augmentation, an effective field-of-view extraction step is applied, since colonoscopic images often contain dark borders, low-intensity peripheral regions, and other non-informative background content near the imaging boundary. To suppress such interference, only the valid imaging region is retained in both the original image and its corresponding mask.
Let the input colonoscopic image be denoted by x , The pixel value at the h -th row and w -th column of the input image is denoted as x h , w . The image is first converted into a grayscale map G . Based on a grayscale threshold τ , a binary map B is generated to roughly separate the candidate tissue region:
B x h , w = 1 , G x h , w > τ , 0 , G x h , w τ .
Then, an 8-connected component analysis is performed on B , and the set of foreground connected components is denoted as F o r e 1 , F o r e 2 , , F o r e K . The largest connected component is selected as the final effective field-of-view region:
F o r e * = a r g   m a x F o r e k F o r e k .
Accordingly, the binary mask of the effective field-of-view is defined as:
M fov ( x h , w ) = 1 , x h , w F o r e * , 0 , otherwise .
The extracted FOV mask is then applied to both the original image and its annotation. For the image, the valid region is preserved as:
x f o v , h , w = x h , w · M f o v x h , w ,
where x f o v , h , w denotes the colonoscopic image processed by the FOV mask M f o v ( x h , w ) , with all channels multiplied by the same mask. For the annotation mask m h , w , it is first converted into a binary foreground mask:
M b i n m h , w = 1 , m h , w > 0 , 0 , m h , w = 0 ,
m f o v , h , w = M b i n m h , w · M fov x h , w .
Through this preprocessing step, irrelevant border regions and non-informative background content can be effectively suppressed, allowing the model to focus more consistently on lesion-relevant regions.
After FOV-constrained preprocessing, basic data augmentation is further employed to improve sample diversity and enhance model generalization [35]. To improve robustness against variations in illumination, viewpoint, and lesion appearance, a series of lightweight augmentation techniques are applied during training, including random flipping, rotation, and intensity variation. These augmentations simulate realistic variability in endoscopic imaging and help prevent overfitting to specific visual patterns.
The second component is Spatial Distribution Encoding, which aims to construct spatially smooth and ambiguity-aware supervision signals for robust learning.
In conventional medical image segmentation tasks, ground-truth annotations are usually provided as binary masks. However, the actual lesion boundaries may contain annotation uncertainty, and hard boundaries may force the model to produce overly abrupt responses for pixels near lesion margins. This is not conducive to learning the continuous spatial structure between lesion interiors and boundary transition regions.
Since this study aims to jointly model lesion categories and pixel-level segmentation, an adaptive soft-label generation strategy based on a two-dimensional Gaussian distribution is further introduced. By constructing smoother spatial supervision signals, the soft labels encourage the model to learn the internal characteristics of different lesion regions and the structural patterns of their transition zones, which are often difficult to distinguish through direct visual inspection [36].
Let the FOV-constrained binary lesion mask be denoted as m fov { 0 ,   1 } H × W , where m fov ( h , w ) = 1 indicates lesion pixels and 0 indicates background. Considering that multiple disconnected lesion regions may exist in a single image, we first perform connected component analysis on m fov , obtaining a set of independent lesion instances Ω 1 , Ω 2 , , Ω N . For the i -th lesion instance Ω i , its pixel coordinate set is defined as:
Ω i = h , w m f o v h , w = 1 ,   h , w the   i - th   connected   component .
The geometric center μ i = ( μ x , i , μ y , i ) of Ω i is computed as:
μ h , i = 1 Ω i h , w Ω i h , μ w , i = 1 Ω i h , w Ω i w .
Based on this center, a Gaussian distribution is constructed for each lesion instance. The spatial scale is adaptively determined by the maximum distance from pixels in Ω i to the center:
r i = m a x ( h , w ) Ω i h μ h , i ) 2 + ( w μ w , i ) 2 .
The standard deviation is defined as σ i = r i / 3 , and the corresponding Gaussian response is given by:
G a u s s i h , w = exp h μ h , i ) 2 + ( w μ w , i ) 2 2 σ i 2 .
To ensure that the soft label remains consistent with the original lesion region, the Gaussian response is constrained within the corresponding instance:
G a u s s ~ i h , w = G a u s s i h , w , h , w Ω i , 0 , otherwise .
The resulting soft label G a u s s ~ i ( x , y ) forms a continuous supervision distribution within each lesion region, where the response is highest at the center and gradually decays toward the boundary. Compared with conventional binary masks, this representation alleviates discontinuities at lesion boundaries and enables the model to learn smooth spatial transitions from lesion cores to edges.
Furthermore, by encoding spatial uncertainty and structural variation within lesion regions, the proposed soft-label mechanism provides more informative guidance for feature learning. This is particularly beneficial for ambiguous cases, where lesion categories share similar visual patterns and precise boundaries are difficult to define. Consequently, the model is encouraged to capture more robust intra-region representations rather than relying solely on sharp boundary cues, thereby improving consistency between semantic discrimination and spatial delineation. The following section presents the proposed network architecture designed to enhance semantic feature representation.

3.4. Deeply Supervised Encoder–Decoder Architecture

To effectively model the visual characteristics of colonoscopic images, we adopt an encoder–decoder architecture as the backbone of the proposed framework. The encoder is responsible for extracting hierarchical feature representations, while the decoder progressively fuses multi-scale features to generate high-resolution segmentation outputs.
Specifically, given the preprocessed input image x fov and x a u g , the encoder produces a set of multi-level feature maps as:
{ S 0 , S 1 , S 2 , S 3 } = E θ e ( c a t ( x fov , x a u g ) ) ,
where E θ e denotes the encoder, and S 0 , S 1 , S 2 , and S 3 represent feature maps from shallow to deep stages. This design provides strong representation capability for distinguishing visually similar lesion types, which is critical for accurate classification under semantic ambiguity [37].
The decoder follows a multi-scale feature aggregation strategy, integrating information from different levels of the encoder to recover spatial resolution and refine lesion boundaries. In the initial decoder design, the deepest feature S 3 is first processed by a pyramid pooling module to capture global contextual information. Meanwhile, the lower-level features S 0 , S 1 , and S 2 are projected into a unified channel dimension through lateral transformations., and are then fused in a top-down manner to recover spatial resolution and refine lesion boundaries. However, in this design, only the highest-level feature S 3 benefits from explicit global context aggregation through the pyramid pooling module. The lateral features S 0 , S 1 , and S 2 , which preserve richer spatial details, lack sufficient contextual modeling capability. This limitation becomes more critical in the considered task, where the model is required to jointly perform classification and segmentation under ambiguous dual-type lesion conditions. In such scenarios, relying solely on local information in shallow features may lead to insufficient discrimination between visually similar lesion types. To address this issue, we introduce a Lightweight Context Enhancement (LCE) module into the lateral feature processing stage, as illustrated in Figure 2. The key idea is to enrich the contextual representation of each feature level before top-down fusion, while preserving spatial details and maintaining computational efficiency.
Specifically, the LCE module is designed to capture multi-scale contextual information by combining convolutional operations with different receptive fields. By employing dilated convolutions with varying dilation rates, the module enables each feature map to aggregate information from multiple spatial ranges. This design allows the model to incorporate both local structural details and broader contextual cues, which are essential for distinguishing lesions with similar local appearances. Furthermore, instead of introducing heavy global attention or complex context modeling mechanisms, the LCE module adopts a lightweight multi-branch structure to balance representation capability and computational cost. This makes it suitable for integration into each lateral feature without significantly increasing model complexity.
The detailed operation of the LCE module is as follows. Given a lateral feature S l R C × H × W , three parallel convolutional branches are applied to extract features under different receptive fields as follows:
F 1 = ϕ 1 ( S l ) ,
F 2 = ϕ 2 d = 2 S l ,
F 3 = ϕ 3 d = 4 S l ,
where ϕ 1 ( · ) denotes a 1 × 1 convolution, and ϕ 2 d = 2 ( · ) and ϕ 3 d = 4 ( · ) denote 3 × 3 dilated convolutions with dilation rates of 2 and 4, respectively. The outputs of the three branches are concatenated along the channel dimension as:
F c a t = C o n c a t F 1 , F 2 , F 3 ,
and then fused through a 3 × 3 convolution as:
F f u s e = ψ F c a t ,
where ψ ( · ) denotes the feature fusion and channel compression operation.
Finally, a residual connection is applied to obtain the enhanced feature as:
S ^ l = F fuse + S l .
This enhancement enriches the contextual representation of lateral features while preserving their spatial detail, enabling more effective integration of semantic and spatial information during feature fusion.
Given the inherent coupling between classification and segmentation tasks, as well as the imbalance of supervision across network depth, an auxiliary supervision branch is introduced on intermediate feature maps. In deep encoder–decoder architectures, high-level features typically receive more direct supervision from the final prediction, while shallow and intermediate features, despite containing richer edge, texture, and local structural information, are relatively under-supervised. This may limit the effectiveness of gradient propagation and hinder the learning of fine-grained spatial details.
To alleviate this issue, an auxiliary branch is attached to the intermediate feature S 2 , where a lightweight FCN-based head is employed as the auxiliary prediction module. The FCN-based head adopts a simple convolutional structure to generate dense predictions from intermediate feature maps, enabling direct supervision at this level without introducing significant computational overhead.
During training, the auxiliary branch provides additional classification and segmentation supervision to intermediate representations. This design improves gradient propagation efficiency and encourages the network to better utilize local texture and boundary information, thereby enhancing the overall representation capability of the model.
Overall, the proposed architecture integrates hierarchical feature extraction, context enhancement, and auxiliary supervision into a unified framework. Hierarchical feature extraction enables multi-level representation of lesion characteristics, while context enhancement enriches spatial and structural information across different feature scales. The auxiliary supervision branch further improves gradient propagation and strengthens the learning of shallow features. Each component is designed to address the challenges identified in Section 3.1, including semantic ambiguity and task coupling, thereby improving the consistency between semantic discrimination and spatial delineation.

3.5. Optimization Strategy

The model is required to jointly perform classification and segmentation under ambiguous dual-type lesion conditions. In our implementation, this joint objective is realized through a combination of a main loss and an auxiliary loss. Both losses are defined on pixel-wise predictions and implicitly incorporate classification and segmentation signals. Specifically, classification is modeled as pixel-wise category prediction, while segmentation is enforced through region-level overlap and structural constraints.
To reflect their different roles in the network, the main and auxiliary losses are designed with different levels of strictness. The main loss is applied to the final prediction and aims to achieve accurate semantic discrimination, precise region delineation, and effective suppression of false negatives. In contrast, the auxiliary loss is imposed on intermediate features and adopts a simpler and more stable formulation to facilitate gradient propagation and improve shallow feature learning.
Based on this design, the overall loss function is defined as:
L t o t a l = L m a i n + λ a u x L a u x ,
where L main and L aux denote the losses of the main decoding branch and the auxiliary branch, respectively, and λ aux is a balancing coefficient.
The main branch is responsible for generating the final prediction. Therefore, its objective is designed to jointly optimize classification accuracy, segmentation quality, and false negative suppression. The main loss is defined as:
L m a i n = λ c e L c e + λ t v L t v + λ f n L f n ,
where L c e denotes the pixel-wise weighted smoothed cross-entropy loss, and λ c e is the corresponding weighting hyperparameter. L t v represents the Tversky loss, with λ t v controlling its contribution. L f n denotes the false negative surrogate loss, which is introduced to suppress missed lesion segmentation, and λ f n is its corresponding loss weight.
For classification-related supervision, a smoothed cross-entropy loss is adopted. Considering that manual annotations may contain uncertainty near lesion boundaries, label smoothing is introduced to improve robustness and generalization. In the main loss, the Gaussian-based soft labels proposed in Section 3.3 are further incorporated as pixel-wise weights, which emphasize informative regions within lesions and capture intra-lesion structures as well as transition patterns between regions. Let the logits output by the main branch be denoted as P r e m a i n R B × C × H × W , and the corresponding softmax probability be denoted as p b , h , w , c . For each pixel location b , h , w , the ground-truth class label is denoted as l ^ b , h , w . To alleviate the overly sharp supervision caused by hard labels, this study introduces a label smoothing strategy [38], and the smoothed target distribution is defined as:
q b , h , w , c = 1 ε II c = l c ^ b , h , w + ε C ,
where ε denotes the label smoothing coefficient, and C represents the number of classes. Based on this formulation, the smoothed cross-entropy loss for a single pixel is computed as:
l c e b , h , w = c = 1 C q b , h , w , c log p b , h , w , c .
Furthermore, the Gaussian soft label defined in Equation (13) is used to construct the pixel-level weight map G a u s s ~ b , h , w , which is introduced to weight the smoothed cross-entropy loss. Accordingly, the weighted smoothed cross-entropy term in the main branch is written as:
L c e = 1 B H W b = 1 B h = 1 H w = 1 W G a u s s ~ ( b , h , w ) l c e b , h , w .
For segmentation supervision, the Tversky loss is employed to explicitly balance false-positive and false-negative errors, which allows flexible control over these two types of errors [39], which is particularly important in medical segmentation tasks where under-segmentation is often more critical than over-segmentation. The logits output by the main branch are denoted as P r e m a i n R B × C × H × W . A softmax operation is first applied to obtain the predicted probability that each pixel belongs to class c :
p b , c , i = exp P r e m a i n b , c , i k = 1 C e x p ( P r e m a i n b , k , i ) ,
where b denotes the sample index in the batch, c denotes the class index, and i denotes the flattened pixel index. The corresponding ground-truth label is represented in one-hot form as m ^ b , c , i { 0 ,   1 } . For each sample b and foreground class c , the true positive, false positive, and false-negative are defined as:
T P b , c = i p b , c , i m ^ b , c , i ,
F P b , c = i p b , c , i 1 m ^ b , c , i ,
F N b , c = i ( 1 p b , c , i ) m ^ b , c , i ,
Using the true positive, false positive, and false negative terms defined in Equations (27)–(29), the Tversky index for the c -th foreground class in the b -th sample is computed as:
T b , c = T P b , c + ϵ T P b , c + α F P b , c + β F N b , c + ϵ ,
where ϵ is a smoothing constant, and α and β control the penalty weights for false positives and false negatives, respectively.
Considering that not all foreground classes necessarily appear in the current batch, directly averaging over all classes may be affected by absent categories. Therefore, we average only over the foreground classes that are truly present in the current sample. The class presence mask is defined as:
e m b , c = 1 , i m ^ b , c , i > 0 , 0 , otherwise .
Accordingly, the average Tversky index within the batch is formulated as:
T ¯ = b c C f g e m b , c T b , c b c C f g e m b , c + ϵ ,
where C f g denotes the set of foreground classes. Finally, the multi-class Tversky loss is defined as:
L t v = 1 T ¯ .
Although the Tversky loss focuses on region overlap, false negative errors are particularly critical in lesion analysis. Therefore, an FN surrogate loss is introduced to explicitly penalize under-segmentation by directly optimizing a soft recall measure:
L f n b = 1 h , w p b , g b , h , w II l c ^ b , h , w = l c b h , w II [ l c ^ b , h , w = l c b ] + ϵ ,
where l c b denotes the ground-truth lesion category of the current image. The overall false negative surrogate loss is then obtained by averaging the sample-wise FN surrogate loss in Equation (34) over all samples containing foreground lesions:
L f n = 1 B f g b B f g L f n b ,
where B f g denotes the set of samples containing foreground lesions in the current batch. This term is essentially equivalent to directly optimizing the soft recall over the ground-truth lesion regions. Therefore, it can more specifically suppress false negative regions and improve the complete recovery of lesion areas.
The auxiliary branch provides direct supervision for intermediate features rather than performing final prediction. Since shallow features primarily encode low-level structures and are updated more slowly during training, a simpler and more stable objective is adopted as:
L a u x = λ a u x c e L a u x c e + L t v ,
where λ a u x c e denotes the weight of the smoothed cross-entropy loss in the auxiliary head, and L a u x c e represents the smoothed cross-entropy loss used for auxiliary supervision. The auxiliary smoothed cross-entropy loss is calculated as:
L c e = 1 B H W b = 1 B h = 1 H w = 1 W l c e b , h , w .
Compared with the main loss, Gaussian weighting is not applied in the auxiliary branch, as its purpose is to enhance feature separability and boundary awareness rather than enforce fine-grained spatial constraints. L t v denotes the Tversky loss, which is calculated in the same manner as that used in the main loss function.
Through the proposed joint optimization strategy, the model simultaneously enhances semantic discrimination, region-level consistency, and robustness against false negatives in the main branch, while improving intermediate feature learning via auxiliary supervision. The collaborative optimization of both branches not only improves final segmentation performance but also strengthens the representation of lesion textures, boundaries, and local structures. As a result, the framework achieves more stable and consistent predictions under ambiguous lesion conditions.

4. Experiment

4.1. Dataset

In this study, we focus on a dual-type lesion analysis task in colonoscopic images, where the model is required to simultaneously perform lesion category discrimination and pixel-wise segmentation. Unlike conventional single-lesion segmentation tasks, the lesion category is not assumed to be known a priori, and different lesion types may exhibit highly similar visual characteristics. This setting introduces additional challenges for both semantic recognition and spatial delineation. To comprehensively evaluate the proposed method, experiments are conducted on both a private dataset and a public dataset. These two datasets provide complementary characteristics in terms of data distribution and lesion variability.
The private dataset consists of colonoscopic images collected from clinical practice, focusing on dual-type lesion scenarios. Each image contains a single annotated lesion region, and all images are manually labeled with both lesion category and pixel-wise segmentation masks. The dataset includes two lesion categories, corresponding to submucosal lesions and polyp/adenoma-type lesions. Specifically, the dataset contains 2050 images of submucosal lesions and 2738 images of polyp/adenoma lesions, with a balanced distribution between the two categories. This dataset reflects real clinical conditions where lesion categories are not predefined and must be inferred from visual appearance.
To further validate the generalization ability of the proposed method, the Endoscopy Disease Detection and Segmentation 2020 dataset (EDD2020) [40] was adopted as the public external validation dataset. EDD2020 is a multi-center gastrointestinal endoscopy benchmark developed for disease detection and segmentation tasks. It contains 386 annotated endoscopic images collected from different anatomical sites, including the colon, esophagus, and stomach. The dataset covers five disease categories, namely Barrett’s esophagus (BE), suspicious lesions, high-grade dysplasia (HGD), cancer, and polyps. For each lesion instance, EDD2020 provides both bounding-box annotations for lesion localization and pixel-level instance segmentation masks for lesion delineation, making it suitable for evaluating both classification/localization and segmentation performance. Since the public release does not provide a predefined training/validation/test split, the dataset can be reorganized according to different experimental settings. Following the setting in Chavarrias-Solano et al. [41], the original categories are reorganized by merging cancer, high-grade dysplasia (HGD), and suspicious lesions into a single class, denoted as neoplasia. As a result, the task is reformulated as a dual-type lesion problem, consisting of polyp and neoplasia. After preprocessing, the dataset contains 122 polyp images and 210 neoplasia images, each annotated with both lesion category labels and segmentation masks. Compared with the private dataset, the public dataset exhibits greater diversity in imaging conditions, lesion appearance, and acquisition environments, providing a more challenging benchmark for evaluating model robustness.
The final data distribution is shown in Table 1. Despite differences in data sources, both datasets share a common challenge: lesion types are often visually similar and difficult to distinguish based solely on local appearance. Subtle differences in texture, structure, and contextual cues may determine the lesion category, while boundaries can be ambiguous due to imaging artifacts and annotation uncertainty.
These factors make it challenging to achieve consistent classification and segmentation, highlighting the importance of jointly modeling semantic discrimination and spatial delineation.

4.2. Implementation Details

All experiments were implemented using Python 3.8.20 and PyTorch 2.0.0, and were conducted on an NVIDIA RTX 5880 Ada GPU. The proposed model and comparison models were implemented based on the MMSegmentation framework. To ensure fair comparison and stable convergence, all models were initialized with publicly available ADE20K-pretrained weights provided by MMSegmentation, rather than being trained from scratch.
All input images and masks were resized to 512 × 512 before being fed into the network. The models were trained for 30 epochs with a batch size of 16. Adam was used as the optimizer. For the private dataset, the initial learning rate was set to 3 × 10 5 , while for the public EDD2020 dataset, the initial learning rate was set to 1 × 10 3 .
For the effective field-of-view extraction described in Section 3.3, the grayscale threshold τ was set to 30. For the joint optimization objective, the auxiliary loss weight was set to λ aux = 0.2 . In the main loss, the weights of the smoothed cross-entropy loss, Tversky loss, and FN surrogate loss were set to λ ce = 0.67 , λ tv = 1.0 , and λ fn = 0.4 , respectively. The label smoothing coefficient was set to ε = 0.05 . For the Tversky loss, the smoothing constant was set to ϵ = 10 6 , and the false-positive and false negative weighting parameters were set to α = 0.3 and β = 0.7 , respectively. In the auxiliary loss, the weight of the auxiliary smoothed cross-entropy term was set to λ auxce = 0.67 .

4.3. Comparison with Representative Segmentation Methods

To evaluate the effectiveness of the proposed method, we compare it with several representative semantic segmentation models, including FCN, PSPNet, DeepLabv3+, UPerNet, SegFormer, Swin Transformer, and SegNeXt. These methods cover different technical paradigms, including classical convolutional segmentation networks, context aggregation frameworks, Transformer-based segmentation models, and mask prediction-based architectures. Therefore, they provide a comprehensive comparison for evaluating the proposed method under the dual-type lesion analysis setting.
FCN [42] is one of the earliest fully convolutional frameworks for semantic segmentation. It replaces fully connected layers with convolutional operations and performs pixel-wise prediction through upsampling and skip connections, establishing the foundation for subsequent segmentation networks.
PSPNet [43] introduces a pyramid pooling module to aggregate contextual information at multiple scales. By incorporating global prior information into pixel-wise prediction, PSPNet improves scene parsing and region-level understanding in complex images.
DeepLabv3+ [10] is a representative encoder–decoder segmentation framework. It employs atrous convolution and atrous spatial pyramid pooling to capture multi-scale contextual information, while the decoder helps recover spatial details and refine object boundaries.
UPerNet [44] combines pyramid pooling with a feature pyramid structure. It integrates global context from high-level features and progressively fuses multi-level features in a top-down manner, making it a representative framework for multi-scale semantic segmentation.
SegFormer [45] is an efficient Transformer-based segmentation model. Its hierarchical Transformer encoder extracts multi-scale features, and its lightweight MLP decoder performs feature fusion with relatively low computational complexity.
Swin [46] constructs hierarchical visual representations through shifted-window self-attention. By enabling cross-window information interaction while controlling computational cost, it serves as a strong backbone for dense prediction tasks.
SegNeXt [47] is a convolutional segmentation framework designed to improve contextual modeling through convolutional attention and large-kernel representation. It aims to achieve strong segmentation performance with efficient computation.
Since the proposed task involves both lesion-category discrimination and pixel-wise lesion delineation, four evaluation metrics are adopted to comprehensively assess model performance: lesion recognition accuracy, segmentation error, center localization error, and abnormal region localization Dice.
For lesion-category discrimination, we use the class-wise lesion recognition accuracy. For class c , it is defined as:
A c c c = n = 1 N II l c n = c , l c ^ n = c n = 1 N II l c n = c ,
where l c n and l c ^ n denote the ground-truth and predicted lesion categories of the n -th image, respectively. A higher Acc c indicates better lesion recognition performance.
For segmentation evaluation, we use segmentation error to measure the degree of missed lesion regions. For class c , the segmentation error is defined as:
S e g e r r c = 1 N c n c = 1 N c ( 1 N u m n c n u m = 1 N u m n c F N n u m n c G T n u m n c + ε ) ,
where N u m n c denotes the number of lesions in the n c -th image of class c , F N n u m n c denotes the missed segmentation area of the n u m -th lesion in the n c -th image of class c , and G T n u m n c denotes the actual pixel area of the n u m -th lesion in the same image.
To evaluate localization accuracy, we calculate the center localization error. For class c , it is defined as:
C e n e r r c = 1 N c n c = 1 N c ( 1 N u m n c n u m = 1 N u m n c x p , n u m n c     x g , n u m n c 2 + y p , n u m n c     y g , n u m n c 2 D i a g n c + ε ) ,
where x p , n u m n c y p , n u m n c denotes the centroid coordinates of the best-matched predicted instance, and x g , n u m n c y g , n u m n c denotes the centroid coordinates of the corresponding ground-truth lesion instance. D i a g n c represents the diagonal length of the n c -th image, which is used to normalize the center deviation.
Finally, abnormal region localization accuracy is evaluated using localization Dice. For class c , it is calculated as:
L o c D i c e c = 1 N c n c = 1 N c ( 1 N u m n c n u m = 1 N u m n c 2 I o U n u m n c 1 + I o U n u m n c ) ,
where I o U n u m n c denotes the intersection over union between the n u m -th ground-truth lesion instance in the n c -th image and its best-matched predicted instance.
In addition to class-wise results, the average performance across lesion categories is reported for all four metrics. For Acc and LocDice, higher values indicate better performance, whereas lower values are preferred for SegErr and CenErr.
Based on the above comparison methods and evaluation metrics, quantitative experiments were conducted on both the private dataset and the public EDD2020 dataset. Table 2 reports the class-wise and average performance on the private dataset. In the table, ↑ indicates that a higher value represents better performance, whereas ↓ indicates that a lower value represents better performance.
As shown in Table 2, the proposed method achieves strong and balanced performance on both lesion categories in the private dataset. For lesion recognition accuracy, most comparison models obtain relatively high accuracy for polyp/adenoma lesions, but their performance on submucosal lesions is generally lower. For example, SegFormer achieves the highest ACC of 0.9871 on polyp/adenoma lesions, and Swin reaches 0.9742, both showing strong recognition ability for this category. However, their ACC values on submucosal lesions decrease to 0.9007 and 0.9433, respectively. In contrast, the proposed method achieves 0.9797 on polyp/adenoma lesions and 0.9645 on submucosal lesions. It also shows better category balance than DeepLabv3+, whose ACC values are 0.9576 and 0.9362 for polyp/adenoma and submucosal lesions, respectively. This suggests that the proposed framework is more effective in maintaining stable lesion discrimination under visually ambiguous conditions.
In terms of segmentation error, the proposed method also shows clear advantages. Its SegErr values are 0.0955 for submucosal lesions and 0.0656 for polyp/adenoma lesions, both remaining below 0.10. By comparison, DeepLabv3+ achieves 0.2063 and 0.1132, while Swin achieves 0.1587 and 0.0783 on the two lesion categories, respectively. Although SegFormer achieves a relatively low SegErr of 0.0691 on polyp/adenoma lesions, its error on submucosal lesions increases to 0.1590. This indicates that existing methods tend to achieve good segmentation quality on one lesion type while sacrificing the other. In contrast, the proposed method maintains low segmentation error for both lesion categories, suggesting stronger robustness against missed lesion regions. This improvement can be attributed to the joint effect of Gaussian-based soft supervision, Tversky loss, and FN surrogate loss, which encourage more complete lesion recovery.
For center localization error, the proposed method obtains the lowest errors for both lesion categories, with CenErr values of 0.0368 for submucosal lesions and 0.0241 for polyp/adenoma lesions. By comparison, DeepLabv3+ achieves 0.0616 and 0.0416 on the two categories, while UPerNet reaches 0.0686 and 0.0332. Swin performs relatively better on polyp/adenoma lesions, with a CenErr of 0.0294, but its error on submucosal lesions increases to 0.0763. Similarly, SegFormer obtains 0.0273 on polyp/adenoma lesions but 0.0783 on submucosal lesions. These results indicate that although some models can achieve competitive localization on easier lesion types, they lack stability across both categories. In contrast, the proposed method achieves consistently low localization errors, demonstrating stronger spatial consistency. This benefit is likely related to the lightweight context enhancement module, which enriches contextual representation while preserving local structural details.
Similar observations can be found in abnormal region localization performance. The proposed method achieves LocDice values of 0.8802 for submucosal lesions and 0.9163 for polyp/adenoma lesions. These values are higher than those of DeepLabv3+, which obtains 0.8127 and 0.8820, and Swin, which obtains 0.8265 and 0.9011. Although SegFormer achieves a relatively competitive LocDice of 0.9067 on polyp/adenoma lesions, its performance on submucosal lesions remains much lower at 0.8134. PSPNet shows a similar imbalance, with 0.8835 on polyp/adenoma lesions but only 0.7803 on submucosal lesions. In contrast, the proposed method maintains high localization Dice values across both categories, indicating better regional consistency and stronger balance between lesion types.
While the class-wise results provide detailed comparisons for each lesion category, they do not directly reflect the overall performance differences among models. To provide a more intuitive and aggregated comparison, the average performance across the two lesion categories is further visualized as a heatmap, as shown in Figure 3. In the heatmap, the vertical axis represents different models, and the horizontal axis corresponds to the four evaluation metrics. Since higher values indicate better performance for ACC and LocDice, whereas lower values are preferred for SegErr and CenErr, the latter two metrics are transformed using 1 x to unify the interpretation direction, so that larger values consistently represent better performance.
As shown in Figure 3, the proposed method achieves the highest average ACC of 0.9721, indicating stronger and more stable lesion-category discrimination than all comparison models. In particular, it outperforms Swin, whose average ACC values is 0.9587. For segmentation completeness, the proposed method achieves the highest transformed 1 S e g E r r score of 0.9195, which is notably higher than those of SegFormer, and Swin, with scores of 0.8860, and 0.8815, respectively. Similar trends can be observed in center localization, where the proposed method obtains the highest transformed 1 C e n E r r score of 0.9696, outperforming PSPNet, DeepLabv3+, and UPerNet, whose scores are 0.9512, 0.9484, and 0.9491, respectively. For abnormal region localization, the proposed method also achieves the highest average LocDice of 0.8982, surpassing Swin and SegFormer, which obtain 0.8638 and 0.8600, respectively. Compared with these competitive baselines, the proposed framework shows stronger overlap consistency between predicted and ground-truth lesion regions, further demonstrating its robustness in challenging dual-type lesion scenarios.
While the quantitative results and heatmap analysis provide objective comparisons across different evaluation metrics, they do not directly reflect the visual quality of lesion delineation. To further examine the segmentation behavior of different models, qualitative visualization results on the validation set are provided in Figure 4. These examples allow a more intuitive comparison of lesion coverage, boundary precision, and false-positive regions across different methods. In Figure 4, the visualization results of different models on the validation set are presented. For submucosal lesions, the predicted lesion regions are marked in red, the ground-truth regions are shown in blue, and their overlapping regions are shown in magenta. For polyp/adenoma lesions, the predicted lesion regions are marked in green, the ground-truth regions are shown in blue, and the overlapping regions are displayed as magenta.
From the visualization results, it can be observed that the proposed method achieves more complete lesion coverage for submucosal lesions, with fewer missed regions compared with the baseline methods. In particular, models such as SegFormer and Swin tend to miss relatively large lesion regions, especially in cases with ambiguous boundaries or irregular lesion structures. This observation is consistent with their higher SegErr values reported in Table 2. In contrast, the proposed method maintains more complete lesion delineation, indicating stronger robustness against under-segmentation.
For polyp/adenoma lesions, some baseline models, such as PSPNet and UPerNet, tend to produce over-segmentation, where surrounding normal tissue is incorrectly predicted as lesion regions. This leads to less precise boundary localization and increased false-positive regions. By comparison, the proposed method achieves more accurate lesion delineation and better boundary fitting, with fewer false-positive predictions and more consistent overlap with the ground-truth regions.
These qualitative observations are consistent with the quantitative and heatmap analyses, further confirming that the proposed framework achieves more balanced lesion recognition and more accurate lesion delineation under ambiguous dual-type lesion conditions. Overall, the private-dataset results support the effectiveness of the proposed framework. To further evaluate its generalization ability, experiments on the public EDD2020 dataset are conducted, and the results are presented in Table 3. In the table, ↑ indicates that a higher value represents better performance, whereas ↓ indicates that a lower value represents better performance.
Compared with the private dataset, this dataset is more challenging due to its smaller sample size, more heterogeneous imaging conditions, and the merged neoplasia category, which contains cancer, high-grade dysplasia, and suspicious lesions. Therefore, the classification boundary between polyp and neoplasia can be less stable, and the evaluation should consider not only classification accuracy but also segmentation completeness and localization quality.
In terms of classification accuracy, the proposed method does not achieve the highest average ACC. Its average ACC is 0.9230, which is lower than those of SegFormer, SegNeXt, UPerNet, and DeepLabv3+, with values of 0.9730, 0.9698, 0.9563, and 0.9532, respectively. However, high classification accuracy does not necessarily correspond to better segmentation quality. For example, SegFormer achieves a perfect ACC of 1.0000 on neoplasia, but its SegErr reaches 0.2041 for neoplasia and 0.3356 for polyp, indicating that accurate category prediction alone does not guarantee complete lesion delineation.
For segmentation error, the proposed method achieves the best average result among all models, with an average SegErr of 0.1481. Specifically, it obtains 0.1338 for neoplasia and 0.1624 for polyp. In comparison, SegNeXt obtains relatively high ACC values for both neoplasia and polyp, but its SegErr increases to 0.1707 and 0.2985, respectively. Compared with the proposed method, these values are approximately 27.58% higher for neoplasia and 83.81% higher for polyp. DeepLabv3+ also shows higher SegErr values of 0.2019 and 0.3050. These results suggest that the proposed method is more effective in reducing missed lesion regions, especially when lesion appearance is heterogeneous and category boundaries are ambiguous.
For center localization error, the proposed method achieves an average CenErr of 0.0740. This value is slightly higher than that of DeepLabv3+, which obtains 0.0698, but lower than most other comparison methods, including PSPNet, UPerNet, FCN, SegFormer, Swin, and SegNeXt, whose values are 0.1010, 0.0847, 0.0806, 0.1105, 0.2400, and 0.0800, respectively. On the polyp category, most models show relatively large center localization errors, while the proposed method maintains a CenErr of 0.1085. This result is close to DeepLabv3+, which obtains 0.0962, and lower than PSPNet, UPerNet, SegFormer, Swin, and SegNeXt, whose values are 0.1674, 0.1331, 0.1642, 0.1807, and 0.1231, respectively. Although DeepLabv3+ achieves slightly better center localization, its LocDice is lower than that of the proposed method, suggesting that accurate center prediction does not necessarily imply better lesion-region overlap.
For abnormal region localization, the proposed method achieves the highest average LocDice of 0.7380. It obtains 0.8036 for neoplasia and 0.6724 for polyp, outperforming DeepLabv3+ in overall average performance, whose corresponding values are 0.7601 and 0.6448. It also achieves a higher average LocDice than SegNeXt, which obtains 0.8083 for neoplasia and 0.6511 for polyp. Although PSPNet and UPerNet show slightly higher LocDice on neoplasia, their performance on polyp drops to 0.6194 and 0.6145, respectively. This indicates that the proposed method provides more balanced localization performance across the two lesion categories.
Overall, the public-dataset results show that the proposed method is not the strongest in classification accuracy, but it achieves better segmentation completeness and abnormal-region localization. This is important for the dual-type lesion analysis task, where the clinical utility of the model depends not only on predicting the lesion category but also on accurately delineating the lesion region. The improvement in SegErr and LocDice suggests that the proposed soft supervision, context-enhanced decoding, and false negative-aware optimization are beneficial for improving segmentation quality under heterogeneous and ambiguous public-dataset conditions.
To provide a more intuitive overview of the average performance on the public dataset, the four average metrics are further visualized using a heatmap, as shown in Figure 5. As in the private-dataset analysis, SegErr and CenErr are transformed into 1 SegErr and 1 CenErr , respectively, so that larger values consistently indicate better performance.
As shown in Figure 5, different models show distinct strengths across the four metrics. DeepLabv3+ obtains higher scores than the proposed method in ACC and 1 CenErr , with values of 0.9532 and 0.9302, respectively. However, the proposed method achieves clearly better scores in 1 SegErr and LocDice, reaching 0.8519 and 0.7380, compared with 0.7465 and 0.7025 for DeepLabv3+. This indicates that although DeepLabv3+ has a slight advantage in classification and center localization, the proposed method provides better lesion coverage and region-level localization.
To further compare the overall tendency across the four normalized metrics, we calculate a simple aggregate score by summing ACC, 1 SegErr , 1 CenErr , and LocDice. Under this auxiliary comparison, the proposed method obtains a total score of 3.4389, which is higher than the scores of DeepLabv3+ and SegNeXt, which are 3.3324 and 3.3849, respectively.
Therefore, the heatmap analysis further supports the observation from Table 3: the proposed method does not simply pursue higher classification accuracy, but achieves stronger overall lesion analysis performance by improving segmentation completeness and abnormal-region localization. This behavior is consistent with the design of the proposed framework, especially the use of spatial soft supervision and false negative-aware optimization.
To further examine the segmentation behavior of different models beyond quantitative metrics, qualitative visualization results on representative validation samples from the public EDD2020 dataset are provided in Figure 6. Compared with numerical evaluation, these visual comparisons provide more intuitive evidence of lesion coverage, boundary delineation, and false negative regions, which are particularly important for evaluating model behavior under ambiguous lesion conditions. In Figure 6, the qualitative segmentation results of different models are presented for both neoplasia and polyp cases. For neoplasia lesions, the predicted regions are marked in green, the ground-truth regions are shown in blue, and the overlapping regions between prediction and ground truth are shown in magenta. For polyp lesions, the predicted regions are marked in red, while the ground-truth regions remain in blue, and the overlapping regions are shown in magenta.
For neoplasia cases, the proposed method demonstrates more complete lesion coverage, especially in peripheral and irregular regions of the lesion. Compared with the proposed method, several comparison models, such as PSPNet and UPerNet, tend to concentrate their predictions only on the central lesion area, while failing to recover the full lesion extent. Swin shows even larger deviations, with obvious under-segmentation and inaccurate regional responses. These observations are consistent with the quantitative SegErr results, where the proposed method achieves lower missed-region errors.
For polyp cases, the advantage of the proposed method becomes more evident. The predicted regions by the proposed framework show better consistency with the lesion boundaries and cover the lesion extent more completely. In comparison, SegFormer and PSPNet produce relatively conservative predictions, resulting in incomplete lesion coverage and missing peripheral structures. This phenomenon is particularly noticeable in irregular-shaped lesion regions, where accurate boundary recovery is more difficult.
It is worth noting that DeepLabv3+, which shows relatively competitive quantitative performance, does not exhibit the most visually extensive lesion coverage. Instead, its predictions are more concentrated in the central lesion area. This observation is consistent with its relatively high classification accuracy and competitive center localization performance, indicating that it can correctly identify lesion regions and localize lesion centers. However, its segmentation coverage remains less complete than that of the proposed method, which explains its inferior performance in SegErr and LocDice. This difference is clearly reflected in the visualization results.
Overall, the proposed method produces more complete lesion segmentation and more accurate boundary recovery, while the comparison methods tend to suffer from under-segmentation, especially in lesion corners, weak-boundary regions, and structurally complex areas. This behavior is likely related to the proposed soft-label supervision, which provides smoother spatial guidance near lesion boundaries, enabling the model to better capture intra-lesion structures and transition regions.
Although the proposed method achieves competitive performance on both datasets, the overall quantitative scores on EDD2020 are lower than those on the private dataset. This performance gap can be mainly attributed to several specific domain-shift factors rather than a single source of heterogeneity. To further illustrate the differences between the two datasets, representative examples from the private dataset and the public EDD2020 dataset are shown in Figure 7.
As shown in Figure 7, the private-dataset examples exhibit relatively consistent colonoscopic imaging characteristics, with more stable illumination, clearer lesion-background contrast, and less complex mucosal background interference. In contrast, the EDD2020 examples show greater variations in imaging conditions, including stronger illumination changes, more obvious specular reflection, more complex mucosal texture, and less distinct lesion boundaries. These differences are consistent with the fact that EDD2020 was collected from multiple institutions and multiple gastrointestinal anatomical sites, whereas the private dataset was obtained under relatively more consistent clinical acquisition conditions. Therefore, the model trained and evaluated on the private dataset can achieve higher scores, while direct evaluation on EDD2020 is more challenging due to acquisition-domain shift and anatomical-site shift.
Combining the results from both the private dataset and the public dataset, the proposed framework demonstrates consistently competitive performance against both CNN-based methods (such as FCN, PSPNet, DeepLabv3+, and UPerNet) and Transformer-based methods (such as SegFormer, Swin, and SegNeXt). Compared with CNN-based baselines, the proposed method achieves better lesion completeness and boundary consistency, while compared with Transformer-based baselines, it provides more stable performance across different lesion categories and avoids strong category imbalance.
These improvements can be mainly attributed to three aspects of the proposed framework. First, the joint learning strategy enables classification and segmentation to be optimized within a unified framework, improving consistency between semantic recognition and spatial delineation. Second, the soft-label supervision mechanism introduces smoother and more informative spatial guidance, which helps the model learn intra-lesion structures and boundary transitions more effectively. Third, the FN surrogate loss explicitly suppresses false negative regions, improving lesion completeness and reducing missed predictions.
More importantly, these advantages become more evident in challenging scenarios, including visually ambiguous lesions, small lesion regions, and unclear lesion boundaries, where conventional segmentation models often struggle to maintain stable performance. To further investigate the contribution of each component in the proposed framework, ablation experiments are conducted in the following section.

4.4. Ablation Study

To further validate the effectiveness of each component in the proposed framework, ablation experiments were conducted on the private dataset by progressively introducing the field-of-view (FOV) constraint, soft-label supervision, the enhanced decoder module, and auxiliary supervision. Starting from the baseline encoder–decoder framework, each component was incrementally added while keeping the other training settings unchanged. The quantitative results are summarized in Table 4. In the table, ↑ indicates that a higher value represents better performance, whereas ↓ indicates that a lower value represents better performance.
As shown in Table 4, the baseline model without additional modules achieves an average ACC of 0.9428, SegErr of 0.1682, CenErr of 0.0680, and LocDice of 0.8394. Although the baseline model provides a basic capacity for dual-type lesion classification and segmentation, its performance remains limited, especially for submucosal lesions. Specifically, the baseline model achieves an ACC of 0.9078, SegErr of 0.2152, CenErr of 0.0983, and LocDice of 0.7934 on submucosal lesions, indicating that this lesion type is more challenging due to its ambiguous appearance and less distinct boundary characteristics.
After introducing the FOV constraint, the average ACC increases from 0.9428 to 0.9637, while the average SegErr decreases from 0.1682 to 0.1267. Meanwhile, the average CenErr is reduced from 0.0680 to 0.0409, and the average LocDice improves from 0.8394 to 0.8726. The improvement is particularly evident for submucosal lesions, where ACC increases from 0.9078 to 0.9716, SegErr decreases from 0.2152 to 0.1444, CenErr decreases from 0.0983 to 0.0447, and LocDice increases from 0.7934 to 0.8606. These results indicate that the FOV constraint effectively suppresses irrelevant background interference and encourages the model to focus on lesion-relevant regions, thereby improving segmentation completeness and spatial localization. Although the ACC and LocDice of polyp lesions show slight fluctuations after introducing the FOV constraint, the overall performance is improved, suggesting that the FOV constraint mainly benefits the more ambiguous submucosal lesions.
By further incorporating soft-label supervision, the model achieves additional improvements in the overall evaluation metrics. The average ACC increases from 0.9637 to 0.9677, the average SegErr decreases from 0.1267 to 0.0842, and the average CenErr decreases from 0.0409 to 0.0314. The average LocDice also increases from 0.8726 to 0.8921. For polyp lesions, the improvement is substantial, with SegErr decreasing from 0.1089 to 0.0613 and LocDice increasing from 0.8845 to 0.9173. These results suggest that soft-label supervision can alleviate overly rigid decision boundaries and provide smoother spatial supervision, which is beneficial for improving segmentation robustness under ambiguous lesion appearances.
After adding the enhanced decoder module, the model further improves the average ACC from 0.9677 to 0.9684 and reduces the average SegErr from 0.0842 to 0.0805. For submucosal lesions, ACC increases from 0.9574 to 0.9645, SegErr decreases from 0.1071 to 0.0959, and LocDice increases from 0.8669 to 0.8707. These results indicate that the enhanced decoder strengthens contextual representation and improves the recovery of lesion structures, particularly for submucosal lesions. This suggests that the enhanced decoder improves segmentation error reduction and submucosal lesion representation.
Finally, after introducing auxiliary supervision, the model achieves the best overall performance in terms of ACC, CenErr, and LocDice. The average ACC increases from 0.9684 to 0.9721, the average CenErr decreases from 0.0358 to 0.0304, and the average LocDice increases from 0.8888 to 0.8982. The average SegErr remains at 0.0805, indicating that the segmentation error is maintained at the lowest level while localization consistency is further improved. For submucosal lesions, LocDice increases from 0.8707 to 0.8802, and CenErr decreases from 0.0425 to 0.0368. For polyp lesions, ACC increases from 0.9723 to 0.9797, CenErr decreases from 0.0291 to 0.0241, and LocDice increases from 0.9068 to 0.9163. These results demonstrate that auxiliary supervision provides effective optimization signals for intermediate features, improving gradient propagation and enhancing the learning of lesion-related structural details.
Overall, the ablation results demonstrate that each component contributes to the proposed framework from different aspects. The FOV constraint improves the model’s focus on valid endoscopic regions and substantially enhances the performance on submucosal lesions. Soft-label supervision improves segmentation robustness by providing smoother and more tolerant supervision under ambiguous lesion conditions. The enhanced decoder strengthens contextual representation and reduces segmentation error, especially for submucosal lesions. Auxiliary supervision further improves localization consistency and achieves the best overall performance. Compared with the baseline model, the final model improves the average ACC from 0.9428 to 0.9721, reduces SegErr from 0.1682 to 0.0805, reduces CenErr from 0.0680 to 0.0304, and improves LocDice from 0.8394 to 0.8982. These results validate the effectiveness and rationality of the proposed module design.
To further provide intuitive insight into how each module improves the segmentation performance, representative qualitative examples from the ablation study are shown in Figure 8. In Figure 8 the color-coded regions indicate the relationship between the ground truth and the predicted lesion areas. For submucosal lesions, the ground-truth regions are shown in blue, the overlapping regions between the prediction and the ground truth are shown in magenta, and the false-positive regions, namely areas predicted as lesions but not annotated as lesions in the ground truth, are shown in red. For polyp/adenoma lesions, the ground-truth regions are shown in blue, the overlapping regions between the prediction and the ground truth are shown in magenta, and the false-positive regions are shown in green.
As shown in the representative case of submucosal lesions, both the baseline model and the model with the FOV constraint fail to correctly detect the lesion region. After introducing soft-label supervision, the model begins to identify the lesion boundary, but a relatively large deviation is still observed, with part of the background being incorrectly segmented as a lesion. After the enhanced decoder is added, the predicted region becomes more concentrated around the lesion center, and the false-positive response in the background is reduced. With the further introduction of auxiliary supervision, the proposed model produces fewer misclassified regions, recovers a larger portion of the true lesion area, and yields a predicted segmentation center that is closer to the center of the ground truth. These observations suggest that soft-label supervision improves sensitivity to ambiguous lesion boundaries, while the enhanced decoder and auxiliary supervision further strengthen contextual discrimination and spatial localization.
For the polyp/adenoma case, the proposed model can effectively avoid the influence of illumination interference. In contrast, the other ablation settings show varying degrees of false-positive prediction in the reflective region, indicating that the specular highlight can be easily confused with lesion tissue. The final model successfully separates the true lesion region from the background, demonstrating that the proposed framework achieves better robustness to illumination variation and more reliable lesion-background discrimination.

5. Discussion

This study investigates joint classification and segmentation of dual-type lesions in colonoscopic images, with a particular focus on scenarios where lesion categories are visually ambiguous and difficult to distinguish. Unlike conventional approaches that assume a single lesion type, the proposed framework explicitly considers the coupling between semantic discrimination and spatial delineation, enabling more consistent lesion analysis in complex clinical settings.

5.1. Effectiveness of the Proposed Framework

The experimental results demonstrate that the proposed method achieves competitive and generally consistent improvements across multiple evaluation metrics, particularly in segmentation completeness and localization stability. These improvements can be attributed to the coordinated design of task formulation, feature representation, and optimization strategy.
First, formulating the problem as a unified classification–segmentation task allows the model to jointly learn lesion identity and spatial extent. This is especially important in ambiguous scenarios, where segmentation-only methods may focus on region coverage without sufficiently capturing category-related characteristics. By jointly considering semantic discrimination and spatial delineation, the model achieves better consistency between lesion category and lesion region.
Second, the integration of enhanced feature representation and auxiliary supervision improves the utilization of both high-level semantic features and low-level spatial details. The enhanced decoder module enriches contextual information during multi-scale fusion, while auxiliary supervision provides direct guidance to intermediate features. The ablation results show that these components contribute to reduced segmentation error and improved localization performance, especially for challenging lesion types.
Third, the proposed optimization strategy further improves robustness. Gaussian-based soft-label supervision provides spatially adaptive guidance under ambiguous lesion conditions, while the combination of Tversky loss and FN surrogate loss improves sensitivity to lesion regions and reduces missed segmentation. As a result, the model achieves a better balance between category discrimination, lesion-region recovery, and localization accuracy.
Overall, these components work in a complementary manner to address ambiguous lesion appearance and task coupling, leading to improved overall performance compared with representative segmentation methods.

5.2. Clinical Relevance and Practical Implications

From a clinical perspective, accurate identification and localization of different lesion types in colonoscopy are important for diagnosis, treatment planning, and follow-up management. In real-world scenarios, lesions such as submucosal lesions and polyps/adenomas may exhibit overlapping visual characteristics, making reliable differentiation challenging.
The proposed framework provides a potential solution by jointly predicting lesion category and spatial extent within a unified model. Such a joint analysis mechanism may assist clinicians in identifying lesion types while also assessing their precise locations and regions, thereby improving diagnostic efficiency and reducing the risk of missed or incomplete lesion interpretation.
Moreover, the improved segmentation robustness observed in both private and public datasets suggests that the method may be useful under challenging imaging conditions, such as ambiguous boundaries, low contrast, or atypical lesion appearance. These results indicate the potential of the proposed approach for computer-aided endoscopic diagnosis systems.

5.3. Limitations

Despite the promising results, several limitations should be noted. First, the classification performance, particularly on the public dataset, remains less stable than segmentation-related performance. Although the proposed method achieves strong results in segmentation error and localization Dice, its average classification accuracy does not exceed all comparison models. This indicates that the model’s semantic discrimination ability under cross-dataset or heterogeneous data conditions still requires improvement.
One possible reason is that the current framework mainly strengthens classification through supervision and optimization design, while the architectural components are more directly oriented toward segmentation and spatial representation. Therefore, category-discriminative feature learning still needs to be further enhanced in future work.
Second, the current study focuses on a dual-type lesion setting. Although this setting reflects clinically meaningful ambiguity between visually similar lesions, it does not fully cover the complexity of real-world colonoscopic scenarios involving multiple lesion categories and more diverse disease patterns. The scalability and generalization ability of the proposed framework still need to be validated on larger, multi-center, and multi-class datasets.

5.4. Future Work

Future work can be conducted in several directions. First, more effective category-discriminative representation learning should be explored to improve classification robustness, especially under cross-dataset and domain-shift conditions. This may involve introducing stronger semantic modeling mechanisms or domain adaptation strategies.
Second, the proposed framework can be extended from dual-type lesion analysis to multi-class gastrointestinal lesion analysis, enabling joint recognition and segmentation of a broader range of abnormalities. In addition, more comprehensive error case analysis and visualization studies should be conducted to better understand model behavior under different lesion types, boundary conditions, and image quality levels.

6. Conclusions

This paper addresses the challenging task of joint classification and segmentation of dual-type lesions in colonoscopic images, where lesion categories may be visually ambiguous and difficult to distinguish. Unlike conventional approaches that assume a single lesion type, the proposed framework jointly models semantic discrimination and spatial delineation within a unified learning paradigm.
To this end, a jointly supervised architecture is developed by integrating hierarchical feature representation, context enhancement, and ambiguity-aware optimization. By incorporating Gaussian-based soft-label supervision, auxiliary learning, and false negative-aware loss design, the proposed method improves the consistency between lesion identification and lesion-region delineation, particularly in challenging cases with unclear boundaries or overlapping visual characteristics.
Experiments on both private and public datasets demonstrate that the proposed method achieves strong performance in segmentation accuracy and localization stability, while maintaining competitive classification capability. The ablation results further confirm that the main components contribute complementary improvements to the overall framework.
Despite these promising results, classification performance under cross-dataset conditions remains a limitation, indicating the need for stronger semantic generalization. Future work will focus on enhancing category-discriminative representation learning, strengthening the interaction between classification and segmentation, and extending the framework to more complex multi-class clinical settings. The proposed framework has the potential to assist clinical decision-making in gastrointestinal endoscopy by providing more reliable lesion identification and region delineation.

Author Contributions

Conceptualization, S.C. and L.M.; methodology, S.C.; software, R.L.; validation, S.C. and R.L.; formal analysis, S.C., K.J. and X.S.; investigation, K.J. and X.S.; data curation, K.J. and X.S.; writing—original draft preparation, S.C.; writing—review and editing, S.C. and L.M.; supervision, L.M.; project administration, L.M.; funding acquisition, L.M. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by National Key R&D Program of China (Grant No. 2024YFC2417403).

Institutional Review Board Statement

This study was conducted in accordance with the Declaration of Helsinki and approved by the Institutional Review Board of Weihai Municipal Hospital, Cheeloo College of Medicine, Shandong University (Approval No. 2020027; date of approval: 6 June 2020). The study involves retrospective analysis of anonymized colonoscopic images.

Informed Consent Statement

Patient consent was waived due to the retrospective nature of the study and the use of anonymized data.

Data Availability Statement

The private dataset used in this study is not publicly available due to privacy and ethical restrictions. The public dataset (EDD2020) is available at: https://ead2020.grand-challenge.org/ (accessed on 28 April 2026).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Xun, S.; Li, D.; Zhu, H.; Chen, M.; Wang, J.; Li, J.; Chen, M.; Wu, B.; Zhang, H.; Chai, X.; et al. Generative adversarial networks in medical image segmentation: A review. Comput. Biol. Med. 2022, 140, 105063. [Google Scholar] [CrossRef] [Scilit]
  2. Barzegar, S.; Khan, N. SemiSeg-CAW: Semi-Supervised Segmentation of Ultrasound Images by Leveraging Class-Level Information and an Adaptive Multi-Loss Function. Mach. Learn. Knowl. Extr. 2025, 7, 124. [Google Scholar] [CrossRef] [Scilit]
  3. Borgli, H.; Stensland, H.K.; Halvorsen, P. Automatic prompt generation using class activation maps for foundational models: A polyp segmentation case study. Mach. Learn. Knowl. Extr. 2025, 7, 22. [Google Scholar] [CrossRef] [Scilit]
  4. Xia, S.; Krishnan, S.M.; Tjoa, M.P.; Goh, P.M. A novel methodology for extracting colon’s lumen from colonoscopic images. J. Syst. Cybern. Inform. 2003, 1, 7–12. [Google Scholar]
  5. Tajbakhsh, N.; Gurudu, S.R.; Liang, J. Automatic polyp detection using global geometric constraints and local intensity variation patterns. In Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention, Boston, MA, USA, 14–18 September 2014; pp. 179–187. [Google Scholar] [CrossRef] [Scilit]
  6. Hwang, S.; Oh, J.; Tavanapong, W.; Wong, J.; De Groen, P.C. Polyp detection in colonoscopy video using elliptical shape feature. In Proceedings of the 2007 IEEE International Conference on Image Processing, San Antonio, TX, USA, 16–19 September 2007; pp. II-465–II-468. [Google Scholar] [CrossRef] [Scilit]
  7. Iakovidis, D.K.; Koulaouzidis, A. Automatic lesion detection in wireless capsule endoscopy—A simple solution for a complex problem. In Proceedings of the 2014 IEEE International Conference on Image Processing (ICIP), Paris, France, 27–30 October 2014; pp. 2236–2240. [Google Scholar] [CrossRef] [Scilit]
  8. Ronneberger, O.; Fischer, P.; Brox, T. U-net: Convolutional networks for biomedical image segmentation. In Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention, Munich, Germany, 5–9 October 2015; pp. 234–241. [Google Scholar] [CrossRef] [Scilit]
  9. Zhou, Z.; Rahman Siddiquee, M.M.; Tajbakhsh, N.; Liang, J. Unet++: A nested u-net architecture for medical image segmentation. In Proceedings of the International Workshop on Deep Learning in Medical Image Analysis, Granada, Spain, 20 September 2018; pp. 3–11. [Google Scholar] [CrossRef] [Scilit]
  10. Chen, L.-C.; Zhu, Y.; Papandreou, G.; Schroff, F.; Adam, H. Encoder-decoder with atrous separable convolution for semantic image segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 801–818. [Google Scholar] [CrossRef] [Scilit]
  11. Jha, D.; Smedsrud, P.H.; Johansen, D.; de Lange, T.; Johansen, H.D.; Halvorsen, P.; Riegler, M.A. A Comprehensive Study on Colorectal Polyp Segmentation With ResUNet++, Conditional Random Field and Test-Time Augmentation. IEEE J. Biomed. Health Inform. 2021, 25, 2029–2040. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  12. Fan, D.-P.; Ji, G.-P.; Zhou, T.; Chen, G.; Fu, H.; Shen, J.; Shao, L. Pranet: Parallel reverse attention network for polyp segmentation. In Proceedings of the International Conference on Medical Image Computing and Computer Assisted Intervention, Lima, Peru, 4–8 October 2020; pp. 263–273. [Google Scholar] [CrossRef] [Scilit]
  13. Dong, B.; Wang, W.; Fan, D.-P.; Li, J.; Fu, H.; Shao, L. Polyp-PVT: Polyp Segmentation with Pyramid Vision Transformers. CAAI Artif. Intell. Res. 2023, 2, 9150015. [Google Scholar] [CrossRef] [Scilit]
  14. Garbaz, A.; Oukdach, Y.; Charfi, S.; El Ansari, M.; Koutti, L.; Hedabou, M.; Oujaoura, M.; Lagsoun, A.M. XCC-Net: An X-Shaped Collective Convolution Network Architecture for Medical Image Segmentation. Mach. Learn. Knowl. Extr. 2025, 8, 3. [Google Scholar] [CrossRef] [Scilit]
  15. Zhu, S.; Gao, J.; Liu, L.; Yin, M.; Lin, J.; Xu, C.; Xu, C.; Zhu, J. Public Imaging Datasets of Gastrointestinal Endoscopy for Artificial Intelligence: A Review. J. Digit. Imaging 2023, 36, 2578–2601. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  16. Jiang, H.; Diao, Z.; Shi, T.; Zhou, Y.; Wang, F.; Hu, W.; Zhu, X.; Luo, S.; Tong, G.; Yao, Y.D. A review of deep learning-based multiple-lesion recognition from medical images: Classification, detection and segmentation. Comput. Biol. Med. 2023, 157, 106726. [Google Scholar] [CrossRef] [Scilit]
  17. Li, C.; Liu, J.; Tang, J. Simultaneous segmentation and classification of colon cancer polyp images using a dual branch multi-task learning network. Math. Biosci. Eng. 2024, 21, 2024–2049. [Google Scholar] [CrossRef] [Scilit]
  18. Zhao, Y.; Wang, X.; Che, T.; Bao, G.; Li, S. Multi-task deep learning for medical image computing and analysis: A review. Comput. Biol. Med. 2023, 153, 106496. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  19. Tang, S.; Yu, X.; Cheang, C.F.; Liang, Y.; Zhao, P.; Yu, H.H.; Choi, I.C. Transformer-based multi-task learning for classification and segmentation of gastrointestinal tract endoscopic images. Comput. Biol. Med. 2023, 157, 106723. [Google Scholar] [CrossRef] [Scilit]
  20. Wu, Z.; Ge, R.; Wen, M.; Liu, G.; Chen, Y.; Zhang, P.; He, X.; Hua, J.; Luo, L.; Li, S. ELNet: Automatic classification and segmentation for esophageal lesions using convolutional neural network. Med. Image Anal. 2021, 67, 101838. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  21. Zhou, Y.; Chen, H.; Li, Y.; Liu, Q.; Xu, X.; Wang, S.; Yap, P.T.; Shen, D. Multi-task learning for segmentation and classification of tumors in 3D automated breast ultrasound images. Med. Image Anal. 2021, 70, 101918. [Google Scholar] [CrossRef] [Scilit]
  22. Houwen, B.; Nass, K.J.; Vleugels, J.L.A.; Fockens, P.; Hazewinkel, Y.; Dekker, E. Comprehensive review of publicly available colonoscopic imaging databases for artificial intelligence research: Availability, accessibility, and usability. Gastrointest. Endosc. 2023, 97, 184–199.e16. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  23. Mei, J.; Zhou, T.; Huang, K.; Zhang, Y.; Zhou, Y.; Wu, Y.; Fu, H. A survey on deep learning for polyp segmentation: Techniques, challenges and future trends. Vis. Intell. 2025, 3, 1. [Google Scholar] [CrossRef] [Scilit]
  24. Mahmud, T.; Paul, B.; Fattah, S.A. PolypSegNet: A modified encoder-decoder architecture for automated polyp segmentation from colonoscopy images. Comput. Biol. Med. 2021, 128, 104119. [Google Scholar] [CrossRef] [Scilit]
  25. Lewis, J.; Cha, Y.-J.; Kim, J. Dual encoder–decoder-based deep polyp segmentation network for colonoscopy images. Sci. Rep. 2023, 13, 1183. [Google Scholar] [CrossRef] [Scilit]
  26. Zhang, R.; Li, G.; Li, Z.; Cui, S.; Qian, D.; Yu, Y. Adaptive context selection for polyp segmentation. In Proceedings of the International Conference on Medical Image Computing and Computer Assisted Intervention, Lima, Peru, 29 September 2020; pp. 253–262. [Google Scholar] [CrossRef] [Scilit]
  27. Wei, J.; Hu, Y.; Zhang, R.; Li, Z.; Zhou, S.K.; Cui, S. Shallow attention network for polyp segmentation. In Proceedings of the International Conference on Medical Image Computing and Computer Assisted Intervention, Strasbourg, France, 21 September 2021; pp. 699–708. [Google Scholar] [CrossRef] [Scilit]
  28. Liu, J.; Chen, Q.; Zhang, Y.; Wang, Z.; Deng, X.; Wang, J. Multi-level feature fusion network combining attention mechanisms for polyp segmentation. Inf. Fusion 2024, 104, 102195. [Google Scholar] [CrossRef] [Scilit]
  29. Tong, Y.; Chen, Z.; Zhou, Z.; Hu, Y.; Li, X.; Qiao, X. An Edge-Enhanced Network for Polyp Segmentation. Bioengineering 2024, 11, 959. [Google Scholar] [CrossRef] [Scilit]
  30. Li, S.; Ren, Y.; Yu, Y.; Jiang, Q.; He, X.; Li, H. A survey of deep learning algorithms for colorectal polyp segmentation. Neurocomputing 2025, 614, 128767. [Google Scholar] [CrossRef] [Scilit]
  31. Zhu, M.; Chen, Z.; Yuan, Y. DSI-Net: Deep Synergistic Interaction Network for Joint Classification and Segmentation With Endoscope Images. IEEE Trans. Med. Imaging 2021, 40, 3315–3325. [Google Scholar] [CrossRef] [Scilit]
  32. Yu, X.; Tang, S.; Cheang, C.F.; Yu, H.H.; Choi, I.C. Multi-Task Model for Esophageal Lesion Analysis Using Endoscopic Images: Classification with Image Retrieval and Segmentation with Attention. Sensors 2022, 22, 283. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  33. Fan, Z.; Gong, P.; Tang, S.; Lee, C.U.; Zhang, X.; Song, P.; Chen, S.; Li, H. Joint localization and classification of breast masses on ultrasound images using an auxiliary attention-based framework. Med. Image Anal. 2023, 90, 102960. [Google Scholar] [CrossRef] [Scilit]
  34. Aumente-Maestro, C.; Diez, J.; Remeseiro, B. A multi-task framework for breast cancer segmentation and classification in ultrasound imaging. Comput. Methods Programs Biomed. 2025, 260, 108540. [Google Scholar] [CrossRef] [Scilit]
  35. Goceri, E. Medical image data augmentation: Techniques, comparisons and interpretations. Artif. Intell. Rev. 2023, 56, 12561–12605. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  36. Qadir, H.A.; Shin, Y.; Solhusvik, J.; Bergsland, J.; Aabakken, L.; Balasingham, I. Toward real-time polyp detection using fully CNNs for 2D Gaussian shapes prediction. Med. Image Anal. 2021, 68, 101897. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  37. Liu, Z.; Mao, H.; Wu, C.-Y.; Feichtenhofer, C.; Darrell, T.; Xie, S. A convnet for the 2020s. In Proceedings of the IEEE/CVF conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 11976–11986. [Google Scholar] [CrossRef] [Scilit]
  38. Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 2818–2826. [Google Scholar] [CrossRef] [Scilit]
  39. Salehi, S.S.M.; Erdogmus, D.; Gholipour, A. Tversky loss function for image segmentation using 3D fully convolutional deep networks. In Proceedings of the Machine Learning in Medical Imaging, Quebec City, QC, Canada, 10 September 2017; pp. 379–387. [Google Scholar] [CrossRef] [Scilit]
  40. Ali, S.; Braden, B.; Lamarque, D.; Realdon, S.; Bailey, A.; Cannizzaro, R.; Ghatwary, N.; Rittscher, J.; Daul, C.; East, J. Endoscopy Disease Detection and Segmentation (EDD2020); IEEE DataPort 2020; IEEE: Piscataway, NJ, USA, 2020. [Google Scholar] [CrossRef]
  41. Chavarrias-Solano, P.E.; Teevno, M.A.; Ochoa-Ruiz, G.; Ali, S. Knowledge distillation with a class-aware loss for endoscopic disease detection. In Proceedings of the MICCAI Workshop on Cancer Prevention Through Early Detection, Singapore, 22 September 2022; pp. 67–76. [Google Scholar] [CrossRef] [Scilit]
  42. Long, J.; Shelhamer, E.; Darrell, T. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 3431–3440. [Google Scholar] [CrossRef] [Scilit]
  43. Zhao, H.; Shi, J.; Qi, X.; Wang, X.; Jia, J. Pyramid scene parsing network. In Proceedings of the IEEE conference on computer vision and pattern recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2881–2890. [Google Scholar] [CrossRef] [Scilit]
  44. Xiao, T.; Liu, Y.; Zhou, B.; Jiang, Y.; Sun, J. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 418–434. [Google Scholar]
  45. Xie, E.; Wang, W.; Yu, Z.; Anandkumar, A.; Alvarez, J.M.; Luo, P. SegFormer: Simple and efficient design for semantic segmentation with transformers. In Proceedings of the 35th Conference on Neural Information Processing Systems, Online, 6–14 December 2021; pp. 12077–12090. [Google Scholar]
  46. Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada, 10–17 October 2021; pp. 10012–10022. [Google Scholar] [CrossRef] [Scilit]
  47. Guo, M.-H.; Lu, C.-Z.; Hou, Q.; Liu, Z.; Cheng, M.-M.; Hu, S.-M. SegNeXt: Rethinking convolutional attention design for semantic segmentation. In Proceedings of the Advances in Neural Information Processing Systems, New Orleans, LA, USA, 28 November–9 December 2022; pp. 1140–1156. [Google Scholar]
Figure 1. Overall architecture of the proposed model.
Figure 1. Overall architecture of the proposed model.
Bioengineering 13 00679 g001
Figure 2. Integration of the Lightweight Context Enhancement module into lateral feature processing.
Figure 2. Integration of the Lightweight Context Enhancement module into lateral feature processing.
Bioengineering 13 00679 g002
Figure 3. Heatmap of the average performance metrics on the private dataset.
Figure 3. Heatmap of the average performance metrics on the private dataset.
Bioengineering 13 00679 g003
Figure 4. Qualitative comparison of segmentation results on the private dataset.
Figure 4. Qualitative comparison of segmentation results on the private dataset.
Bioengineering 13 00679 g004
Figure 5. Heatmap of the average performance metrics on the public dataset.
Figure 5. Heatmap of the average performance metrics on the public dataset.
Bioengineering 13 00679 g005
Figure 6. Qualitative comparison of segmentation results on the public dataset.
Figure 6. Qualitative comparison of segmentation results on the public dataset.
Bioengineering 13 00679 g006
Figure 7. Examples of cross-dataset differences.
Figure 7. Examples of cross-dataset differences.
Bioengineering 13 00679 g007
Figure 8. Representative qualitative results of the ablation study.
Figure 8. Representative qualitative results of the ablation study.
Bioengineering 13 00679 g008
Table 1. Summary of the datasets used in this study.
Table 1. Summary of the datasets used in this study.
DatasetTypeImages
Private datasetPolyp/Adenoma2738
Submucosal lesion2050
EDD2020Polyp120
Neoplasia210
Table 2. Comparative experimental results on the private dataset.
Table 2. Comparative experimental results on the private dataset.
ACC↑Segerr↓Cenerr↓LocDice↑Models
Submucosal lesion0.96450.09550.03680.8802Propose
Polyp/Adenoma0.97970.06560.02410.9163
Average0.97210.08050.03040.8982
Submucosal lesion0.93620.20630.06160.8127Deeplabv3+
Polyp/Adenoma0.95760.11320.04160.8820
Average0.94690.15970.05160.8473
Submucosal lesion0.92910.24430.06820.7803PSPNet
Polyp/Adenoma0.95940.10930.02930.8835
Average0.94420.17680.04880.8319
Submucosal lesion0.93620.20820.06860.8056UPerNet
Polyp/Adenoma0.96490.10450.03320.8884
Average0.95060.15640.05090.8470
Submucosal lesion0.92200.23380.07510.7841FCN
Polyp/Adenoma0.96130.11130.04250.8798
Average0.94160.17260.05880.8319
Submucosal lesion0.90070.15900.07830.8134Segformer
Polyp/Adenoma0.98710.06910.02730.9067
Average0.94390.11400.05280.8600
Submucosal lesion0.94330.15870.07630.8265Swin
Polyp/Adenoma0.97420.07830.02940.9011
Average0.95870.11850.05290.8638
Submucosal lesion0.95040.16190.0660.8214SegNext
Polyp/Adenoma0.94830.09520.04000.8828
Average0.94930.12850.05300.8521
Table 3. Comparative experimental results on the public dataset.
Table 3. Comparative experimental results on the public dataset.
ACC↑Segerr↓Cenerr↓LocDice↑Models
Neoplasia0.90000.13380.03940.8036Propose
Polyp0.94590.16240.10850.6724
Average0.92300.14810.07400.7380
Neoplasia0.93330.20190.04350.7601Deeplabv3+
Polyp0.97300.30500.09620.6448
Average0.95320.25350.06980.7025
Neoplasia0.96670.14310.03450.8198PSPNet
Polyp0.91890.37540.16740.6194
Average0.94280.25930.10100.7196
Neoplasia0.96670.16710.03620.8185UPerNet
Polyp0.94590.38500.13310.6145
Average0.95630.27600.08470.7165
Neoplasia0.93330.12780.04030.8219FCN
Polyp0.94590.33370.12080.6221
Average0.93960.23080.08060.7220
Neoplasia1.00000.20410.05670.7536Segformer
Polyp0.94590.33560.16420.6093
Average0.97300.26980.11050.6814
Neoplasia0.86670.49050.29930.4469Swin
Polyp0.94590.45450.18070.4440
Average0.90630.47250.24000.4455
Neoplasia0.96670.17070.03680.8083SegNext
Polyp0.97300.29850.12310.6511
Average0.96980.23460.08000.7297
Table 4. Ablation study results.
Table 4. Ablation study results.
ACC↑Segerr↓Cenerr↓LocDice↑Add
Submucosal lesion0.90780.21520.09830.7934Base
Polyp/Adenoma0.97790.12110.03770.8854
Average0.94280.16820.06800.8394
Submucosal lesion0.97160.14440.04470.8606FOV
Polyp/Adenoma0.95570.10890.03720.8845
Average0.96370.12670.04090.8726
Submucosal lesion0.95740.10710.03940.8669Softlabel
Polyp/Adenoma0.97790.06130.02340.9173
Average0.96770.08420.03140.8921
Submucosal lesion0.96450.09590.04250.8707Enhanced Decoder
Polyp/Adenoma0.97230.06510.02910.9068
Average0.96840.08050.03580.8888
Submucosal lesion0.96450.09550.03680.8802Auxiliary
Polyp/Adenoma0.97970.06560.02410.9163
Average0.97210.08050.03040.8982
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.

Share and Cite

MDPI and ACS Style

Chen, S.; Jiang, K.; Lin, R.; Su, X.; Ma, L. A Unified Framework for Classification and Segmentation of Ambiguous Dual-Type Lesions in Colonoscopic Images. Bioengineering 2026, 13, 679. https://doi.org/10.3390/bioengineering13060679

AMA Style

Chen S, Jiang K, Lin R, Su X, Ma L. A Unified Framework for Classification and Segmentation of Ambiguous Dual-Type Lesions in Colonoscopic Images. Bioengineering. 2026; 13(6):679. https://doi.org/10.3390/bioengineering13060679

Chicago/Turabian Style

Chen, Siqi, Kun Jiang, Ruishi Lin, Xiufeng Su, and Liyong Ma. 2026. "A Unified Framework for Classification and Segmentation of Ambiguous Dual-Type Lesions in Colonoscopic Images" Bioengineering 13, no. 6: 679. https://doi.org/10.3390/bioengineering13060679

APA Style

Chen, S., Jiang, K., Lin, R., Su, X., & Ma, L. (2026). A Unified Framework for Classification and Segmentation of Ambiguous Dual-Type Lesions in Colonoscopic Images. Bioengineering, 13(6), 679. https://doi.org/10.3390/bioengineering13060679

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop