Next Article in Journal
Competitive Match Running Speed Demands and Impact of Changing the Head Coach in Non-League Professional Football
Previous Article in Journal
Detection and Mitigation of GNSS Gross Errors Utilizing the CEEMD and IQR Methods to Determine Sea Surface Height Using GNSS Buoys
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Context-Driven Active Contour (CDAC): A Novel Medical Image Segmentation Method Based on Active Contour and Contextual Understanding

by
Suane Pires Pinheiro da Silva
1,
Roberto Fernandes Ivo
1,
Calleo Belo Barroso
2,
João Carlos Nepomuceno Fernandes
2,
Thiago Ferreira Portela
2,
Aldísio Gonçalves Medeiros
3,
Pedro Henrique F. de Sousa
3,
Houbing Song
4 and
Pedro Pedrosa Rebouças Filho
2,*
1
Department of Teleinformatics Engineering, Federal University of Ceará (UFC), Fortaleza 60440-900, CE, Brazil
2
Federal Institute of Education, Science and Technology of Ceara (IFCE), Fortaleza 60040-531, CE, Brazil
3
Anita’s Gardens Campus, Federal University of Ceará (UFC), Itapajé 62600-000, CE, Brazil
4
Department of Information Systems, University of Maryland, Baltimore County (UMBC), Baltimore, MD 21250, USA
*
Author to whom correspondence should be addressed.
Sensors 2025, 25(9), 2864; https://doi.org/10.3390/s25092864
Submission received: 13 February 2025 / Revised: 20 March 2025 / Accepted: 22 March 2025 / Published: 30 April 2025
(This article belongs to the Section Biomedical Sensors)

Abstract

:
Lung diseases, including chronic obstructive pulmonary disease (COPD) and pulmonary fibrosis, pose significant health challenges due to their high morbidity and mortality rates. Computed tomography (CT) scans play a critical role in early diagnosis and disease management, yet traditional segmentation methods often falter in addressing anatomical variability and pathological complexity. To overcome these limitations, this study introduces the context-driven active contour (CDAC), a new segmentation method that combines active contour models (ACMs) with contextual analysis. CDAC leverages contextual information from image embeddings and expert annotations to refine segmentation precision. The algorithm employs contextual attention force (CAF) as an external energy term and contextual balloon force (CBF) as an internal energy term, enabling robust contour adaptation. Evaluations were conducted on CT images of healthy lungs, as well as those affected by COPD and pulmonary fibrosis. CDAC achieved notable performance metrics, including a Dice coefficient of 96.8% for healthy lungs, an Accuracy of 94.5% for COPD, and a Jaccard Index of 92.3% for pulmonary fibrosis. These results demonstrate the method’s effectiveness and adaptability. By integrating contextual insights, CDAC offers a promising solution for enhancing computer-aided diagnostic (CAD) systems in the management of lung diseases.

1. Introduction

Lung diseases, including chronic obstructive pulmonary disease (COPD) and pulmonary fibrosis, are among the leading causes of morbidity and mortality worldwide [1,2,3,4]. These conditions pose significant public health challenges, particularly as the global burden of respiratory diseases continues to rise due to an aging population and increasing exposure to environmental risk factors such as air pollution and tobacco use [5,6]. Early detection and accurate monitoring of these diseases are essential to improving patient outcomes, highlighting the importance of developing advanced diagnostic tools [7,8].
Computed tomography (CT) is a critical imaging modality for the diagnosis of lung diseases, providing detailed cross-sectional images that allow accurate visualization of lung structures [9]. However, traditional methods for analyzing CT images, such as manual segmentation, are time-consuming, prone to variability, and inadequate for handling complex cases with significant anatomical or pathological variability [10]. These limitations have driven the exploration of automated segmentation techniques to increase diagnostic accuracy and efficiency.
Current research in automated segmentation has made significant progress with the development of advanced methodologies, including active contour models (ACMs), region-growing algorithms, and deep learning approaches [11,12]. ACMs, introduced by [11], have been widely used for medical image segmentation due to their ability to dynamically refine contours based on energy minimization. Variants such as gradient vector flow (GVF) [13] and vector field convolution (VFC) [14] have improved the ability of ACMs to capture complex structures by extending their external force fields. Furthermore, the incorporation of fuzzy logic, as demonstrated in the edge detection approach based on general type 2 fuzzy sets (GT2 FSs) [15], explored the Lab, HSV, and RGB color spaces, enhancing robustness in color image processing. Techniques such as morphological geodesic active contour (FGAC) [16] have demonstrated effectiveness in segmenting lung regions, particularly when combined with adaptive energy terms. However, these methods often require careful initialization and parameter tuning, limiting their generalizability across diverse datasets.
ACM has been widely used for medical image segmentation, and the approach proposed in [17] reformulates the problem in terms of an energy functional within the calculus of variations, aiming to improve segmentation by handling images with non-uniform brightness. Compared to traditional approaches, this formulation seeks to make the contour more adaptable and reduce the need for reparameterization.
Region-based segmentation methods, among the earliest in medical image processing, rely on pixel intensity similarities to delineate regions of interest. Thresholding, which separates structures based on a predefined intensity, is widely used in lung segmentation but struggles with variations due to pathology or artifacts [18]. Region growing improves accuracy by iteratively expanding from a seed point but is highly sensitive to noise and requires precise initialization [19]. Level set methods offer a more flexible segmentation approach by evolving contours over time based on geometric constraints, making them effective for handling complex structures [20]. However, they can be computationally expensive and sensitive to initialization.
Deep learning-based segmentation methods have significantly advanced the field by leveraging convolutional neural networks (CNNs) to automatically extract hierarchical features from medical images. Architectures such as U-Net [21], Mask R-CNN [22], and DeepLabV3+ [23] have demonstrated excellent performance in lung segmentation tasks. However, despite their strong performance, deep learning models often lack interpretability and generalizability, particularly when trained on limited or biased datasets, and struggle to integrate contextual information effectively [24]. Still in the context of deep learning, Sharp U-Net [25] applies depthwise convolutions and a sharpening filter to adjust the feature fusion process in biomedical image segmentation. Compared to the conventional U-Net, it introduces structural modifications that influence computational efficiency and segmentation outcomes in certain applications.
Although these methodologies have advanced the field, challenges remain in balancing computational efficiency, segmentation accuracy, and adaptability. In this context, the context-driven active contour (CDAC) method is introduced as a novel solution for lung segmentation in CT images. CDAC aims to address these limitations by combining the robustness of ACMs with contextual analysis. By leveraging contextual attention mechanisms and expert annotations, CDAC increases segmentation accuracy and adapts to heterogeneous clinical scenarios, providing a promising solution for improving the diagnosis and treatment of lung diseases and making it a robust tool for computer-aided diagnosis (CAD) systems.
The main objective of this study is to demonstrate the effectiveness of CDAC in lung segmentation on CT images, particularly in cases involving complex anatomical and pathological variations. The experimental results validate the method’s performance, achieving satisfactory values compared to recent techniques. These findings highlight the potential of CDAC to advance diagnostic workflows, ultimately contributing to improved clinical decision-making and patient outcomes.

Paper Organization

The remainder of this paper is organized as follows: Section 2 provides a detailed overview of the materials and methods employed in the development of CDAC, including dataset characteristics, the mathematical formulation of the model, and the evaluation criteria used for performance assessment. Section 3 presents the experimental results, offering a comparative analysis of CDAC against existing segmentation techniques. This section highlights the strengths and limitations of the proposed approach while discussing its applicability in medical imaging. Additionally, it includes an in-depth discussion on computational efficiency and practical deployment considerations. Section 4 summarizes the key findings of the study, addressing its limitations and outlining future research directions to enhance CDAC’s performance and extend its application to broader medical imaging domains and other fields.

2. Materials and Methods

This section details the methods and procedures adopted for the development and validation of context-driven active contour (CDAC). CDAC is an image segmentation method that combines the robustness of ACMs with the advanced contextual understanding capabilities provided by modern deep learning techniques originally focused on natural language processing (NLP) and adapted for image processing, with a focus on computer vision. The methodology to be described covers everything from data collection and organization, through model development, to procedures for evaluating and validating CDAC.

2.1. Chest CT Dataset

For the analysis of the proposed method, we used a private dataset of chest CT images, which can be accessed at this link. This dataset was built with the assistance of experts in the field to ensure high-quality annotations and reliable ground truth segmentation masks for validation. The research conducted with these data contributes new information and results, increasing the originality and scientific relevance of the study. In addition, using private data allows the inclusion of a greater diversity of clinical cases and complex conditions, which are often not sufficiently represented in public datasets. This factor strengthens the credibility of the research and expands its applicability both in the scientific context and in medical practice.
The dataset presents 36 lung CT images, acquired in collaboration with the Walter Cantídio Hospital, Federal University of Ceará (UFC), Brazil, using a GE MEDICAL SYSTEM optima CT660 specification CT scanner. This dataset consists of images in digital imaging and communications in medicine (DICOM) format, each with a resolution of 512 × 512 pixels and a pixel intensity of 16 bits. The images were manually segmented by an expert for the method analysis. The images were acquired from 12 healthy patients, 12 patients with fibrosis, and 12 with COPD.
To illustrate the diversity of this dataset and highlight its main characteristics, Figure 1 presents six representative samples. The selected images demonstrate the variation in size, shape, intensity, and contrast, highlighting the challenges inherent in the segmentation and analysis of this dataset.
Analyzing Figure 1, we can see that each image presents distinct characteristics, a fact that directly impacts the segmentation process. Some images exhibit significant variations in the size and shape of the structures, while others present significant differences in the intensity and contrast of the pixels. These variations reinforce the importance of an efficient and adaptable method, capable of dealing with different anatomical patterns and levels of complexity present in the dataset.

2.2. Context-Driven Active Contour (CDAC)

In the literature, several methodologies have been developed for the segmentation of regions of interest in medical images. Despite the variety of existing options, there is still potential to improve and enhance the reliability of these methods.
With the intention of contributing to this field, this work presents a new technique for the segmentation of regions of interest in medical images, called context-driven active contour (CDAC). The proposed model is an image segmentation methodology that combines ACM with contextual information produced from the visual features in the image. To optimize the segmentation task, CDAC incorporates the context analysis-based processing of the Vision Transformer (ViT) [26] and proposes a new source of external energy and internal energy. Figure 2 demonstrates the pipeline that makes up the segmentation process performed by CDAC.
As we can see in Figure 2, the first step is to read the CT images, which are in DICOM format. To open images with this type of extension, the open-source DICOM toolkit (DCMTK) library provided by OFFIS is used. This tool is compatible with the C++ language, the same one used in the development of the model. After reading the image in DICOM format, it is converted to grayscale, reducing computational complexity. Since grayscale images have only one intensity channel, this transformation optimizes the algorithm’s processing, making the analysis more efficient without compromising the quality of the information relevant to segmentation.
In the next step, the expert defines the parameters of the desired context by marking two lines on the image. The first line consists of a set of points that represent the region of interest to be segmented, while the second line delimits the background region, characterizing the unwanted context. In other words, as we can see in Figure 2, the green markings indicate the region of interest, while the red markings represent the area to be ignored. We call this procedure the context-based segmentation task, which aims to transmit the expert’s technical know-how to the CDAC method, incorporating additional contextual information that a fully automated model may not be able to fully capture.
Continuing the progress presented in Figure 2, now that we have the marking curves and the grayscale image, the external energy of the proposed model, called contextual attention force (CAF), comes into play to guide the CDAC segmentation process. The external CAF energy is detailed in Section 2.2.1. With the context of interest defined and the external CAF energy calculated, the interaction between the internal and external energies of the CDAC model begins. This process deforms the segmentation curve in a controlled manner, directing its growth toward the region of interest that corresponds to the indicated context.
CDAC proposes the deformation of the curve by combining the new external energy CAF with the proposed internal energy contextual balloon force (CBF), an optimization of the internal energy presented in [12]. The internal energy CBF contributes to the coherence between the points of the curve, avoiding the formation of sharp sections or abrupt protrusions. On the other hand, the new external energy CAF attracts the points of the curve in the direction of the expansion of the contour, deforming the boundaries of the curve in the direction of the edge where the object of interest is. This deformation is governed by the minimization of the function that describes the contour.
Therefore, the external energy CAF is responsible for indicating the context of the image, mapping regions of high and low intensity. During the segmentation process, the active contour follows a greedy scheme of minimization of the energy function, in which the points of the curve are displaced towards the region of interest, characterized by lower energy. This movement continues until minimization becomes unfeasible, reducing the sum of the internal and external energies at each point. In this way, the method guarantees the reduction in the total energy of the curve, respecting the energy minimization principle of ACMs.
In the flowchart shown in Figure 2, this sequence of evolution of the curve(s) is called cycles, with the letter n representing the order of the results obtained in each cycle n. The curve is considered stable when its perimeter stops increasing after two consecutive iterations. Finally, at this point, the segmentation of the region of interest (lung) is completed, and the polygon generated by the curve, represented in green in the figure, is defined as the final result of the segmentation of the proposed method (CDAC mask) for the area of interest.

2.2.1. External Energy Contextual Attention Force (CAF)

From the perspective of traditional ACM [11], which evolves the contour curve deformation as energy is minimized, the CDAC method proposes the calculation of the external energy CAF based on the image context processing, so that the energies calculated in the context reflect the regions of interest as opposed to the background regions in the image.
Let a matrix I represent an image, or a slice of a CT scan, whose dimensions are M × N , where M is the number of rows, which represents the height of the image, and N is the number of columns, which represents the width of the image. Each element I i j of the matrix represents the intensity of the pixel at position ( i , j ) . Thus, consider the property P, which determines whether a point p in the image belongs to the low-energy region in the scan, represented by the set δ . Let p ( i , j ) be the pixel at position ( i , j ) in the image, where i and j are spatial coordinates, the property P can be defined as:
P ( p ( i , j ) ) f ( i , j ) δ
where the property P ( p ( i , j ) ) is true if and only if the pixel p ( i , j ) belongs to the low-energy region δ , that is, when f ( i , j ) δ . Conversely, it is false if and only if the pixel p ( i , j ) belongs to the high-energy region Δ , that is, when f ( i , j ) Δ , so that:
P ( p ( i , j ) ) f ( i , j ) Δ
The function f ( i , j ) , therefore, acts as a point classification function, assigning an energy according to the context of the region in the image, being able to assign to the point ( i , j ) a real value that indicates the energy at the point p. Formally, we can write the property P as:
P ( p ( i , j ) ) = True if f ( i , j ) δ False if f ( i , j ) Δ
However, the previous definition presents a rigid binary classification property, not allowing adaptation regarding the calculated energy, nor delimiting the boundary between low and high energy. In this sense, we expand the previous property based on the energy threshold Λ , where Λ is a non-negative rational number. Thus, the energy of the point p ( i , j ) can vary in the interval [ 0 , 100 ] . Accordingly, let E ( p ( i , j ) ) be the energy of the point p ( i , j ) in the image, where E ( p ( i , j ) ) [ 0 , 100 ] , the property P can be defined in terms of the threshold Λ as follows:
P ( p ( i , j ) ) E ( p ( i , j ) ) Λ 0
Or, equivalently:
P ( p ( i , j ) ) = True if E ( p ( i , j ) ) Λ False if E ( p ( i , j ) ) > Λ
Therefore, P ( p ( i , j ) ) is true if and only if the energy of the point p ( i , j ) is less than or equal to the threshold Λ , indicating that there is a low energy region. E ( p ( i , j ) ) is the function that returns the energy of the point p ( i , j ) . The ViT algorithm processes the image context to differentiate regions of interest from background regions by analyzing energy intensity variations. In the CAF energy map shown in Figure 3, low-intensity energy values correspond to regions of interest, highlighted in green, representing structures relevant to the segmentation process. Conversely, high-intensity energy values, shown in red in Figure 3, indicate background areas or non-relevant regions.
Consider, therefore, that the ViT algorithm produces a matrix, which, within the CDAC approach, we call the context matrix C ( x , y ) , which has dimensions equal to the original image, where each element of the matrix represents an energy value for the corresponding pixel in the image. In this sense, the point of the context matrix C ( x , y ) indicates low energy values when in regions of interest, that is, when C ( x , y ) δ for all C ( x , y ) Λ . On the other hand, C ( x , y ) assumes high values, indicating high energy when in regions of no interest, that is, when C ( x , y ) Δ for all C ( x , y ) > Λ . At this point, we can redefine Equation (5) in terms of the energy matrix C, resulting in Equation (6).
C A F ( p ( i , j ) ) = Low Energy if C ( i , j ) Λ High Energy if C ( i , j ) > Λ
From Equation (6), it can be seen that the threshold Λ acts as a central parameter for the interpretation of the context matrix C ( x , y ) . This matrix, generated based on the ViT algorithm, distributes energy values that differentiate regions of interest ( C ( i , j ) Λ ) from regions of no interest ( C ( i , j ) > Λ ). This distinction allows the CDAC approach to efficiently drive the active curve, focusing on areas of interest and ignoring those that do not contribute to the segmentation objective, thus optimizing the process of identifying structures of interest.
To define the external energy E CAF in terms of the context matrix C ( x , y ) , we can formulate the external energy as an integral over the curve v ( s ) . Such an external energy is then proposed as:
E CAF = 0 1 C ( v ( s ) ) d s
where v ( s ) = [ x ( s ) , y ( s ) ] represents the position of the active contour parameterized by s. The value of C ( v ( s ) ) for a point v ( s ) on the curve is obtained directly from the context energy matrix C.
The goal of the approach is to evolve the active contour in such a way as to minimize the external energy E CAF . For regions of interest with low energy C ( x , y ) , the curve will tend to move to these regions to minimize E CAF . Therefore, preserving the internal energy terms and replacing the term that calculates the external energy, by the energy E C A F , defined in Equation (7), we then have the calculation of the total energy CDAC ( E C D A C ) given by:
E C D A C = E int + E CAF
where E int is the internal energy that controls the smoothness of the contour, while the term E CAF represents the external energy based on the context energy matrix C. Substituting the terms in the traditional active contour Equation [11], we have the total energy calculated as:
E C D A C = α 0 1 v ( s ) s 2 d s + β 0 1 2 v ( s ) s 2 2 d s + 0 1 M ( v ( s ) ) d s
Therefore, to minimize the total energy E C D A C , we can use numerical methods such as gradient descent. The equation of motion for the curve can be expressed as:
v ( s ) t = δ E δ v ( s )
where δ E δ v ( s ) is the functional derivative of the total energy E with respect to the contour v ( s ) .
To construct the initial curve used in segmentation, let P 1 , P 2 , , P n be the set of non-collinear points that delimit the region of interest. These points can be connected by straight line segments, forming a closed contour that will serve as input to the model. Each segment between two consecutive points P i = ( x i , y i ) and P i + 1 = ( x i + 1 , y i + 1 ) can be described by the following parametric equation:
( x ( t ) , y ( t ) ) = ( 1 t ) · ( x i , y i ) + t · ( x i + 1 , y i + 1 ) , t [ 0 , 1 ] .
This representation ensures the formation of a continuous curve, which is essential for the evolution of the active contour throughout the segmentation process. In the context of CDAC, this initial curve serves as a basis for the interaction between internal and external energies, allowing the model to guide the segmentation more effectively and adaptively to the image characteristics.
As for the distance function, we define D as the desired distance from the closed curve to the points P i . We will use a function g ( x ) that maintains the distance D from the contoured curve to the points P i . The parametric equation of the closed curve that contours the points P 1 , P 2 , , P n , keeping them within an internal region defined by D, can be written as shown in Equation (12):
( x ( t ) , y ( t ) ) = ( 1 t ) · ( x n , y n ) + t · ( x 1 , y 1 ) + D ( x 1 x n ) 2 + ( y 1 y n ) 2 · ( y 1 y n , ( x 1 x n ) ) ,
where t [ 0 , 1 ] , and:
  • ( 1 t ) · ( x n , y n ) + t · ( x 1 , y 1 ) represents the linear interpolation between the points P n and P 1 , ensuring that the closed curve starts and ends at the extreme points.
  • D ( x 1 x n ) 2 + ( y 1 y n ) 2 · ( y 1 y n , ( x 1 x n ) ) is a perpendicular vector of magnitude D in relation to the segment P n P 1 , ensuring that the curve maintains the distance D of the points internally.
In Figure 4, the initialization curve of the CDAC model is shown in dark green. The points P n to P 5 represent the initialization points. The points and the curve in light green represent the closed initialization curve of the contour, which will be deformed according to the attraction of the external energy CAF.
The interaction between the initial curve and the external energy CAF, highlighted in Figure 4, is essential for the functioning of the CDAC model. This mechanism ensures that the deformation of the curve is guided by contextual information extracted from the energy matrix C ( x , y ) , allowing the model to maintain dynamic adaptation to the image characteristics. The arrows seen in Figure 4 indicate the direction of displacement of the points that make up the contour, allowing its evolution. In addition, the initial configuration of the points P n to P 5 , shown as an example in this figure, has a direct impact on the efficiency and accuracy of the segmentation process, since it defines the initial proximity of the curve in relation to the object of interest.

2.2.2. Internal Energy Contextual Balloon Force (CBF)

The contextual adaptive balloon internal energy represents an optimization of the adaptive internal energy proposed by [12]. This optimization has as its main characteristic to improve the segmentation process, avoiding the repetitive analysis of regions previously covered by the curve. More specifically, the proposed CDAC model considers that the regions previously analyzed by the CAF external energy were identified as part of the object of interest. Thus, the internal energy does not reevaluate these areas, focusing only on the new regions not yet segmented.
Therefore, a significant contribution of the CDAC model is the influence of the external energy CAF on the internal energy CBF, trying to optimize the speed and analysis of the curve. For example, if the external energy CAF determined that the region inside the curve corresponds to the region of the stroke or the lung, the internal energy CBF does not need to reevaluate the possibility of returning to the interior of the region of interest and, instead, must continue until it reaches the edge. Therefore, we consider the regions previously identified as the area of interest (lung) by the external energy CAF as having the maximum value of the internal energy in that area, preventing the curve from retreating to the interior of the region.
The internal energy CBF can be described mathematically in a way that incorporates the influence of the external energy CAF and optimizes segmentation, avoiding the reevaluation of previously analyzed regions. Mathematically, the internal energy CBF can be represented considering two main components: continuity and contextual adaptivity, as shown in Equation (13):
E CBF [ c ( s ) ] = w cont · F cont [ c ( s ) ] + w context · F context [ c ( s ) ]
where
  • E CBF [ c ( s ) ] is the CBF internal energy along the curve c ( s ) .
  • F cont [ c ( s ) ] is the continuity force, which maintains the smoothness of the curve.
  • F context [ c ( s ) ] is the adaptive contextual force, which adapts the force based on the contextual analysis of the region.
  • w cont and w context are weights that adjust the influence of each term.
The continuity force F cont [ c ( s ) ] can be expressed as:
F cont [ c ( s ) ] = α d d s c ( s ) 2
where
  • α is a weight that controls the stiffness of the curve.
  • d d s c ( s ) is the derivative of the curve with respect to the parameter s, representing the continuity of the curve.
The adaptive contextual force F context [ c ( s ) ] considers the regions previously analyzed by the external energy CAF:
F context [ c ( s ) ] = β · ϕ ( c ( s ) )
where
  • β is a weight that adjusts for the influence of contextual force.
  • ϕ ( c ( s ) ) is a modified step function that takes into account the influence of external energy CAF:
    ϕ ( c ( s ) ) = 1 if c ( s ) belongs to a region previously analyzed as part of the object of interest ; 0 otherwise
The combination of these forces results in the internal energy CBF, as shown in Equation (17), which adapts the segmentation based on the context analyzed by the external energy CAF.
E CBF [ c ( s ) ] = w cont · α d d s c ( s ) 2 + w context · β · ϕ ( c ( s ) )
Finally, the total energy, presented in Equation (18), which guides the evolution of the curve c ( s ) is the sum of the internal energy CBF and the external energy CAF:
E total C D A C [ c ( s ) ] = E CBF [ c ( s ) ] + E CAF [ c ( s ) ]
where
  • E CAF [ c ( s ) ] is the contextual external energy that attracts the curve to the edges of the object of interest.
Mathematically, the CBF internal energy is designed to optimize segmentation by avoiding the reanalysis of regions already identified as part of the object of interest by the external energy CAF. By focusing on new regions and combining continuity with contextual adaptability, the CBF internal energy seeks a more assertive and efficient segmentation.

2.3. Evaluation Metrics for Segmentation

The evaluation of the proposed method is performed using metrics widely used in the literature to measure the accuracy and effectiveness of segmentation. These metrics quantify the correspondence between the segmentation generated by the algorithm and the reference annotated by experts (ground truth), using the confusion matrix to classify the pixels into true positives (TPs), false positives (FPs), true negatives (TNs) and false negatives (FNs) [27].
In an image containing only two regions, segmentation can be interpreted as a classification process [28], where each pixel is designated as either 0 (zero) or 1 (one). In this case, 1 (one) represents that the pixel belongs to the region of interest (ROI) and 0 (zero) indicates that the pixel is part of the background region. The region of interest is called the positive class, while the background region is referred to as the negative class.
We consider quantitative metrics such as accuracy, precision, sensitivity, and specificity [29]. In the segmentation task, accuracy measures the total proportion of correctly classified pixels, while precision evaluates the proportion of correctly identified pixels in the segmented region. Sensitivity verifies the ability of the method to correctly detect the region of interest, and specificity measures the rate of pixels correctly classified as belonging to the background. In addition, the Matthews correlation coefficient (MCC) is employed to provide a balanced view of performance, especially in imbalanced datasets.
Regarding the similarity metrics employed, we considered the Jaccard index and the Dice coefficient, which aim to evaluate the overlap between the segmentation mask returned by the proposed model and the reference mask (ground truth), while the Hausdorff distance measures the largest discrepancy between the segmented contours [29]. All these metrics ensure a comprehensive analysis of the segmentation quality, considering both the spatial accuracy and the geometric fidelity of the contours generated by CDAC.

3. Results and Discussion

This section presents the results obtained by CDAC in lung segmentation in chest CT images. The analysis is conducted using the evaluation metrics described in Section 2, ensuring a quantitative interpretation of the performance achieved. The comparison of the CDAC results was performed with approaches that used the same data set, as cited in Section 1, ensuring consistency and scientific validity. This decision avoids potential biases caused by variations in the data and allows the observed differences to be directly attributed to the methodologies employed.
To evaluate the performance of CDAC in lung segmentation, three main perspectives were considered: (i) analysis of individual lung segmentation, (ii) analysis of general lung segmentation, and (iii) analysis of lung segmentation by comorbidities.
Individual lung analysis allows us to explore the challenges associated with the physiological and anatomical differences between the right and left lungs. Overall lung analysis provides a comprehensive view of the method’s performance, facilitating comparisons with other techniques and assessing its overall efficiency. Finally, segmented analysis by comorbidities is essential to understand how the method behaves in healthy and diseased lungs, allowing us to assess its robustness in different clinical contexts.

3.1. CDAC Settings

CDAC uses different ViT variants to provide contextual information that guides the segmentation process, resulting in three different configurations for the proposed model, called CDAC-A (Advanced), CDAC-S (Standard) and CDAC-X (Extra-Advanced). The ViT variants differ mainly in the number of layers, attention mechanism properties, embeddings size, and total number of parameters. The three CDAC configurations are detailed in Table 1.
Overall, CDAC-S incorporates the base variant of ViT, which is optimized to efficiently provide contextual information while balancing model complexity and generalization capability. CDAC-A utilizes the advanced variant of ViT, which improves the ability to capture complex and detailed patterns in visual data. While CDAC-X integrates the largest variant of ViT, it provides a high ability to capture complex patterns in large visual datasets, enabling more detailed and accurate analysis.
Applying the three CDAC variants to the same dataset allows a detailed comparative evaluation of performance, robustness, and computational cost of each configuration, contributing to a better understanding of how each model behaves in different conditions and with different image complexities, creating a useful benchmark for future applications.

3.2. Individual Analysis Approach

Segmenting lungs on CT images can present distinct challenges for the left lung and the right lung, due to their anatomical differences and proximity to other structures. Here are some things to consider when it comes to the differences between each lung:
  • Anatomical complexity:
    Right lung: With three lobes, the right lung has a more complex anatomy, which can make segmentation more challenging. The horizontal and oblique fissures must be correctly identified to separate the lobes.
    Left lung: With only two lobes, segmentation can be simpler due to less anatomical complexity. The presence of only one oblique fissure makes it easier to separate the lobes.
  • Interference from neighboring structures:
    Right lung: Less interference from the heart, which can simplify segmentation. However, the azygos vein and other structures can still create challenges.
    Left lung: Proximity to the heart and deep cardiac impression can make accurate segmentation difficult, especially in the area close to the heart.
  • Size and Shape:
    Right lung: Larger volume and more lobes may provide more data for the segmentation algorithm, but they also increase complexity.
    Left lung: Smaller volume and fewer lobes may simplify segmentation, but the shape may be more irregular due to the cardiac impression.
  • Aspiration cases and anomalies:
    Right lung: More prone to foreign body aspiration due to the more vertical bronchus, which may introduce variability in the images.
    Left lung: Less prone to foreign body aspiration, potentially resulting in less variability.
Therefore, lung segmentation on CT images may be more challenging for the right lung due to its greater anatomical complexity, with three lobes and two fissures, compared to the left lung, which has only two lobes and one fissure. The proximity of the heart may make segmentation of the left lung more difficult, while the right lung, despite less cardiac interference, still faces challenges due to the presence of the azygos vein and other structures. The larger volume and more lobes of the right lung may increase the complexity of segmentation, while the smaller volume and irregular shape of the left lung due to the cardiac impression may simplify or complicate the process. In addition, the right lung is more prone to foreign body aspiration due to its more vertical bronchus, which may result in greater variability in images.

3.2.1. Analysis Between CDAC Versions—Individual Approach

Table 2 presents the results of the different CDAC configurations in the chest CT image dataset, which were evaluated using the performance metrics accuracy (Acc), precision (Prec), sensitivity (Sen), specificity (Spe), Matthews correlation coefficient (MCC), Dice similarity coefficient (Dice), Jaccard index (Jac) and Hausdorff distance (HD).
Analyzing Table 2, it can be seen that the Accuracy is quite high in all configurations, with CDAC-X presenting the best results for both the left lung (0.9951 ± 0.0027) and the right lung (0.9940 ± 0.0034). CDAC-X also demonstrates the highest accuracy for both lungs, with values of 0.9796 ± 0.0282 for the left lung and 0.9698 ± 0.0277 for the right lung, suggesting a lower false positive rate, that is, the proportion of pixels classified as lung that are actually lung. Once again, CDAC-X leads, this time in sensitivity, with 0.9724 ± 0.0235 for the left lung and 0.9685 ± 0.0236 for the right, indicating a higher rate of detection of true positives, that is, the proportion of pixels from the lung region that are correctly identified as belonging to that region. The highest specificity value is also achieved by CDAC-X, showing values of 0.9980 ± 0.0029 for the left lung and 0.9970 ± 0.0033 for the right. In segmentation, Specificity indicates the proportion of pixels not belonging to the lung area that are correctly identified, that is, the ability to detect true negatives. The Matthews coefficient is also higher for CDAC-X, with values of 0.9662 ± 0.0157 for the left lung and 0.9600 ± 0.0178 for the right, reflecting a strong and consistent correlation since MCC takes into account all classification categories (true positives, false negatives, true negatives, and false positives) to provide a balanced measure of segmentation quality.
Regarding the similarity measures, still observing Table 2, the Dice coefficient is higher for CDAC-X, with values of 0.9686 ± 0.0151 for the left lung and 0.9629 ± 0.0169 for the right, indicating greater precision and better correspondence between the areas segmented by the method and the ground truth. The Jaccard index is also higher for CDAC-X, with 0.9396 ± 0.0279 for the left lung and 0.9290 ± 0.0308 for the right, corroborating the good precision of the segmentation. Being a more conservative measure of similarity and precision of the segmentation, higher values of the Jaccard index indicate a better correspondence between the segmented area returned by the method and the ground truth. The Hausdorff distance, which measures the greatest distance from a point on the predicted segmentation contour to the closest point on the ground truth contour, is smaller in CDAC-X, with values of 4.3793 ± 1.1334 for the left lung and 6.6373 ± 2.6732 for the right, indicating a better match and a smaller error in the contour of the region segmented by the method, since HD evaluates the maximum error between the segmented contour and the ground truth contour.
Overall, as seen in Table 2, for all configurations and metrics, left lung segmentation tends to perform slightly better compared to right lung segmentation. This fact can be explained by lower anatomical complexity (fewer lobes) and lower interference from nearby structures, facilitating segmentation, as discussed at the beginning of this section.
Regarding computational cost, Table 3 shows the average convergence times for CDAC-X, CDAC-S, and CDAC-A in lung segmentation on chest CT images. The convergence times are analyzed separately for the left lung and the right lung. Observing this table, for CDAC-S, the average convergence times are 2.32 ± 1.21 s for the left lung and 1.86 ± 0.75 s for the right lung. Regarding computational cost, these results indicate that CDAC-S is the most efficient approach in segmenting both lungs, with fast and consistent convergence times. The shorter convergence time for the right lung can be attributed to a lower segmentation complexity, despite the anatomical differences between the lungs. The consistency in convergence times, reflected by the low standard deviation, suggests that CDAC-S is a reliable approach.
Still evaluating Table 3, in contrast to CDAC-S, CDAC-X presents significantly longer average convergence times and greater variability. For the left lung, the average time is 4.42 ± 4.91 s, while for the right lung it is 6.29 ± 5.55 s. The high variability in convergence times (high standard deviation) indicates that CDAC-X has lower efficiency and consistency in lung segmentation, in relation to the computational cost. This inferior performance may be the result of its greater complexity or greater sensitivity to variations in CT images, making segmentation less predictable and more dependent on the specific characteristics of each image.
Regarding CDAC-A, it can be stated from Table 3 that it shows mixed performance. For the left lung, the average convergence time is efficient, being 2.37 ± 1.25 s, comparable to CDAC-S. However, for the right lung, the average convergence time is significantly higher, being 5.38 ± 6.45 s. The high variability in the convergence time of the right lung suggests that CDAC-A may be, like CDAC-X, also more sensitive to the specific characteristics of the right lung images, resulting in less consistent segmentation. In terms of time, this mixed performance indicates that, although CDAC-A is practically as effective as CDAC-S for segmenting the left lung, it faces significant difficulties in segmenting the right lung.
In Figure 5 and Figure 6, bar charts are presented, based on the values in Table 2, for both the left and right lungs, respectively. The green arrows present in all charts highlight the highest values achieved among the three CDAC configurations (CDAC-X, CDAC-S, and CDAC-A) for each metric. Their purpose is to make the interpretation of the charts more intuitive by visually emphasizing the best performance in each evaluation criterion. These charts provide a more elucidative and objective comparison of the metrics for the three CDAC configurations in lung segmentation from chest CT images dataset, considering the individual segmentation approach. Each configuration is distinguished by a specific color, with the legend included in the chart itself. The metrics are placed side by side for each configuration, allowing easy visualization of the performance of each one. The best performance for each metric is visually highlighted with a green arrow, indicating the highest value.
In summary, based on the analysis of Table 2 and Table 3, and corroborated by the graphs shown in Figure 5 and Figure 6, CDAC-X stands out as the most efficient and robust approach in lung segmentation in CT images. The green arrows highlight the best values achieved among the three CDAC configurations (CDAC-X, CDAC-S, and CDAC-A) for each metric. Their purpose is to aid in the interpretation of the graph by visually emphasizing the best performance in terms of each metric. CDAC-X not only presents the best metrics of accuracy, sensitivity, specificity and similarity metrics (Dice coefficient and Jaccard indices) for both lungs, but also demonstrates significantly shorter and more consistent convergence times, reflecting fast and reliable segmentation, compared to other versions of the method. In contrast, CDAC-S shows lower performance with longer and more variable convergence times, indicating a less optimized approach. CDAC-A, although efficient in segmenting the left lung, presents high variability and longer convergence times for the right lung, suggesting sensitivity to anatomical features and variability in the images. Thus, CDAC-X asserts itself as the most suitable solution for lung segmentation in CT images, among the other CDAC configurations.

3.2.2. Comparison with Other Methods—Individual Approach

Given its superiority over other CDAC configurations, Table 4 shows a comparison of the performance of CDAC-X with other methods, considering metrics such as accuracy, precision, sensitivity, and specificity in the lung segmentation task using the dataset of chest CT images. The results are presented separately for the left and right lungs.
Analyzing Table 4, it can be noted that CDAC-X presents the best Accuracy values for both lungs, with 0.9954 ± 0.0027 for the left lung and 0.9944 ± 0.0032 for the right lung, standing out as the method with the greatest accuracy among those evaluated. Other methods, such as [12,30], also present good accuracies, but do not surpass CDAC-X. Although CDAC-X presents a high precision, with 0.9796 ± 0.0282 for the left lung and 0.9698 ± 0.0277 for the right, the method of [31] outperforms CDAC-X in this metric, with values of 0.9935 ± 0.0133 for the left lung and 0.9939 ± 0.0109 for the right. However, the high precision of [31] is accompanied by a lower sensitivity, which indicates a trade-off between false positives and false negatives. Still regarding sensitivity, CDAC-X presents the highest in this metric for both lungs, with values of 0.9777 ± 0.0157 for the left lung and 0.9691 ± 0.0165 for the right, indicating that CDAC-X is effective in correctly identifying the pixels belonging to the lung, minimizing the number of false negatives. Other methods, such as [12], also present good sensitivities, but do not reach the values of CDAC-X. Regarding specificity, the method of [31] presents the highest specificity, with values of 0.9994 ± 0.0013 for the left lung and 0.9991 ± 0.0018 for the right. CDAC-X also presents high specificity, with 0.9980 ± 0.0029 for the left lung and 0.9970 ± 0.0033 for the right, although slightly lower than that of [31].
Table 5 shows a comparison of the results of CDAC-X with other lung segmentation methods in CT images, using the performance metrics Dice coefficient, Jaccard index, Matthews correlation coefficient, and Hausdorff distance. The results are presented separately for the left and right lungs.
Table 4. Comparison of CDAC-X results with other works for lung dataset segmentation—individual approach (part 1).
Table 4. Comparison of CDAC-X results with other works for lung dataset segmentation—individual approach (part 1).
MethodsAccuracyPrecisionSensitivitySpecificity
Left LungRight LungLeft LungRight LungLeft LungRight LungLeft LungRight Lung
CDAC-X 30.9954 ± 0.00270.9944 ± 0.00320.9796 ± 0.02820.9698 ± 0.02770.9777 ± 0.01570.9691 ± 0.01650.9980 ± 0.00290.9970 ± 0.0033
He et al. (2023) [32]0.9835 ± 0.00750.9828 ± 0.00780.9315 ± 0.04180.9303 ± 0.04350.9321 ± 0.04200.9297 ± 0.04380.9830 ± 0.00720.9825 ± 0.0077
Filho et al. (2019) [31]0.9878 ± 0.00390.9879 ± 0.00390.9935 ± 0.0133 40.9939 ± 0.01090.8618 ± 0.04370.8640 ± 0.05100.9994 ± 0.00130.9991 ± 0.0018
Filho et al. (2014) [12]0.9951 ± 0.00270.9938 ± 0.00340.9569 ± 0.05990.9620 ± 0.03070.9724 ± 0.02350.9685 ± 0.02360.9969 ± 0.00320.9965 ± 0.0031
Felix et al. (2013) [33]0.9770 ± 0.02610.9806 ± 0.01940.8651 ± 0.16730.8839 ± 0.11310.8674 ± 0.19660.9096 ± 0.09380.9871 ± 0.01540.9874 ± 0.0153
Rebouças Filho et al. (2011) [34]0.9901 ± 0.00530.9893 ± 0.00650.9783 ± 0.05610.9638 ± 0.06140.9003 ± 0.04020.9085 ± 0.03360.9985 ± 0.00360.9967 ± 0.0052
Alexandria et al. (2010) [35]0.9881 ± 0.00740.9874 ± 0.00970.9354 ± 0.09040.9437 ± 0.05960.9175 ± 0.02670.9124 ± 0.03530.9942 ± 0.00730.9939 ± 0.0086
Felix et al. (2009) [30]0.9948 ± 0.00220.9940 ± 0.00360.9786 ± 0.03670.9802 ± 0.02830.9528 ± 0.02560.9471 ± 0.02510.9985 ± 0.00190.9980 ± 0.0033
Li and Acton (2006) [14]0.9899 ± 0.00500.9888 ± 0.00900.9293 ± 0.14870.9577 ± 0.05160.9215 ± 0.03040.9145 ± 0.03870.9961 ± 0.00480.9954 ± 0.0078
Xu and Prince (1998) [13]0.9885 ± 0.00850.9791 ± 0.03180.9533 ± 0.08270.9658 ± 0.05070.9126 ± 0.04240.8678 ± 0.12820.9959 ± 0.00600.9958 ± 0.0093
3 The green background highlights instances where CDAC achieved the highest performance in a given metric, with white text ensuring readability. 4 Bold values indicate cases where another method outperformed CDAC in a specific metric.
Table 5. Comparison of CDAC-X results with other works for segmentation of the lung dataset—individual approach (part 2).
Table 5. Comparison of CDAC-X results with other works for segmentation of the lung dataset—individual approach (part 2).
MethodsDiceJaccardMCCHausdorff
Left LungRight LungLeft LungRight LungLeft LungRight LungLeft LungRight Lung
CDAC-X 50.9686 ± 0.01510.9641 ± 0.01660.9396 ± 0.02790.9312 ± 0.03040.9662 ± 0.01570.9613 ± 0.01764.3818 ± 1.13296.6402 ± 2.6732
He et al. (2023) [32]0.9429 ± 0.02590.9418 ± 0.02660.8930 ± 0.04590.8915 ± 0.04700.9336 ± 0.02760.9312 ± 0.028332.9000 ± 1.820033.1700 ± 1.8300
Filho et al. (2019) [31]0.9222 ± 0.02350.9234 ± 0.02710.8566 ± 0.04060.8589 ± 0.04610.9186 ± 0.02090.9200 ± 0.02546.2447 ± 1.11287.4814 ± 2.7366
Filho et al. (2014) [12]0.9659 ± 0.03230.9651 ± 0.0149 60.9357 ± 0.05500.9330 ± 0.02740.9641 ± 0.03040.9622 ± 0.01584.5954 ± 1.18346.0330 ± 2.6641
Felix et al. (2013) [33]0.8499 ± 0.17820.8877 ± 0.08000.7688 ± 0.19610.8063 ± 0.11400.8466 ± 0.17120.8825 ± 0.078617.4651 ± 2.110216.9211 ± 3.2122
Rebouças Filho et al. (2011) [34]0.9358 ± 0.02910.9336 ± 0.03220.8807 ± 0.04980.8771 ± 0.05360.9323 ± 0.02800.9291 ± 0.03308.9734 ± 1.405411.8374 ± 2.8111
Alexandria et al. (2010) [35]0.9229 ± 0.04970.9263 ± 0.03120.8603 ± 0.07340.8642 ± 0.05240.9181 ± 0.04600.9203 ± 0.035510.1758 ± 1.646612.5796 ± 1.9638
Felix et al. (2009) [30]0.9647 ± 0.01670.9628 ± 0.01550.9323 ± 0.03040.9287 ± 0.02790.9624 ± 0.01610.9599 ± 0.01668.7083 ± 1.448111.0324 ± 1.8023
Li and Acton (2006) [14]0.9161 ± 0.09990.9341 ± 0.02790.8571 ± 0.13090.8777 ± 0.04790.9152 ± 0.08610.9290 ± 0.03147.2563 ± 1.27259.8863 ± 1.5893
Xu and Prince (1998) [13]0.9292 ± 0.04710.9065 ± 0.08430.8710 ± 0.07310.8383 ± 0.12140.9249 ± 0.04490.9015 ± 0.08586.4655 ± 1.14639.1117 ± 1.5038
5 The green background highlights instances where CDAC achieved the highest performance in a given metric, with white text ensuring readability. 6 Bold values indicate cases where another method outperformed CDAC in a specific metric.
Observing Table 5, it can be seen that, regarding the Dice coefficient, CDAC-X achieves the best results for the left lung, with 0.9686 ± 0.0151, and a satisfactory performance for the right lung, with 0.9641 ± 0.0166. The method by [12] presents a performance comparable to CDAC-X for the right lung (0.9651 ± 0.0149), but slightly inferior for the left lung. These values indicate that CDAC-X has high accuracy in segmentation, with excellent correspondence between the segmented area and the ground truth. In the Jaccard index, CDAC-X presents the best results for the left lung (0.9396 ± 0.0279) and a good performance for the right lung (0.9312 ± 0.0304). The [12] method again has a comparable performance for the right lung (0.9330 ± 0.0274), but inferior for the left lung. Regarding the Matthews coefficient, CDAC-X leads with values of 0.9662 ± 0.0157 for the left lung and 0.9613 ± 0.0176 for the right lung. The [12] method also demonstrates comparable performance for the right lung (0.9622 ± 0.0158), but inferior for the left lung. These results indicate that CDAC-X provides a balanced and accurate segmentation, taking into account all aspects of pixel classification in the lung segmentation task. Knowing that the Hausdorff distance measures the largest distance between the segmented contour points and the ground truth points, CDAC-X presents the smallest Hausdorff distance for the left lung, with 4.3818 ± 1.1700, indicating a smaller contour error. For the right lung, CDAC-X returns a distance of 6.6402 ± 1.1700, which is competitive, but slightly superior to the method by [12], which presents an HD of 6.0330 ± 1.1700. These values suggest that CDAC-X provides a segmentation with contours very close to those of the ground truth, especially for the left lung.
Therefore, in an individual lung segmentation approach, the combined analysis of Table 4 and Table 5 highlights CDAC-X as an efficient and satisfactory approach for lung segmentation in CT images, although it is not infallible. CDAC-X particularly stands out in the metrics of accuracy (0.9954 ± 0.0027 for the left lung and 0.9944 ± 0.0032 for the right lung) and sensitivity (0.9777 ± 0.0157 and 0.9691 ± 0.0165, respectively), indicating a high rate of true positive detection with a reduced number of false negatives. In the left lung, where there is less anatomical complexity due to the presence of only two lobes and the proximity of the heart, high accuracy and sensitivity indicate that the method handles cardiac interference well and can segment accurately. For the right lung, which has greater anatomical complexity with three lobes and greater volume, these results reflect the ability of CDAC-X to effectively manage this complexity.
Additionally, CDAC-X also presents the best Dice (0.9686 ± 0.0151 for the left lung) and Jaccard (0.9396 ± 0.0279 for the left lung) indices, suggesting an excellent overlap between the segmented and real areas, especially in the left lung. However, for the right lung, where the anatomical complexity is higher, other approaches, such as [12], showed comparable or slightly superior performance in some specific metrics.
Other approaches, such as those of [12,31], showed strengths in specific metrics. For example, ref. [31] achieved superior accuracy (0.9935 ± 0.0133 for the left lung and 0.9939 ± 0.0109 for the right) and exceptional specificity, indicating a very effective ability to avoid false positives. This suggests that for applications where accuracy is more critical than sensitivity, this approach may be preferred. When we consider the Hausdorff distance metric, which measures the accuracy of segmented contours, CDAC-X again proves competitive, with 6.6402 ± 1.1700, but not necessarily the best for the right lung, where [12] performs slightly better, with 6.0330 ± 2.6641.

3.3. General Analysis Approach

Lung segmentation in CT images is a fundamental task that is important for supporting a variety of medical applications, including lung disease diagnosis, treatment planning, and patient monitoring. In this section, we will discuss the segmentation of both lungs simultaneously, taking into account the challenges of achieving sufficient segmentation. While individual segmentation is useful in specific cases, such as anatomical anomalies or localized lesions, the general approach is most effective for medical applications that require a comprehensive and integrated view of the lung structure.

3.3.1. Analysis Between CDAC Versions—General Approach

Table 6 presents the results of the performance metrics for the three CDAC configurations (CDAC-X, CDAC-S and CDAC-A) in lung segmentation using the dataset of chest CT images, adopting a general approach that considers the segmentation of both lungs simultaneously. The metrics evaluated were accuracy (Acc), precision (Prec), sensitivity (Sen), specificity (Spe), Matthews correlation coefficient (MCC), Dice similarity coefficient (Dice), Jaccard index (Jac) and Hausdorff distance (HD).
Observing Table 6, it can be seen that CDAC-X achieved the highest Accuracy value (0.9891 ± 0.0058), followed by CDAC-S (0.9849 ± 0.0090) and CDAC-A (0.9797 ± 0.0172). In this regard, the superiority of CDAC-X indicates that it is more reliable in correctly identifying pixels belonging and not belonging to the lung region compared to the other configurations. As for precision, again, CDAC-X leads with a precision of 0.9694 ± 0.0310, while CDAC-S (0.9332 ± 0.0567) and CDAC-A (0.9322 ± 0.0800) have lower performances, suggesting a better performance of CDAC-X in minimizing false positives, that is, this version returns a better proportion of pixels classified as ROI (lung) that are actually ROI.
In terms of sensitivity, in Table 6, CDAC-X presents the highest sensitivity (0.9711 ± 0.0216), indicating its superiority in detecting true positives. The CDAC-S (0.9622 ± 0.0236) and CDAC-A (0.9524 ± 0.0251) configurations have slightly lower performance, showing that CDAC-X is more effective in avoiding false negatives. Regarding specificity, CDAC-X obtained the highest specificity (0.9934 ± 0.0075), while CDAC-S (0.9867 ± 0.0111) and CDAC-A (0.9828 ± 0.0236) had lower performances, a fact that reinforces CDAC-X as the most reliable in correctly distinguishing non-lung pixels, i.e., false negatives. For the Matthews coefficient, CDAC-X achieved the highest score (0.9587 ± 0.0181), followed by CDAC-S (0.9423 ± 0.0337) and CDAC-A (0.9288 ± 0.0466), further highlighting the robustness and accuracy of CDAC-X compared to the other configurations.
Still evaluating Table 6, now observing the similarity metrics, it can be seen that CDAC-X returned the highest Dice coefficient value, with 0.9652 ± 0.0163, indicating an excellent overlap between the segmented area and the reference area (ground truth). CDAC-S (0.9506 ± 0.0317) and CDAC-A (0.9397 ± 0.0399) obtained lower values in this measure, suggesting lower precision in segmentation compared to CDAC-X. Regarding the Jaccard index, CDAC-X also leads with the highest Jaccard index, which reached 0.9332 ± 0.0297 in this metric, confirming that it achieved the best correspondence between the area segmented by the method and the reference area represented in comparison with CDAC-S (0.9075 ± 0.0539) and CDAC-A (0.8888 ± 0.0676). For the Hausdorff distance, CDAC-X presented the lowest Hausdorff distance, with 5.2922 ± 1.1140, indicating more precise contours and less segmentation error. CDAC-S and CDAC-A had lower performances, with 5.7942 ± 1.0968 and 8.2371 ± 1.1682, respectively, and, even more so, CDAC-A showed greater variability (standard deviation) and error in the segmented contours.
Table 7 shows the average convergence times for CDAC-X, CDAC-S and CDAC-A in lung segmentation on chest CT images, for general approach segmentation. Analyzing this table, it can be seen that CDAC-S demonstrates an average convergence time of 3.53 ± 1.00 s, being the shortest convergence time among the three configurations. The low standard deviation indicates significant consistency in processing times, suggesting that CDAC-S is not only fast, but also reliable in its execution.
On the other hand, still analyzing Table 7, CDAC-X presents a significantly higher average convergence time, of 7.42 ± 5.24 s. This time is more than twice the average convergence time of CDAC-S and presents a high standard deviation, indicating a large variability in processing times. This fact suggests that CDAC-X is less efficient and less predictable, and may be affected by variability in the execution conditions or in the characteristics of the CT images. As for CDAC-A, it returns an average convergence time of 5.62 ± 4.64 s, which is intermediate between CDAC-S and CDAC-X. Although the average convergence time of CDAC-A is shorter than that of CDAC-X, the standard deviation is still relatively high, indicating some instability in processing times. This suggests that although CDAC-A is more efficient than CDAC-X, it still faces challenges in terms of segmentation time consistency.
Figure 7 shows a bar chart based on the values in Table 6. This chart provides a clearer and more direct comparison of the metrics for the three CDAC configurations in lung segmentation, using the chest CT dataset images and considering the general segmentation approach. Each configuration is represented by a distinct color, with the legend included in the chart itself. The metrics are presented side by side for each configuration, making it easy to visualize the performance of each. The best performance for each metric is visually highlighted with a green arrow indicating the highest value.
Thus, based on the analysis of Table 6 and Table 7, and confirmed by the graph shown in Figure 7, CDAC-X was not the fastest version, but it still proved to be the most efficient in terms of overall performance, among the versions of the method, considering the general approach. This configuration stood out in all metrics, showing the best accuracy (0.9891 ± 0.0058), precision (0.9694 ± 0.0310), sensitivity (0.9711 ± 0.0216), specificity (0.9934 ± 0.0075), Matthews coefficient (0.9587 ± 0.0181), Dice coefficient (0.9652 ± 0.0163) and Jaccard index (0.9332 ± 0.0297). In addition, CDAC-X presented the smallest Hausdorff distance (14.9272 ± 23.3699), indicating greater precision in the segmented contours. CDAC-X also demonstrated the lowest mean convergence time (3.53 ± 1.00 s), demonstrating its superiority in terms of accuracy and operational efficiency. In contrast, CDAC-S and CDAC-A showed greater variability and lower efficiency, with longer convergence times.
Figure 8 shows the evolution of the contour during segmentation using CDAC-X for lung. This evolution is represented in green in the figure. Figure 8a shows the original image. Figure 8b shows the markings made by the expert to guide the segmentation process of the proposed model. From Figure 8c–l, it is possible to follow the progress of the iterations, from the first to the thirty-sixth, where the contour stabilizes.
Figure 9 presents a qualitative analysis of the segmentations performed by the CDAC-X method in comparison with the ground truth, using a sample of the CT image dataset for lung segmentation. Figure 9a shows the original sample image. Figure 9b shows the reference mask (ground truth) for ideal segmentation. Figure 9c shows the segmentation mask generated by the CDAC-X method, in green. Figure 9d highlights the false negatives (in color red) and false positives (in color green) identified in the segmentation performed by CDAC-X in comparison with the ground truth.
Figure 9e shows the overlap of the ground truth mask with false negatives and positives, making it easier to visualize the discrepancies. Finally, Figure 9f shows these overlaps on the original image, providing a complete view of the differences between the segmentation of the proposed method and the reference segmentation performed by experts. Specifically, for the sample presented as an example in Figure 9, CDAC-X achieved accuracy, precision, Matthews coefficient, Dice coefficient, and Hausdorff distance values of 0.9987, 0.9960, 0.9578, 0.9577, and 4.2426, respectively.

3.3.2. Comparison with Other Methods—General Approach

Due to its superiority compared to other CDAC configurations, Table 8 presents a comparison of the performance of CDAC-X with other methods, considering metrics such as accuracy, sensitivity and Matthews correlation coefficient (MCC) in the lung segmentation task using the chest CT images dataset, adopting the general segmentation approach.
Analyzing Table 8, it can be seen that the CDAC-X method presents an accuracy of 0.9891 ± 0.0058, standing out as one of the most accurate methods in lung segmentation. This high accuracy value indicates that CDAC-X is effective in correctly identifying both true positives and true negatives. In comparison, the [36] method slightly outperforms CDAC-X with an accuracy of 0.9897 ± 0.0065, closely followed by the [12] method with 0.9898 ± 0.0057. In terms of sensitivity, the CDAC-X method achieves 0.9711 ± 0.0216, reflecting its ability to correctly detect most areas of interest in the lung. This value is surpassed only by the method of [37], which obtains a sensitivity of 0.9921 ± 0.0066, indicating an even more effective detection of positive regions.
Other methods such as [12,38] also present high sensitivity, but do not surpass the performance of [37]. Regarding the Matthews coefficient, CDAC-X stands out significantly, with a score of 0.9637 ± 0.0181, the best among all the methods compared. The MCC is a metric that considers all elements of the confusion matrix, offering a balanced assessment of the model’s performance in imbalanced datasets. Comparatively, methods such as [12,30] also present high MCC, with 0.9612 ± 0.0183 and 0.9586 ± 0.0110, respectively, but still lag behind CDAC-X. This result indicates that CDAC-X is particularly effective in minimizing errors in all categories, providing a more balanced and reliable performance.
In Table 9, a comparison of the results of CDAC-X with other lung segmentation methods in CT images is performed, using performance metrics such as Dice coefficient, Jaccard index and Hausdorff distance. Evaluating this table, it can be observed that CDAC-X achieves a Dice score of 0.9680 ± 0.0163, standing out as the best among the compared methods. The Dice metric measures the similarity between the segmented result and the ground truth, and a higher score indicates a near-perfect overlap. In comparison, methods such as [12], with 0.9672 ± 0.0170, and [37], with 0.9619 ± 0.0193, also present good results, but are slightly behind CDAC-X. The high score of CDAC-X demonstrates its superiority in segmenting the lung region with high precision and fidelity to the ground truth.
Table 8. Comparison of CDAC-X results with other works in lung dataset segmentation—general approach (part 1).
Table 8. Comparison of CDAC-X results with other works in lung dataset segmentation—general approach (part 1).
MethodsAccuracySensitivityMCC
CDAC-X 90.9891 ± 0.00580.9711 ± 0.02160.9637 ± 0.0181 9
He et al. (2023) [32]0.9828 ± 0.00750.9309 ± 0.04290.9327 ± 0.0280
de S. Rebouças et al. (2021) [36]0.9897 ± 0.00650.9857 ± 0.01780.9473 ± 0.0150
Braga et al. (2021) [39]0.9717 ± 0.01090.8248 ± 0.06160.8854 ± 0.0367
Medeiros et al. (2020) [37]0.9886 ± 0.00460.9921 ± 0.0066 100.9554 ± 0.0132
Filho et al. (2019) [31]0.9731 ± 0.00790.8489 ± 0.04710.9036 ± 0.0226
Braga et al. (2017) [38]0.9884 ± 0.00460.9739 ± 0.02870.9555 ± 0.0138
Filho et al. (2014) [12]0.9898 ± 0.00570.9736 ± 0.01410.9612 ± 0.0183
Felix et al. (2013) [33]0.9577 ± 0.03960.9768 ± 0.03450.8538 ± 0.1185
Rebouças Filho et al. (2011) [34]0.9803 ± 0.00880.9058 ± 0.03440.9266 ± 0.0269
Alexandria et al. (2010) [35]0.9756 ± 0.01630.9159 ± 0.02870.9133 ± 0.0305
Felix et al. (2009) [30]0.9888 ± 0.00520.9501 ± 0.02290.9586 ± 0.0110
Li and Acton (2006) [14]0.9788 ± 0.01280.9189 ± 0.03330.9212 ± 0.0315
Xu and Prince (1998) [13]0.9678 ± 0.03570.8868 ± 0.07910.8999 ± 0.0637
9 The green background highlights instances where CDAC achieved the highest performance in a given metric, with white text ensuring readability. 10 Bold values indicate cases where another method outperformed CDAC in a specific metric.
On the other hand, in the Jaccard metric, CDAC-X also stands out with a score of 0.938 ± 0.0297, again the best among all the methods evaluated. The Jaccard metric, similar to Dice, measures the similarity and diversity of the segmented samples, but in a more rigorous way. Methods such as [12], with 0.937 ± 0.0309, and [37], with 0.9273 ± 0.0343, present similar results, but none surpasses CDAC-X. The high Jaccard score of CDAC-X confirms its effectiveness in performing accurate and consistent segmentations, surpassing the other methods in terms of similarity to the ground truth. The CDAC-X method obtains a Hausdorff score of 5.2922 ± 1.1134, which is competitive, but not the best. The [36] method presents the best performance with 4.2400 ± 0.4300, followed by [12] with 5.1400 ± 1.1700.
Table 9. Comparison of CDAC-X results with other works in lung dataset segmentation—general approach (part 2).
Table 9. Comparison of CDAC-X results with other works in lung dataset segmentation—general approach (part 2).
MethodsDiceJaccardHausdorff
CDAC-X 110.9680 ± 0.01630.9382 ± 0.02975.2922 ± 1.1134
He et al. (2023) [32]0.9424 ± 0.02630.8922 ± 0.046533.0336 ± 1.8253
de S. Rebouças et al. (2021) [36]0.9551 ± 0.01420.9145 ± 0.02624.2400 ± 0.4300 12
Braga et al. (2021) [39]0.8971 ± 0.04010.8157 ± 0.0618119.4400 ± 39.5800
Medeiros et al. (2020) [37]0.9619 ± 0.01930.9273 ± 0.03435.5700 ± 1.1700
Filho et al. (2019) [31]0.9158 ± 0.02560.8456 ± 0.043777.7383 ± 1.7590
Braga et al. (2017) [38]0.9623 ± 0.01340.9276 ± 0.024588.8900 ± 31.4300
Filho et al. (2014) [12]0.9672 ± 0.01700.9371 ± 0.03095.1400 ± 1.1700
Felix et al. (2013) [33]0.8729 ± 0.11180.7882 ± 0.144319.0498 ± 1.7982
Rebouças Filho et al. (2011) [34]0.9372 ± 0.02660.8830 ± 0.044910.7655 ± 1.2027
Alexandria et al. (2010) [35]0.9281 ± 0.02210.8665 ± 0.037913.0924 ± 1.1400
Felix et al. (2009) [30]0.9651 ± 0.00990.9329 ± 0.01836.6433 ± 1.1095
Li and Acton (2006) [14]0.9333 ± 0.02780.8761 ± 0.047411.9261 ± 1.1579
Xu and Prince (1998) [13]0.9176 ± 0.04770.8510 ± 0.076114.3020 ± 1.3013
11 The green background highlights instances where CDAC achieved the highest performance in a given metric, with white text ensuring readability. 12 Bold values indicate cases where another method outperformed CDAC in a specific metric.
With an emphasis on computational cost, Table 10 provides a comparison between CDAC-X and different methods that addressed lung segmentation in chest CT images. The CDAC-X method, with an execution time of 7.42 s, proves to be acceptable, but not the fastest. Methods such as [39], which presents an extremely low time of 0.13 s, and [36], with 1.32 s, are significantly faster, offering advantages in terms of computational cost. However, it is worth noting that the methods of [13,14] show very high execution times, 30 and 240 s, respectively, severely limiting their applicability in contexts that require speed.
Table 10. Comparison of the average convergence time of the CDAC-X version with other works in the segmentation of the lung dataset—general approach.
Table 10. Comparison of the average convergence time of the CDAC-X version with other works in the segmentation of the lung dataset—general approach.
MethodTime (s)
CDAC-X7.42 ± 5.24
He et al. (2023) [32]1.15 ± 2.75
de S. Rebouças et al. (2021) [36]1.32 ± 0.09
Braga et al. (2021) [39]0.13 ± 0.02 13
Medeiros et al. (2020) [37]1.85 ± 0.50
Filho et al. (2019) [31]5.86 ± 1.96
Braga et al. (2017) [38]2.01 ± 0.46
Filho et al. (2014) [12]2.00 ± 0.16
Felix et al. (2009) [30]4.90 ± 2.02
Li and Acton (2006) [14]30.00 ± 2.67
Xu and Prince (1998) [13]240.00 ± 3.05
13 Bold values indicate cases where another method outperformed CDAC in a specific metric.
Overall, the CDAC method proves to be a satisfactory solution for lung segmentation, combining high accuracy and segmentation quality. CDAC-X presents excellent performance with accuracy of 0.9891 ± 0.0058 and the best Matthews coefficient score, with 0.9637 ± 0.0181, demonstrating effectiveness in identifying true positives and negatives.
On the other hand, CDAC-X also stands out as the best in the Dice metrics, with 0.9680 ± 0.0163, and Jaccard index, with 0.9382 ± 0.0297, reflecting high similarity with the ground truth, although it is surpassed in edge accuracy by methods such as [36] in the Hausdorff distance metric. In terms of convergence time, CDAC-X, with 3.53 s, is relatively efficient, although it is not the fastest.
Despite a higher average time, CDAC-X offers a valuable balance when it comes to performance analysis in validation metrics. The variability in times (standard deviation) of some faster methods can affect the consistency of performance of these models, while CDAC-X maintains an acceptable runtime, justifying its use in contexts that require high quality in segmentation. Therefore, CDAC-X proves its use in contexts that require high quality in segmentation, even if there are faster methods available.

3.4. Comorbidity Approach

The performance analysis of lung segmentation in CT images by comorbidity seeks to evaluate CDAC in different clinical conditions, exploring how the method deals with both healthy lungs and those affected by some disease, in the case of this dataset, such as COPD and pulmonary fibrosis. In addition, this analysis helps to identify possible limitations of CDAC, guiding improvements in the algorithm and boosting its reliability and applicability in practice, in a diagnostic aid system.

3.4.1. Analysis Between CDAC Versions—Comorbidity Approach

Table 11 presents the results of the performance metrics for the three CDAC configurations (CDAC-X, CDAC-S and CDAC-A) in lung segmentation using the dataset of chest CT images, adopting a comorbidity approach, which considers the segmentation of a group of healthy lung samples, a group of lung samples with COPD and a group of lung samples with fibrosis, as detailed in Section 2.1. The metrics evaluated were accuracy (Accur), precision (Prec), sensitivity (Sen), specificity (Spe), Matthews correlation coefficient (MCC), Dice similarity coefficient (Dice), Jaccard index (Jac) and Hausdorff distance (HD).
Analyzing Table 11, for healthy lungs, CDAC-X stands out in all metrics, presenting the best results in accuracy (0.9877 ± 0.0055), precision (0.9774 ± 0.0211), sensitivity (0.9762 ± 0.0164), specificity (0.9911 ± 0.0100), MCC (0.9651 ± 0.0083), Dice (0.9734 ± 0.0065), Jaccard (0.9482 ± 0.0124) and Hausdorff (8.2271 ± 1.8225). In lungs with COPD, again, CDAC-X presents the best performance in all metrics. Accuracy is 0.9884 ± 0.0065, precision is 0.9662 ± 0.0278, sensitivity is 0.9710 ± 0.0324, specificity is 0.9932 ± 0.0062, MCC is 0.9575 ± 0.0202, Dice is 0.9641 ± 0.0162, Jaccard is 0.9311 ± 0.0299, and Hausdorff is 4.0302 ± 0.3298. In segmenting lungs with fibrosis, CDAC-X continues to excel with the best accuracy (0.9911 ± 0.0046), precision (0.9644 ± 0.0395), sensitivity (0.9661 ± 0.0133), specificity (0.9959 ± 0.0046), MCC (0.9536 ± 0.0210), Dice (0.9582 ± 0.0193), Jaccard (0.9204 ± 0.0348), and Hausdorff (3.6490 ± 0.2185).
Table 12 shows the average convergence time of the CDAC-X, CDAC-S and CDAC-A versions in the segmentation of lungs in CT images, analyzing healthy lungs, lungs with COPD and lungs with fibrosis. Analyzing this table, it is possible to notice that the CDAC-S version is significantly more efficient in terms of average convergence time for the segmentation of lungs in CT images, regardless of the health condition of the lungs. For healthy lungs, CDAC-S had a convergence time of 3.88 ± 2.96 s, much lower than CDAC-X (7.99 ± 8.57 s) and CDAC-A (7.68 ± 8.92 s). In COPD lungs, CDAC-S was also the fastest, at 2.03 ± 0.94 s, compared with 4.98 ± 5.34 s for CDAC-X and 2.36 ± 1.41 s for CDAC-A. For fibrotic lungs, CDAC-S continued to lead at 1.58 ± 0.808 s, outperforming CDAC-X (7.27 ± 6.27 s) and CDAC-A (5.76 ± 8.43 s).
In Figure 10, Figure 11 and Figure 12, the bar charts for segmentation of each group of lung samples are shown, being healthy, with COPD and with fibrosis, respectively. The construction of the graphs was based on the values in Table 11. These graphs provide a clearer and more direct comparison of the metrics for the three CDAC configurations in lung segmentation, using images from the chest CT dataset and addressing segmentation by comorbidity. Each CDAC configuration is differentiated by a distinct color, with the legend included in the graph itself. Metrics are presented side-by-side for each configuration, making it easy to see how each one is performing. The best performance for each metric is visually highlighted with a green arrow designating the highest value.
Overall, based on the analysis of Table 11 and Table 12, and consolidated by the graphs shown in Figure 10, Figure 11 and Figure 12, although CDAC-X was not the fastest version, it proved to be the most efficient in terms of overall performance among the versions of the proposed method, considering the comorbidity assessment approach.
The results show that CDAC-X performed best across all metrics and for all lung health conditions. In addition to the performance of the metrics, in the convergence time analysis, CDAC-X was also significantly more efficient, with shorter convergence times across all lung health conditions, with 3.88 s for healthy lungs, 2.03 s for COPD lungs, and 1.58 s for lungs with fibrosis.

3.4.2. Comparison with Other Methods—Comorbidity Approach

Due to its superior performance compared to other versions of CDAC, Table 13 presents a comparison of the results of CDAC-X with other methods, considering metrics such as accuracy, precision, sensitivity, specificity, and Matthews correlation coefficient (MCC). This comparison is also made considering three groups of chest CT image samples with lungs in different health conditions: healthy lungs, lungs with COPD, and lungs with fibrosis.
Table 13. Comparison of CDAC-X results with other works for segmentation of the lung dataset—comorbidity approach (part 1).
Table 13. Comparison of CDAC-X results with other works for segmentation of the lung dataset—comorbidity approach (part 1).
MethodsAccuracyPrecisionSensitivitySpecificityMCC
Healthy Lungs
CDAC-X0.9877 ± 0.00550.9774 ± 0.02110.9762 ± 0.01640.9911 ± 0.01000.9663 ± 0.0087
He et al. (2023) [32]0.9845 ± 0.00620.9719 ± 0.02250.9577 ± 0.03350.9889 ± 0.01140.9540 ± 0.0162
Filho et al. (2019) [31]0.9719 ± 0.00820.9917±0.00910.8891 ± 0.04390.9968 ± 0.00380.9200 ± 0.0193
Filho et al. (2014) [12]0.9880 ± 0.00570.9777 ± 0.01670.9718 ± 0.00800.9920 ± 0.00810.9651 ± 0.0083
Felix et al. (2013) [33]0.9453 ± 0.03380.8668 ± 0.10610.9210 ± 0.03080.9476 ± 0.04410.8555 ± 0.0667
Rebouças Filho et al. (2011) [34]0.9731 ± 0.00910.9817 ± 0.02220.9031 ± 0.03400.9936 ± 0.00720.9232 ± 0.0192
Alexandria et al. (2010) [35]0.9631 ± 0.02140.9462 ± 0.05290.9095 ± 0.02660.9770 ± 0.02750.9013 ± 0.0373
Felix et al. (2009) [30]0.9852 ± 0.00600.9825 ± 0.01930.9543 ± 0.01790.9938 ± 0.00750.9581 ± 0.0106
Li and Acton (2006) [14]0.9704 ± 0.01750.9721 ± 0.03160.9105 ± 0.03170.9869 ± 0.01950.9197 ± 0.0299
Xu and Prince (1998) [13]0.9382 ± 0.04890.9622 ± 0.04040.8410 ± 0.11360.9829 ± 0.02110.8563 ± 0.0835
COPD Lungs
CDAC-X0.9884 ± 0.00650.9662 ± 0.02780.9710 ± 0.03240.9996 ± 0.00100.9675 ± 0.0202
He et al. (2023) [32]0.9814 ± 0.00840.9497 ± 0.03270.9356 ± 0.03120.9903 ± 0.00730.9313 ± 0.0242
Filho et al. (2019) [31]0.9695 ± 0.00600.9981 ± 0.00450.8284 ± 0.03760.9932 ± 0.00620.8925 ± 0.0215
Filho et al. (2014) [12]0.9895 ± 0.00650.9542 ± 0.03250.9801 ± 0.01280.9910 ± 0.00750.9607 ± 0.0205
Felix et al. (2013) [33]0.9794 ± 0.00840.9458 ± 0.05340.9249 ± 0.03170.9887 ± 0.01130.9225 ± 0.0251
Rebouças Filho et al. (2011) [34]0.9827 ± 0.00680.9846 ± 0.02270.9052 ± 0.03780.9968 ± 0.00470.9339 ± 0.0248
Alexandria et al. (2010) [35]0.9812 ± 0.00590.9625 ± 0.04180.9199 ± 0.03170.9921 ± 0.00880.9295 ± 0.0162
Felix et al. (2009) [30]0.9897 ± 0.00390.9854 ± 0.01700.9481 ± 0.02520.9969 ± 0.00360.9604 ± 0.0129
Li and Acton (2006) [14]0.9842 ± 0.00500.9834 ± 0.02150.9166 ± 0.03700.9965 ± 0.00460.9400 ± 0.0172
Xu and Prince (1998) [13]0.9833 ± 0.00610.9804 ± 0.02770.9144 ± 0.03690.9960 ± 0.00600.9368 ± 0.0211
Lungs with Fibrosis
CDAC-X0.9911 ± 0.00460.9644 ± 0.03950.9661 ± 0.01330.9969 ± 0.00460.9576 ± 0.0214
He et al. (2023) [32]0.9825 ± 0.00740.9481 ± 0.05200.8993 ± 0.04110.9940 ± 0.00660.9129 ± 0.0256
Filho et al. (2019) [31]0.9780 ± 0.00670.9980 ± 0.00470.8293 ± 0.02980.9998 ± 0.00060.8982 ± 0.0167
Filho et al. (2014) [12]0.9920 ± 0.00370.9543 ± 0.04670.9688 ± 0.01720.9950 ± 0.00440.9536 ± 0.0210
Felix et al. (2013) [33]0.9484 ± 0.05160.8309 ± 0.11110.8085 ± 0.22040.9768 ± 0.01640.7831 ± 0.1618
Rebouças Filho et al. (2011) [34]0.9853 ± 0.00490.9557 ± 0.07730.9090 ± 0.03070.9951 ± 0.00690.9227 ± 0.0333
Alexandria et al. (2010) [35]0.9823 ± 0.00750.9215 ± 0.05570.9183 ± 0.02640.9899 ± 0.00700.9093 ± 0.0268
Felix et al. (2009) [30]0.9916 ± 0.00290.9768 ± 0.02670.9480 ± 0.02440.9976 ± 0.00260.9574 ± 0.0091
Li and Acton (2006) [14]0.9817 ± 0.00730.9010 ± 0.07770.9296 ± 0.02760.9876 ± 0.00890.9038 ± 0.0338
Xu and Prince (1998) [13]0.9820 ± 0.00790.9299 ± 0.06080.9049 ± 0.03650.9912 ± 0.00660.9066 ± 0.0380
Analyzing Table 13, for the group of samples with healthy lungs, CDAC-X obtained high accuracy (0.9877 ± 0.0055), precision (0.9774 ± 0.0211) and specificity (0.9911 ± 0.0100); however, it stood out for returning the highest sensitivity values, with 0.9762 ± 0.0164, and MCC, with 0.9663 ± 0.0087, surpassing all other methods. For lungs with COPD, CDAC-X maintained its leadership with MCC of 0.9675 ± 0.0202 and achieved the highest Specificity among all, with 0.9996 ± 0.0010. Ref. [12] has a slight advantage in accuracy (0.9895 ± 0.0065) and sensitivity (0.9801 ± 0.0128), while [31] has the highest precision (0.9981 ± 0.0045). For lungs with fibrosis, CDAC-X continues to lead in MCC, with 0.9576 ± 0.0214, and again returns high values in accuracy (0.9911 ± 0.0046), sensitivity (0.9661 ± 0.0133), specificity (0.9969 ± 0.0046), although [12] has the best accuracy (0.9920 ± 0.0037) and sensitivity (0.9688 ± 0.0172) and [31] has the best precision (0.9980 ± 0.0047) and specificity (0.9998 ± 0.0006). The green background in Table 13 highlights instances where CDAC achieved the highest performance in a given metric, ensuring readability with white text. Meanwhile, bold values indicate cases where another method outperformed CDAC in a specific metric.
The best performances of CDAC-X in Table 13 indicate that, for healthy lungs, it presented excellent sensitivity (0.9762 ± 0.0164) and mcc (0.9663 ± 0.0087), showing high efficacy in correctly identifying the areas of the lung to be segmented. For lungs with COPD, it stood out in specificity (0.9996 ± 0.0010) and MCC (0.9675 ± 0.0202), evidencing its accuracy in avoiding false positives and maintaining a balanced segmentation. For lungs with fibrosis, CDAC-X had the best performance in MCC (0.9576 ± 0.0214), reflecting its high quality and balance in segmenting lungs under this specific condition.
In Table 14, the performance of CDAC-X, regarding the analysis by comorbidity, is compared with the same methods, however, using the Dice coefficient, Jaccard index and Hausdorff distance metrics. For healthy lungs, CDAC-X shows the best performance in the Dice, Jaccard and Hausdorff metrics, returning the values of 0.9746 ± 0.0065, 0.9505 ± 0.0124 and 8.2271 ± 1.8225, respectively, significantly outperforming the other methods. In COPD lungs, CDAC-X maintains a satisfactory performance with Dice of 0.9641 ± 0.0162, Jaccard of 0.9311 ± 0.0299 and Hausdorff distance of 11.3717 ± 7.9279; however, it lags slightly behind the method of [12], which presents the best metrics Dice (0.9666 ± 0.0170), Jaccard (0.9359 ± 0.0315), and Hausdorff (3.2058 ± 0.1977). For lungs with fibrosis, CDAC-X again leads with the best Dice (0.9682 ± 0.0193), Jaccard (0.9304 ± 0.0348) and Hausdorff (3.6490 ± 0.2185) metrics, while [31,32,33] show significantly lower values in all metrics.
Table 14. Comparison of CDAC-X results with other works for segmentation of the lung dataset—comorbidity approach (part 2).
Table 14. Comparison of CDAC-X results with other works for segmentation of the lung dataset—comorbidity approach (part 2).
MethodsDiceJaccardHausdorff
Healthy Lungs
CDAC-X 160.9746 ± 0.00650.9505 ± 0.01248.2271 ± 1.8225
He et al. (2023) [32]0.9641 ± 0.01580.9312 ± 0.028839.2823 ± 2.2563
Filho et al. (2019) [31]0.9383 ± 0.02340.8846 ± 0.040868.8394 ± 2.5022
Filho et al. (2014) [12]0.9734 ± 0.00600.9482 ± 0.01148.3183 ± 1.8190
Felix et al. (2013) [33]0.8883 ± 0.04880.8024 ± 0.077423.0173 ± 2.0028
Rebouças Filho et al. (2011) [34]0.9402 ± 0.01930.8878 ± 0.034413.2998 ± 1.6877
Alexandria et al. (2010) [35]0.9261 ± 0.02240.8632 ± 0.038316.3310 ± 1.6237
Felix et al. (2009) [30]0.9679 ± 0.00900.9380 ± 0.016610.9098 ± 1.9122
Li and Acton (2006) [14]0.9396 ± 0.01840.8866 ± 0.032114.7047 ± 1.6152
Xu and Prince (1998) [13]0.8915 ± 0.06190.8096 ± 0.095919.8571 ± 1.4710
COPD Lungs
CDAC-X0.9641 ± 0.01620.9311 ± 0.02994.0302 ± 0.3298
He et al. (2023) [32]0.9419 ± 0.01920.8908 ± 0.034125.2761 ± 1.1491
Filho et al. (2019) [31]0.9049 ± 0.02210.8271 ± 0.037178.4890 ± 1.2651
Filho et al. (2014) [12]0.9666±0.0170 170.9359 ± 0.03153.2058 ± 0.1977
Felix et al. (2013) [33]0.9336 ± 0.02020.8761 ± 0.035510.1916 ± 0.7677
Rebouças Filho et al. (2011) [34]0.9427 ± 0.02210.8923 ± 0.03959.0103 ± 0.6018
Alexandria et al. (2010) [35]0.9395 ± 0.01270.8861 ± 0.02239.6780 ± 0.6970
Felix et al. (2009) [30]0.9660 ± 0.01110.9345 ± 0.02063.7288 ± 0.2011
Li and Acton (2006) [14]0.9480 ± 0.01570.9016 ± 0.02857.6722 ± 0.5257
Xu and Prince (1998) [13]0.9454 ± 0.01860.8971 ± 0.03347.8677 ± 0.4147
Lungs with Fibrosis
CDAC-X0.9682 ± 0.01930.9304 ± 0.03483.6490 ± 0.2185
He et al. (2023) [32]0.9212 ± 0.02320.8547 ± 0.039634.5237 ± 1.4902
Filho et al. (2019) [31]0.9055 ± 0.01680.8278 ± 0.027784.6300 ± 1.7726
Filho et al. (2014) [12]0.9605 ± 0.02100.9248 ± 0.03774.5954 ± 0.7860
Felix et al. (2013) [33]0.7965 ± 0.15450.6858 ± 0.187223.9368 ± 2.4316
Rebouças Filho et al. (2011) [34]0.9289 ± 0.03390.8689 ± 0.05479.9457 ± 1.4493
Alexandria et al. (2010) [35]0.9184 ± 0.02320.8500 ± 0.039413.1974 ± 1.1605
Felix et al. (2009) [30]0.9616 ± 0.00820.9261 ± 0.01515.2953 ± 0.6588
Li and Acton (2006) [14]0.9122 ± 0.03210.8402 ± 0.053313.4484 ± 1.1233
Xu and Prince (1998) [13]0.9158 ± 0.03450.8464 ± 0.056415.1653 ± 1.4811
16 The green background highlights instances where CDAC achieved the highest performance in a given metric, with white text ensuring readability. 17 Bold values indicate cases where another method outperformed CDAC in a specific metric.
Overall, CDAC-X demonstrates consistent and superior performance in lung segmentation across different health conditions. For healthy lungs, it achieved the best results in sensitivity (0.9762 ± 0.0164) and MCC (0.9663 ± 0.0087), in addition to high accuracy (0.9877 ± 0.0055), high precision (0.9774 ± 0.0211) and high specificity (0.9911 ± 0.0100). In the case of COPD lungs, CDAC-X maintained the lead in MCC (0.9675 ± 0.0202) and specificity (0.9996 ± 0.0010), although [12] showed a slight advantage in accuracy (0.9895 ± 0.0065) and sensitivity (0.9801 ± 0.0128), and [31] in precision (0.9981 ± 0.0045).
For lungs with fibrosis, CDAC-X led in MCC (0.9576 ± 0.0214) and presented high values in accuracy (0.9911 ± 0.0046), sensitivity (0.9661 ± 0.0133) and specificity (0.9969 ± 0.0046), although [12] achieved the best accuracy (0.9920 ± 0.0037) and sensitivity (0.9688 ± 0.0172), and [31] the best precision (0.9980 ± 0.0047) and specificity (0.9998 ± 0.0006).
In metrics such as Dice, Jaccard and Hausdorff, CDAC-X led in healthy lungs with 0.9746 ± 0.0065, 0.9505 ± 0.0124 and 21.1250 ± 38.1209, respectively, and in lungs with fibrosis with 0.9682 ± 0.0193, 0.9304 ± 0.0348 and 10.2843 ± 4.5806. In lungs with COPD, it performed satisfactorily, but slightly worse than [12], highlighting the robustness and efficiency of CDAC-X compared to competing methods. In other words, the values indicate that CDAC-X excels in segmenting healthy and fibrotic lungs, significantly outperforming other methods, and maintains a competitive performance in COPD lungs, although it is not the absolute best in this regard.
To further support the quantitative comparisons presented in Table 13 and Table 14, Figure 13 presents a visual comparison of the segmentation results for three different cases: a patient with COPD (Sample #7), a healthy patient (Sample #16), and a patient with fibrosis (Sample #35). The columns display the ground truth (GT) segmentation mask, the result obtained with the proposed CDAC-X method, and the segmentation mask generated by the method used in [32], chosen as an example to perform the visual comparison.
The segmentation results seen in Figure 13 highlight the main differences between the CDAC-X method, the approach proposed in [32], and the ground truth (GT) masks. In the three selected cases—COPD (Sample #7), a healthy lung (Sample #16), and a lung with fibrosis (Sample #35)—CDAC-X consistently demonstrates superior alignment with the GT masks, particularly in regions with irregular boundaries and complex anatomical structures.
In the case of COPD (Sample #7), CDAC-X provides a segmentation that accurately follows the shape and extent of the GT mask, while the method in [32] exhibits slight undersegmentation, failing to fully capture some peripheral regions. This suggests that CDAC-X is more effective in delineating pathological regions where lung structure is altered. For the healthy lung (Sample #16), both CDAC-X and [32] yield segmentations close to the GT mask. However, CDAC-X achieves a more precise contour, while [32] introduces minor deviations, which could impact downstream analyses. This indicates that even in normal anatomical structures, CDAC-X maintains a high level of accuracy.
In the case of fibrosis (Sample #35), the differences become more pronounced. CDAC-X successfully segments lung regions without over-segmentation, preserving the expected anatomical structure. In contrast, the method in [32] shows a tendency towards over-segmentation, including extraneous regions that are not part of the GT mask. This suggests that CDAC-X is better suited to deal with lung conditions with heterogeneous features and diffuse patterns.
Overall, these visual comparisons shown in Figure 13 reinforce the quantitative findings, demonstrating that CDAC-X not only improves segmentation accuracy but also increases robustness across different lung conditions. The method effectively balances sensitivity and specificity, ensuring more reliable segmentation results, particularly in challenging pathological cases.

3.5. Computational Cost and Practical Deployment Considerations

Our results indicate that while CDAC-X achieves superior performance in the segmentation task, its computational cost is significantly higher compared to CDAC-S and CDAC-A. This difference can be observed in Table 3, Table 7 and Table 12, which present the computational cost of each variant in individual, general, and comorbidity-based approaches, respectively. The increased complexity of CDAC-X stems from its deeper Vision Transformer (ViT) architecture, as can be seen in Table 1, which enables more sophisticated modeling of anatomical structures and improves segmentation accuracy. However, this performance gain comes at the cost of a substantial increase in computational demand, impacting inference speed and requiring greater processing capacity for efficient execution.
In real-time clinical environments, such as emergency diagnostics and intraoperative navigation, inference speed is a key factor in determining the feasibility of a segmentation method. The higher computational cost of CDAC-X may pose a challenge in these scenarios, especially in systems with limited computing resources. To ensure its viability in such contexts, hardware acceleration techniques such as GPUs, TPUs, or specialized AI accelerators become essential to reduce inference time without compromising model accuracy.
On the other hand, in applications where segmentation accuracy takes precedence over inference speed, such as retrospective analyses, in-depth clinical studies, and scientific investigations, CDAC-X remains a highly relevant option. Its potential to provide more precise and detailed segmentations can be leveraged in medical imaging studies that require high fidelity in anatomical structure identification. Thus, the use of CDAC-X must be balanced between accuracy and computational efficiency, considering the specific requirements of each application. In future work, we plan to explore techniques such as quantization, model compression, and knowledge distillation, aiming to reduce the computational cost of CDAC-X without compromising its accuracy, making it more accessible for real-time applications.
Thus, the use of CDAC must be balanced between accuracy and computational efficiency, considering the specific requirements of each application. In future work, we plan to explore techniques such as quantization, model compression, and knowledge distillation, aiming to reduce the computational cost of CDAC-X without compromising its accuracy, making it more accessible for real-time applications.

3.6. CDAC Segmentation Interpretability

One of the main challenges of deep learning-based segmentation methods is their limited interpretability, which often makes it difficult for radiologists to understand the model’s decision-making process. Unlike conventional black-box deep learning approaches, CDAC enhances interpretability by integrating contextual modeling into the segmentation process, allowing for greater user control and transparency.
The contextual attention force (CAF) and contextual balloon force (CBF) explicitly incorporate anatomical and spatial information into the segmentation process, enabling the model to adjust contours dynamically based on clinically relevant contextual cues rather than relying solely on pixel intensity. This approach brings several advantages from an interpretability perspective:
  • Expert-guided initialization: Radiologists can define an initial region of interest (ROI) by marking key areas in the image. This ensures that segmentation aligns with expert knowledge instead of relying exclusively on learned representations;
  • Progressive contour evolution: The active contour model gradually adapts its boundaries based on predefined energy functions (CAF and CBF), allowing for visual tracking of the segmentation process, a feature typically absent in deep learning-based approaches;
  • Context-aware decision making: Instead of solely depending on global pixel features, CDAC dynamically adjusts segmentation based on local image context, making it easier to interpret why a particular boundary was selected.
These interpretability features make CDAC a promising approach for medical image segmentation, as it allows for greater transparency and user control while maintaining high segmentation accuracy. Future developments will focus on further enhancing interpretability through the integration of explainable AI (XAI) techniques, such as saliency maps and feature attribution methods, to provide additional insights into the model’s decision-making process.

3.7. Impact of Hyperparameters on Model Performance

The performance of CDAC is directly influenced by its hyperparameters, particularly the weighting factors in the loss function, which regulate the contribution of internal and external forces to the active contour evolution. Proper adjustment of these parameters contributes to maintaining a balanced trade-off between segmentation accuracy and contour adaptability.
As detailed in Section 2.2, the internal energy term ( E C B F ) consists of a continuity force ( F c o n t ), which enforces smoothness along the contour, and an adaptive contextual force ( F c o n t e x t ), which adjusts the contour evolution based on local intensity variations and prior contextual knowledge. The external energy term ( E C A F ) represents the contextual attention strength, which modulates the attraction of the contour towards high-relevance regions by leveraging multi-scale semantic features extracted from the Vision Transformer (ViT). The external energy term ( E C A F ) represents the contextual attention force, responsible for guiding the evolution of the contour by integrating contextual features extracted by the Vision Transformer (ViT). This mechanism allows the contour to be attracted to regions of interest based on learned information. This term is not solely based on pixel intensity information but also considers contextual patterns extracted from the image, aiming to contribute to a more stable segmentation that adapts to variations present in medical images.
Fine-tuning these weighting factors is crucial for balancing segmentation accuracy and contour refinement. A higher value for the contextual force weight ( w c o n t e x t ) enhances adaptation to anatomical variations by increasing the influence of high-level contextual information extracted from the Vision Transformer (ViT). However, excessive emphasis on this term may lead to over-segmentation, as the contour becomes overly dependent on global image features rather than local structures. Conversely, increasing the continuity weighting factor ( w c o n t ) reinforces contour smoothness, which can improve robustness against noise but at the cost of reducing sensitivity to fine anatomical details.
The results indicate that hyperparameter selection significantly impacts segmentation performance, particularly in cases with high anatomical variability. Future works aim to systematically explore and tune these hyperparameters to improve the adaptability of CDAC to other medical imaging modalities, such as magnetic resonance imaging (MRI) and cardiac CT, where anatomical structures and contrast properties differ significantly. Furthermore, additional optimizations will be conducted to refine segmentation performance within the analyzed dataset, ensuring greater robustness across different levels of contrast and anatomical variability.

3.8. Clinical Validation and Automated Deployment of CDAC

The segmentation results obtained with CDAC were evaluated against ground truth segmentation masks generated by specialists, ensuring a reliable reference for performance assessment. Both quantitative and qualitative comparisons with these expert-annotated masks demonstrated that CDAC achieves high segmentation accuracy and maintains a strong agreement with reference segmentations, reinforcing its reliability.
The results indicate that CDAC accurately segments pulmonary structures without requiring significant manual adjustments in most cases. Since the model integrates contextual modeling, it effectively adapts contours to anatomical variations without depending on post-processing corrections. However, we acknowledge that in specific cases, such as images with low contrast or severe artifacts, minimal manual adjustments may be required to refine the segmentation output.
Regarding automated deployment, the results suggest that CDAC can be integrated into clinical workflows without frequent manual intervention. Its robustness in segmenting pulmonary structures makes it a strong candidate for real-time applications in medical imaging. However, we recognize that additional validation on diverse datasets is essential for ensuring its generalization to different imaging conditions and equipment settings.
In addition, the computational efficiency of CDAC was analyzed, as discussed in Section 3.5. Although the more complex variant (CDAC-X) achieves higher accuracy, it requires more computational resources, potentially impacting real-time feasibility. Future work should explore hardware acceleration techniques (e.g., GPUs/TPUs) and model compression strategies to optimize inference time while maintaining segmentation performance.
Additionally, we plan to validate CDAC on publicly available datasets, such as LUNA16 [40], to further assess its robustness and adaptability across different clinical scenarios. This validation will be a crucial step in ensuring CDAC’s applicability to a broader range of real-world medical imaging tasks.

4. Conclusions

This paper presents the context-driven active contour (CDAC), a new model for CT image segmentation that expands the capabilities of active contour models (ACMs) by incorporating contextual information extracted from a Vision Transformer (ViT), giving rise to the new driving energies of the ACM concept. Unlike traditional approaches, CDAC not only follows the evolution of the curve, but dynamically adapts its trajectory based on high-level information, ensuring more accurate and robust segmentation. Through initial markings provided by experts, the method integrates the proposed external energy, the contextual attention force (CAF), which contextualizes the image from the ViT, with the proposed adaptive internal energy, the contextual balloon force (CBF), which intelligently adjusts the stiffness and elasticity of the contour. This process makes segmentation more efficient and reliable, especially for complex medical structures, expanding the potential for application in computer-aided diagnosis.
The main contributions of this work include the introduction of the external energy CAF, which uses contextual information to improve segmentation by reducing noise and improving edge detection, and the creation of the internal energy CBF, which adaptively adjusts the stiffness and elasticity parameters of the active contour according to the image context, optimizing the segmentation process. In addition, the method was evaluated on chest CT images for lung segmentation in different pathological conditions, demonstrating its ability to adapt to anatomical and clinical variations. Finally, the differentiated segmentation by approach allowed individual and global analyses of the lungs, as well as the consideration of comorbidities, providing a comprehensive assessment of the effectiveness of CDAC in various clinical scenarios.
The experimental results with the chest CT dataset demonstrated that the proposed method is capable of convincingly segmenting lung structures, considering different conjunctions. To this end, the analysis of this dataset was conducted considering three distinct approaches: individual analysis, general analysis, and analysis by comorbidity.
In the individual analysis, the lungs were segmented separately, taking into account their specific anatomical and pathological characteristics. The CDAC-X method demonstrated high efficiency in this approach, dynamically adjusting to the structural variations in each lung. In addition, it obtained superior performance metrics than the compared methods, presenting greater accuracy in delimiting the edges and a lower false positive rate.
In the overall analysis, segmentation was performed considering the lungs as a single structure, without distinction between right and left lung. CDAC-X also stood out in this scenario, offering accurate and consistent results, demonstrating its ability to generalize to different lung segmentation contexts. Specifically, this version achieved greater accuracy and sensitivity in detecting lung regions compared to other approaches.
In the comorbidity analysis, segmentation was evaluated in different clinical conditions, such as chronic obstructive pulmonary disease (COPD) and pulmonary fibrosis. CDAC-X demonstrated excellent adaptation to pathological variations, satisfactorily segmenting the regions affected by each disease. In this approach, the model obtained high values of accuracy and specificity, reinforcing its robustness in identifying distinct pathological patterns.
The performance of the newly proposed energies (CAF and CBF) also showed a significant contribution to the success of segmentation with CDAC, avoiding the reanalysis of regions already covered by the contour curve of the proposed model, and demonstrating not only an improvement in the efficiency of the process, but also ensuring greater refinement in the delimitation of the segmented areas.
In summary, the CDAC method, especially in its CDAC-X version, represents a significant advance in medical image segmentation, by incorporating mechanisms and creating new concepts that improve the adaptation and precision of the process. The proposed approach not only improves the efficiency and consistency of segmentation, but also expands the possibilities of applying active contour models in various clinical scenarios, contributing to the evolution of techniques to aid in image diagnosis and driving new research in the area.

4.1. Limitations of the CDAC

Based on the analysis of the results presented together with the proposed methodology, possible limitations of the CDAC method include the following:
  • Sensitivity to anatomical variations: In the analysis of the individual approach, discussed in Section 3.2, CDAC-A exhibited greater sensitivity to the anatomical characteristics of the right lung, leading to less consistent segmentations. This suggests that the method may be influenced by variations in morphology and anatomical structure, such as differences in shape, size, and regional distribution.
  • Computational cost: Considering the analysis of the general approach, discussed in Section 3.3, while CDAC-S achieves a convergence time of 3.53 seconds, as shown in Table 7, other methods, such as those by Braga et al. [39] (0.13 seconds) and He et al. [32] (1.15 seconds), demonstrate significantly faster processing times, as detailed in Table 10. This highlights the need for optimization in scenarios requiring real-time segmentation.
  • Contour precision: Although CDAC-X demonstrates high segmentation performance based on Dice and Jaccard metrics, it is outperformed by methods such as de S. Rebouças et al. [36] when evaluated using the Hausdorff distance metric, which measures the precision of segmented contours. This suggests that while CDAC-X is effective in identifying and overlapping regions of interest, it may exhibit inconsistencies or lower accuracy in precisely defining the boundaries of these regions.
Despite these limitations, the CDAC method presents a robust and adaptable approach to lung segmentation, effectively balancing accuracy and contextual awareness. Future research will focus on optimizing computational efficiency, enhancing contour precision, and improving the method’s generalization to a broader range of anatomical variations. These advancements will further strengthen CDAC’s applicability in clinical scenarios.

4.2. Future Work

Based on the results obtained and the analyses performed, several directions can be explored in future work to expand and improve CDAC. One of the main challenges to be faced is the reduction in computational cost, which can be made possible through parallelization and optimization of the code, allowing faster convergence of the method, especially in large medical imaging datasets. In addition, validation in different medical imaging modalities is an essential step to assess the versatility of CDAC. The application of the method in magnetic resonance imaging (MRI) and cardiac CT could provide insights into its robustness in different clinical contexts.
CDAC was initially developed and validated using a private chest CT dataset, obtained through a clinical partnership. This dataset allowed for the use of ground truth segmentation masks, annotated by specialists, ensuring a reliable evaluation of the model’s performance. Although the results have demonstrated the effectiveness of CDAC, we recognize the need to evaluate the method on public datasets to validate its generalization under different imaging conditions. As part of our future research, we plan to test CDAC on widely used lung segmentation datasets, such as LUNA16 [40], to enable broader comparisons with other segmentation approaches.
Beyond lung segmentation, CDAC can be applied to other medical imaging modalities, as its structure is based on active contour models (ACMs), guided by contextual information extracted through Vision Transformer (ViT) embeddings. This approach is not restricted to lung CT segmentation and can be adapted for other applications, such as brain MRI, cardiac CT, and abdominal organ segmentation, as discussed at the beginning of this section.
For CDAC adaptation to other anatomical structures, certain modifications would be required:
  • Adjustments to the contextual attention force (CAF) and contextual balloon force (CBF) to account for differences in tissue contrast, anatomical variations, and imaging artifacts specific to each modality;
  • Training or fine-tuning the model using domain-specific embeddings, optimizing feature extraction relevant to different types of medical imaging.
These adaptations enable CDAC to expand its applicability to a broader range of clinical applications, reinforcing its potential as a versatile segmentation tool based on deep learning and contextual modeling. By allowing adjustments tailored to different imaging modalities, CDAC can be optimized for various medical contexts, including neurological, cardiovascular, and oncological imaging. This flexibility enhances its potential for integration into diverse diagnostic workflows, improving segmentation accuracy and consistency across multiple anatomical structures and imaging techniques.
Another promising prospect is the expansion of CDAC to areas beyond medicine, exploring its use in applications such as agricultural image analysis, surveillance monitoring, and industrial quality inspection, expanding its impact to other sectors. In addition, optimization for different platforms represents a strategic advance, making the method compatible with mobile devices and cloud systems, seeking to promote greater accessibility and effectiveness in different computing environments.
With this in mind, future research will focus on generalizing CDAC, testing its robustness across different medical imaging modalities and non-medical applications, and exploring computational optimization strategies to improve its efficiency and adaptability for a wide range of real-world use cases.
Additionally, we recognize that further improvements in interpretability can be achieved by integrating Explainable AI (XAI) techniques, such as saliency maps, feature attribution methods, or rule-based explanations, to provide additional insights into the decision-making process. As part of our future work, we plan to explore these techniques to enhance CDAC’s transparency and usability in clinical environments, allowing for more reliable and interpretable segmentation results.
Finally, an innovative line of research would be to explore quantum computing to improve the performance of CDAC. The ability of quantum computing to perform large-scale parallel processing could significantly accelerate image segmentation, making the method even more efficient and generalist for different applications. These future directions pave the way for significant advances in the evolution of CDAC, expanding its possibilities for application and improvement.

Author Contributions

Conceptualization, S.P.P.d.S. and P.P.R.F.; Methodology, S.P.P.d.S. and P.P.R.F.; Software, S.P.P.d.S., R.F.I., C.B.B. and J.C.N.F.; Validation, S.P.P.d.S. and R.F.I.; Formal analysis, S.P.P.d.S. and A.G.M.; Investigation, S.P.P.d.S. and R.F.I.; Resources, P.P.R.F. and H.S.; Data curation, S.P.P.d.S., C.B.B. and J.C.N.F.; Writing—original draft preparation, S.P.P.d.S., R.F.I. and P.H.F.d.S.; Writing—review and editing, P.P.R.F. and A.G.M.; Visualization, S.P.P.d.S. and T.F.P.; Supervision, P.P.R.F. and H.S.; Project administration, P.P.R.F. All authors have read and agreed to the published version of the manuscript.

Funding

This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior—Brasil (CAPES)—Finance Code 001. Also, Pedro Pedrosa Rebouças Filho acknowledges the sponsorship from the Brazilian National Council for Research and Development (CNPq) via Grant 301455/2022-8 and State Foundation for the Support of Scientific and Technological Development (FUNCAP) for the financial support via grants 08/2023 and 09/2023.

Institutional Review Board Statement

Not applicable. This study did not require its own ethical approval, as it used a dataset previously published in other works. Although the dataset is not publicly available, it has been approved and used in previous studies such as [12,31,34], ensuring compliance with established ethical standards.

Informed Consent Statement

Not applicable. This study did not directly involve human participants, as it used a medical imaging dataset previously collected and published in previous studies. The data are not publicly available, but have undergone ethical review in the original works, including [12,31,34].

Data Availability Statement

Data underlying this paper will be shared on reasonable request to the corresponding author Pedro Pedrosa Rebouças Filho.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Jiang, Z.; Bakker, O.J.; Bartolo, P.J. Industry 4.0-Compliant Occupational Chronic Obstructive Pulmonary Disease Prevention: Literature Review and Future Directions. Sensors 2024, 24, 5734. [Google Scholar] [CrossRef] [PubMed]
  2. World Health Organization. The Top 10 Causes of Death. 2024. Available online: https://www.who.int/news-room/fact-sheets/detail/the-top-10-causes-of-death (accessed on 22 January 2025).
  3. World Health Organization. 2023 GOLD Report—Global Initiative for Chronic Obstructive Lung Disease. 2023. Available online: https://www.who.int/activities/strengthening-medical-imaging (accessed on 22 January 2025).
  4. Alsomali, H.; Palmer, E.; Aujayeb, A.; Funston, W. Early diagnosis and treatment of idiopathic pulmonary fibrosis: A narrative review. Pulm. Ther. 2023, 9, 177–193. [Google Scholar] [CrossRef] [PubMed]
  5. Ali, S.W.; Rashid, M.M.; Yousuf, M.U.; Shams, S.; Asif, M.; Rehan, M.; Ujjan, I.D. Towards the Development of the Clinical Decision Support System for the Identification of Respiration Diseases via Lung Sound Classification Using 1D-CNN. Sensors 2024, 24, 6887. [Google Scholar] [CrossRef]
  6. Shah, R.M.; Kolansky, A.M.; Kligerman, S. Thin-Section CT in the categorization and management of Pulmonary Fibrosis including recently defined Progressive Pulmonary Fibrosis. Radiol. Cardiothorac. Imaging 2024, 6, e230135. [Google Scholar] [CrossRef]
  7. Sheraz, M.; Sun, X.F.; Wang, Y.; Chen, J.; Sun, L. Recent Developments in Aptamer-Based Sensors for Diagnostics. Sensors 2024, 24, 7432. [Google Scholar] [CrossRef]
  8. World Health Organization. Chronic Obstructive Pulmonary Disease (COPD). 2024. Available online: https://www.who.int/news-room/fact-sheets/detail/chronic-obstructive-pulmonary-disease-(copd) (accessed on 22 January 2025).
  9. Yang, G.Z.; Firmin, D. The birth of the first CT scanner. IEEE Eng. Med. Biol. Mag. 2000, 19, 120–125. [Google Scholar] [CrossRef]
  10. Panayides, A.S.; Amini, A.; Filipovic, N.D.; Sharma, A.; Tsaftaris, S.A.; Young, A.; Foran, D.; Do, N.; Golemati, S.; Kurc, T.; et al. AI in Medical Imaging Informatics: Current Challenges and Future Directions. IEEE J. Biomed. Health Inform. 2020, 24, 1837–1857. [Google Scholar] [CrossRef]
  11. Kass, M.; Witkin, A.; Terzopoulos, D. Snakes: Active contour models. Int. J. Comput. Vis. 1988, 1, 321–331. [Google Scholar] [CrossRef]
  12. Filho, P.P.R.; Cortez, P.C.; da Silva Barros, A.C.; de Albuquerque, V.H.C. Novel Adaptive Balloon Active Contour Method based on internal force for image segmentation—A systematic evaluation on synthetic and real images. Expert Syst. Appl. 2014, 41, 7707–7721. [Google Scholar] [CrossRef]
  13. Xu, C.; Prince, J.L. Snakes, shapes, and gradient vector flow. IEEE Trans. Image Process. 1998, 7, 359–369. [Google Scholar]
  14. Li, B.; Acton, S.T. Vector Field Convolution for Image Segmentation using Snakes. In Proceedings of the IEEE International Conference on Image Processing, ICIP 2006, Atlanta, GA, USA, 8–11 October 2006; pp. 1637–1640. [Google Scholar]
  15. Gonzalez, C.I.; Melin, P.; Castillo, O. Edge Detection Method Based on General Type-2 Fuzzy Logic Applied to Color Images. Information 2017, 8, 104. [Google Scholar] [CrossRef]
  16. Medeiros, A.G.; Guimarães, M.T.; Peixoto, S.A.; de O. Santos, L.; da Silva Barros, A.C.; de S. Rebouças, E.; de Albuquerque, V.H.C.; Rebouças Filho, P.P. A new fast morphological geodesic active contour method for lung CT image segmentation. Measurement 2019, 148, 106687. [Google Scholar] [CrossRef]
  17. Lee, B.R.; Hamza, A.B.; Krim, H. An active contour model for image segmentation: A variational perspective. In Proceedings of the 2002 IEEE International Conference on Acoustics, Speech, and Signal Processing, Orlando, FL, USA, 13–17 May 2002; Volume 2, pp. II-1585–II-1588. [Google Scholar]
  18. Otsu, N. A Threshold Selection Method from Gray-Level Histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–66. [Google Scholar] [CrossRef]
  19. Adams, R.; Bischof, L. Seeded region growing. IEEE Trans. Pattern Anal. Mach. Intell. 1994, 16, 641–647. [Google Scholar] [CrossRef]
  20. de S.Rebouças, E.; Braga, A.M.; Sarmento, R.M.; Marques, R.C.P.; Filho, P.P.R. Level Set Based on Brain Radiological Densities for Stroke Segmentation in CT Images. In Proceedings of the 30th IEEE International Symposium on Computer-Based Medical Systems, CBMS 2017, Thessaloniki, Greece, 22–24 June 2017; Bamidis, P.D., Konstantinidis, S.T., Rodrigues, P.P., Eds.; IEEE Computer Society: Washington, DC, USA, 2017; pp. 391–396. [Google Scholar]
  21. Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. In Medical Image Computing and Computer-Assisted Intervention–MICCAI 2015: 18th International Conference, Munich, Germany, 5–9 October 2015, Proceedings, Part III 18; Springer: Cham, Switzerlands, 2015; Volume 9351, pp. 234–241. [Google Scholar]
  22. de F.Souza, L.F.; Silva, I.C.L.; Marques, A.G.; dos S. Silva, F.H.; Nunes, V.X.; Hassan, M.M.; de Albuquerque, V.H.C.; Filho, P.P.R. Internet of Medical Things: An Effective and Fully Automatic IoT Approach Using Deep Learning and Fine-Tuning to Lung CT Segmentation. Sensors 2020, 20, 6711. [Google Scholar] [CrossRef]
  23. Raman, R.; Kumar, V.; Pillai, B.G.; Rabadiya, D.; Divekar, R.; Vachharajani, H. Leveraging DeepLabV3+ for Lung Region Delineation in Chest Radiographs using Convolutional Neural Network Approach. In Proceedings of the 2024 Second International Conference on Data Science and Information System (ICDSIS), Hassan, India, 17–18 May 2024; pp. 1–5. [Google Scholar]
  24. Esteva, A.; Chou, K.; Yeung, S.; Naik, N.; Madani, A.; Mottaghi, A.; Liu, Y.; Topol, E.; Dean, J.; Socher, R. Deep learning-enabled medical computer vision. npj Digit. Med. 2021, 4, 5. [Google Scholar] [CrossRef]
  25. Zunair, H.; Hamza, A.B. Sharp U-Net: Depthwise convolutional network for biomedical image segmentation. Comput. Biol. Med. 2021, 136, 104699. [Google Scholar] [CrossRef]
  26. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 5998–6008. [Google Scholar]
  27. Metz, C.E. Basic principles of ROC analysis. Semin. Nucl. Med. 1978, 8, 283–298. [Google Scholar] [CrossRef]
  28. Yu, Y.; Wang, C.; Fu, Q.; Kou, R.; Huang, F.; Yang, B.; Yang, T.; Gao, M. Techniques and Challenges of Image Segmentation: A Review. Electronics 2023, 12, 1199. [Google Scholar] [CrossRef]
  29. Müller, D.; Soto-Rey, I.; Kramer, F. Towards a guideline for evaluation metrics in medical image segmentation. BMC Res. Notes 2022, 15, 210. [Google Scholar] [CrossRef]
  30. Felix, J.; Cortez, P.; Costa, R.; Fortaleza, S.; Pereira, E.; Holanda, M. Computer-assisted evaluation of pulmonary emphysema in CT scans: Comparison between a locally developed system and a freeware system. J. Bras. Pneumol. Publicacao Soc. Bras. Pneumol. Tisilogia 2009, 35, 868–876. [Google Scholar]
  31. Filho, P.P.R.; da Silva Barros, A.C.; Almeida, J.S.; Rodrigues, J.J.P.C.; de Albuquerque, V.H.C. A new effective and powerful medical image segmentation algorithm based on optimum path snakes. Appl. Soft Comput. 2019, 76, 649–670. [Google Scholar] [CrossRef]
  32. He, S.; Bao, R.; Li, J.; Stout, J.; Bjornerud, A.; Grant, P.E.; Ou, Y. Computer-Vision Benchmark Segment-Anything Model (SAM) in Medical Images: Accuracy in 12 Datasets. arXiv 2023, arXiv:2304.09324. [Google Scholar]
  33. Felix, J.H.d.S.; Cortez, P.C.; Alexandria, A.R.; Filho, P.R.; Cavalcante, T.; Holanda, M.A. Novo método de contornos ativo baseado na transforma de hilbert radial. In Proceedings of the V Latin American Congress on Biomedical Engineering CLAIB 2011, Habana, Cuba, 16–21 May 2011; Sustainable Technologies for the Health of All. Springer: Berlin/Heidelberg, Germany, 2013; pp. 1051–1053. [Google Scholar]
  34. Rebouças Filho, P.P.; Cortez, P.C.; Holanda, M.A. Active contour modes crisp: New technique for segmentation the lungs in CT images. Rev. Bras. Eng. Biomed. 2011, 27, 259–272. [Google Scholar] [CrossRef]
  35. Alexandria, A.; Cortez, P.; Hebert, J.; Félix, S.; Cavalcante, T.; Cavalcante, S.; Pedrosa, P.; Filho, P.P.; De, J.; Carvalho, A.; et al. Hilbertian Energy: A method for external energy calculation on radial active contours. In Proceedings of the IWSSIP 2010—17th International Conference on Systems, Signals and Image Processing, Rio de Janeiro, Brazil, 17–19 June 2010. [Google Scholar]
  36. de S.Rebouças, E.; de Medeiros, F.N.S.; Marques, R.C.P.; das Chagas, J.V.S.; Guimarães, M.T.; de O. Santos, L.; Medeiros, A.G.; Peixoto, S.A. Level set approach based on Parzen Window and floor of log for edge computing object segmentation in digital images. Appl. Soft Comput. 2021, 105, 107273. [Google Scholar]
  37. Medeiros, A.G.; de O.Santos, L.; Sarmento, R.M.; de S. Rebouças, E.; Filho, P.P.R. New Adaptive Morphological Geodesic Active Contour Method for Segmentation of Hemaorrhagic Stroke in Computed Tomography Image. In Proceedings of the Intelligent Systems—9th Brazilian Conference, BRACIS 2020, Rio Grande, Brazil, 20–23 October 2020; Lecture Notes in Computer Science, Proceedings, Part II. Cerri, R., Prati, R.C., Eds.; Springer: Berlin/Heidelberg, Germany, 2020; Volume 12320, pp. 604–618. [Google Scholar]
  38. Braga, A.M.; Marques, R.C.P.; Rodrigues, F.A.A.; de Medeiros, F.N.S. A Median Regularized Level Set for Hierarchical Segmentation of SAR Images. IEEE Geosci. Remote Sens. Lett. 2017, 14, 1171–1175. [Google Scholar] [CrossRef]
  39. Braga, A.M.; Marques, R.C.; Medeiros, F.N.; Neto, J.F.R.; Bianchi, A.G.; Carneiro, C.M.; Ushizima, D.M. Hierarchical median narrow band for level set segmentation of cervical cell nuclei. Measurement 2021, 176, 109232. [Google Scholar] [CrossRef]
  40. Setio, A.A.A.; Traverso, A.; de Bel, T.; Berens, M.S.; van den Bogaard, C.; Cerello, P.; Chen, H.; Dou, Q.; Fantacci, M.E.; Geurts, B.; et al. Validation, comparison, and combination of algorithms for automatic detection of pulmonary nodules in computed tomography images: The LUNA16 challenge. Med. Image Anal. 2017, 42, 1–13. [Google Scholar] [CrossRef]
Figure 1. Samples from the chest CT image dataset for lung segmentation. (a) Sample #1 and (b) Sample #4 represent lungs with COPD. (c) Sample #16 and (d) Sample #21 represent healthy lungs. (e) Sample #30 and (f) Sample #36 show lungs with fibrosis.
Figure 1. Samples from the chest CT image dataset for lung segmentation. (a) Sample #1 and (b) Sample #4 represent lungs with COPD. (c) Sample #16 and (d) Sample #21 represent healthy lungs. (e) Sample #30 and (f) Sample #36 show lungs with fibrosis.
Sensors 25 02864 g001
Figure 2. CDAC model execution pipeline.
Figure 2. CDAC model execution pipeline.
Sensors 25 02864 g002
Figure 3. CAF energy map for sample lung CT image. (a) Input image. (b) External energy CAF.
Figure 3. CAF energy map for sample lung CT image. (a) Input image. (b) External energy CAF.
Sensors 25 02864 g003
Figure 4. External energy CAF and the CDAC contour initialization curve.
Figure 4. External energy CAF and the CDAC contour initialization curve.
Sensors 25 02864 g004
Figure 5. Chart for performance comparison between CDAC configurations, for segmentation of the left lung, based on the metrics considered.
Figure 5. Chart for performance comparison between CDAC configurations, for segmentation of the left lung, based on the metrics considered.
Sensors 25 02864 g005
Figure 6. Chart for performance comparison between CDAC Configurations, for segmentation of the right lung, based on the metrics considered.
Figure 6. Chart for performance comparison between CDAC Configurations, for segmentation of the right lung, based on the metrics considered.
Sensors 25 02864 g006
Figure 7. Chart for performance comparison between CDAC configurations, for lung segmentation, from the metrics presented, in a general approach.
Figure 7. Chart for performance comparison between CDAC configurations, for lung segmentation, from the metrics presented, in a general approach.
Sensors 25 02864 g007
Figure 8. Example of CDAC-X contour evolution (in color green) for a sample of the lung segmentation dataset. (a) Original image, (b) expert markings, (c) 1st iteration, (d) 3rd iteration, (e) 6th iteration, (f) 9th iteration, (g) 12th iteration, (h) 15th iteration, (i) 18th iteration, (j) 25th iteration, (k) 30th iteration, and (l) 36th iteration (stabilized contour).
Figure 8. Example of CDAC-X contour evolution (in color green) for a sample of the lung segmentation dataset. (a) Original image, (b) expert markings, (c) 1st iteration, (d) 3rd iteration, (e) 6th iteration, (f) 9th iteration, (g) 12th iteration, (h) 15th iteration, (i) 18th iteration, (j) 25th iteration, (k) 30th iteration, and (l) 36th iteration (stabilized contour).
Sensors 25 02864 g008
Figure 9. Qualitative analysis between CDAC-X segmentations and the ground truth for sample #1 of the lung dataset, presenting, visually, the differences between the prediction of the proposed method and the expert’s judgment. (a) Original image. (b) Ground truth mask. (c) CDAC-X segmentation mask. (d) FN (in red) and FP (in green). (e) Ground truth with (FN + FP). (f) Overlaying ground truth with (FN + FP) over the original image.
Figure 9. Qualitative analysis between CDAC-X segmentations and the ground truth for sample #1 of the lung dataset, presenting, visually, the differences between the prediction of the proposed method and the expert’s judgment. (a) Original image. (b) Ground truth mask. (c) CDAC-X segmentation mask. (d) FN (in red) and FP (in green). (e) Ground truth with (FN + FP). (f) Overlaying ground truth with (FN + FP) over the original image.
Sensors 25 02864 g009
Figure 10. Chart for performance comparison between CDAC configurations, for segmentation of healthy lungs, from the metrics presented, in a comorbidity approach.
Figure 10. Chart for performance comparison between CDAC configurations, for segmentation of healthy lungs, from the metrics presented, in a comorbidity approach.
Sensors 25 02864 g010
Figure 11. Chart for performance comparison between CDAC configurations, for segmentation of lungs with COPD, from the metrics presented, in a comorbidity approach.
Figure 11. Chart for performance comparison between CDAC configurations, for segmentation of lungs with COPD, from the metrics presented, in a comorbidity approach.
Sensors 25 02864 g011
Figure 12. Chart for performance comparison between CDAC configurations, for segmentation of lungs with fibrosis, based on the metrics presented, in a comorbidity approach.
Figure 12. Chart for performance comparison between CDAC configurations, for segmentation of lungs with fibrosis, based on the metrics presented, in a comorbidity approach.
Sensors 25 02864 g012
Figure 13. Visual comparison of segmentation results for three different samples: (ac) Sample #7 (COPD), (df) Sample #16 (Healthy), and (gi) Sample #35 (Fibrosis). Each column presents the ground truth (GT) mask, the result of the proposed CDAC-X method, and the segmentation mask generated by the method used in He et al. (2023) [32]. The comparison highlights the ability of CDAC-X to better align with GT masks across different lung conditions. (a) GT Mask—Sample #7 (COPD), (b) CDAC-X Mask—Sample #7 (COPD), (c) He et al. (2023) [32] mask—Sample #7 (COPD), (d) GT mask—Sample #16 (healthy), (e) CDAC-X mask—Sample #16 (healthy), (f) He et al. (2023) [32] mask—Sample #16 (healthy), (g) GT mask—Sample #35 (fibrosis), (h) CDAC-X mask—Sample #35 (fibrosis), (i) He et al. (2023) [32] mask—Sample #35 (fibrosis).
Figure 13. Visual comparison of segmentation results for three different samples: (ac) Sample #7 (COPD), (df) Sample #16 (Healthy), and (gi) Sample #35 (Fibrosis). Each column presents the ground truth (GT) mask, the result of the proposed CDAC-X method, and the segmentation mask generated by the method used in He et al. (2023) [32]. The comparison highlights the ability of CDAC-X to better align with GT masks across different lung conditions. (a) GT Mask—Sample #7 (COPD), (b) CDAC-X Mask—Sample #7 (COPD), (c) He et al. (2023) [32] mask—Sample #7 (COPD), (d) GT mask—Sample #16 (healthy), (e) CDAC-X mask—Sample #16 (healthy), (f) He et al. (2023) [32] mask—Sample #16 (healthy), (g) GT mask—Sample #35 (fibrosis), (h) CDAC-X mask—Sample #35 (fibrosis), (i) He et al. (2023) [32] mask—Sample #35 (fibrosis).
Sensors 25 02864 g013
Table 1. Configuration of CDAC-X, CDAC-S and CDAC-A.
Table 1. Configuration of CDAC-X, CDAC-S and CDAC-A.
VariantNumber of LayersHeads of AttentionEmbedding SizeParameters (Approx.)
CDAC-S121276885 millions
CDAC-A24161024307 millions
CDAC-X32161280632 millions
Table 2. Results for all CDAC configurations with the lung dataset—individual approach.
Table 2. Results for all CDAC configurations with the lung dataset—individual approach.
MetricCDAC-X 1CDAC-SCDAC-A
Left LungRight LungLeft LungRight LungLeft lungRight Lung
Accuracy0.9951 ± 0.00270.9940 ± 0.00340.9934 ± 0.00510.9915 ± 0.00470.9941 ± 0.00300.9855 ± 0.0160
Precision0.9796 ± 0.02820.9698 ± 0.02770.9446 ± 0.06170.9210 ± 0.06460.9728 ± 0.02890.8757 ± 0.1620
Sensitivity0.9724 ± 0.02350.9685 ± 0.02360.9655 ± 0.02250.9574 ± 0.03120.9440 ± 0.03580.9610 ± 0.0205
Specificity0.9980 ± 0.00290.9970 ± 0.00330.9947 ± 0.00580.9934 ± 0.00490.9973 ± 0.00320.9872 ± 0.0180
MCC0.9662 ± 0.01570.9600 ± 0.01780.9541 ± 0.03400.9393 ± 0.03690.9580 ± 0.01750.9055 ± 0.0948
Dice0.9686 ± 0.01510.9629 ± 0.01690.9568 ± 0.03460.9428 ± 0.03670.9606 ± 0.01730.9066 ± 0.1000
Jaccard0.9396 ± 0.02790.9290 ± 0.03080.9191 ± 0.05760.8939 ± 0.06210.9248 ± 0.03170.8427 ± 0.1481
Hausdorff4.3793 ± 1.13346.6373 ± 2.67324.8570 ± 1.11627.4921 ± 2.65945.6548 ± 1.14309.0498 ± 2.6279
1 The green background highlights instances where CDAC achieved the highest performance in a given metric, with white text ensuring readability.
Table 3. Average convergence time for CDAC-X, CDAC-S and CDAC-A versions in the segmentation of lungs in CT images—individual approach.
Table 3. Average convergence time for CDAC-X, CDAC-S and CDAC-A versions in the segmentation of lungs in CT images—individual approach.
CDAC VersionLeft Lung—Time (s)Right Lung—Team (s)
CDAC-X4.42 ± 4.916.29 ± 5.55
CDAC-S 22.32 ± 1.211.86 ± 0.75
CDAC-A2.37 ± 1.255.38 ± 6.45
2 The green background highlights instances where CDAC performed best, with white text ensuring readability.
Table 6. Results for all CDAC configurations with the lung dataset—general approach.
Table 6. Results for all CDAC configurations with the lung dataset—general approach.
MetricCDAC-X 7CDAC-SCDAC-A
Accuracy0.9891 ± 0.00580.9849 ± 0.00900.9797 ± 0.0172
Precision0.9694 ± 0.03100.9332 ± 0.05670.9322 ± 0.0800
Sensitivity0.9711 ± 0.02160.9622 ± 0.02360.9524 ± 0.0251
Specificity0.9934 ± 0.00750.9867 ± 0.01110.9828 ± 0.0236
MCC0.9587 ± 0.01810.9423 ± 0.03370.9288 ± 0.0466
Dice0.9652 ± 0.01630.9506 ± 0.03170.9397 ± 0.0399
Jaccard0.9332 ± 0.02970.9075 ± 0.05390.8888 ± 0.0676
Hausdorff5.2922 ± 1.11405.7942 ± 1.09688.2371 ± 1.1682
7 The green background highlights instances where CDAC achieved the highest performance in a given metric, with white text ensuring readability.
Table 7. Average convergence time for CDAC-X, CDAC-S and CDAC-A versions in the segmentation of lungs in CT images—general approach.
Table 7. Average convergence time for CDAC-X, CDAC-S and CDAC-A versions in the segmentation of lungs in CT images—general approach.
CDAC VersionTime (s)
CDAC-X7.42 ± 5.24
CDAC-S 83.53 ± 1.00
CDAC-A5.62 ± 4.64
8 The green background highlights instances where CDAC performed best, with white text ensuring readability.
Table 11. Results for all CDAC configurations with the lung dataset—comorbidity approach.
Table 11. Results for all CDAC configurations with the lung dataset—comorbidity approach.
MetricCDAC-X 14CDAC-SCDAC-A
Healthy Lungs
Accuracy0.9877 ± 0.00550.9846 ± 0.00790.9731 ± 0.0206
Precision0.9774 ± 0.02110.9607 ± 0.02390.9306 ± 0.0640
Sensitivity0.9762 ± 0.01640.9701 ± 0.01060.9631 ± 0.0257
Specificity0.9911 ± 0.01000.9856 ± 0.01210.9724 ± 0.0306
MCC0.9651 ± 0.00830.9577 ± 0.01320.9280 ± 0.0411
Dice0.9734 ± 0.00650.9681 ± 0.00920.9448 ± 0.0295
Jaccard0.9482 ± 0.01240.9383 ± 0.01700.8968 ± 0.0516
Hausdorff8.2271 ± 1.82258.2273 ± 1.803112.7296 ± 1.7132
COPD Lungs
Accuracy0.9884 ± 0.00650.9849 ± 0.00670.9779 ± 0.0164
Precision0.9662 ± 0.02780.9333 ± 0.03450.9135 ± 0.1017
Sensitivity0.9710 ± 0.03240.9629 ± 0.02620.9503 ± 0.0242
Specificity0.9932 ± 0.00620.9874 ± 0.00800.9826 ± 0.0205
MCC0.9575 ± 0.02020.9429 ± 0.02180.9176 ± 0.0573
Dice0.9641 ± 0.01620.9510 ± 0.01840.9277 ± 0.0514
Jaccard0.9311 ± 0.02990.9071 ± 0.03310.8693 ± 0.0867
Hausdorff4.0302 ± 0.32984.0421 ± 0.17727.6557 ± 0.4858
Lungs with Fibrosis
Accuracy0.9911 ± 0.00460.9852 ± 0.01160.9881 ± 0.0090
Precision0.9644 ± 0.03950.9054 ± 0.07980.9526 ± 0.0631
Sensitivity0.9661 ± 0.01330.9535 ± 0.02420.9437 ± 0.0210
Specificity0.9959 ± 0.00460.9872 ± 0.01250.9935 ± 0.0098
MCC0.9536 ± 0.02100.9263 ± 0.04770.9409 ± 0.0358
Dice0.9582 ± 0.01930.9327 ± 0.04430.9467 ± 0.0323
Jaccard0.9204 ± 0.03480.8770 ± 0.07380.9004 ± 0.0543
Hausdorff3.6490 ± 0.21855.1302 ± 0.40214.2861 ± 0.3774
14 The green background highlights instances where CDAC achieved the highest performance in a given metric, with white text ensuring readability.
Table 12. Mean convergence time for CDAC-X, CDAC-S and CDAC-A versions in the segmentation of lungs in CT images—comorbidity approach.
Table 12. Mean convergence time for CDAC-X, CDAC-S and CDAC-A versions in the segmentation of lungs in CT images—comorbidity approach.
CDAC VersionHealthy Lung—Time (s)COPD Lung—Time (s)Lung with Fibrosis—Time (s)
CDAC-X7.99 ± 8.574.98 ± 5.347.27 ± 6.27
CDAC-S 153.88 ± 2.962.03 ± 0.941.58 ± 0.808
CDAC-A7.68 ± 8.922.36 ± 1.415.76 ± 8.43
15 The green background highlights instances where CDAC performed best, with white text ensuring readability.
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

Silva, S.P.P.d.; Ivo, R.F.; Barroso, C.B.; Fernandes, J.C.N.; Portela, T.F.; Medeiros, A.G.; Sousa, P.H.F.d.; Song, H.; Rebouças Filho, P.P. Context-Driven Active Contour (CDAC): A Novel Medical Image Segmentation Method Based on Active Contour and Contextual Understanding. Sensors 2025, 25, 2864. https://doi.org/10.3390/s25092864

AMA Style

Silva SPPd, Ivo RF, Barroso CB, Fernandes JCN, Portela TF, Medeiros AG, Sousa PHFd, Song H, Rebouças Filho PP. Context-Driven Active Contour (CDAC): A Novel Medical Image Segmentation Method Based on Active Contour and Contextual Understanding. Sensors. 2025; 25(9):2864. https://doi.org/10.3390/s25092864

Chicago/Turabian Style

Silva, Suane Pires Pinheiro da, Roberto Fernandes Ivo, Calleo Belo Barroso, João Carlos Nepomuceno Fernandes, Thiago Ferreira Portela, Aldísio Gonçalves Medeiros, Pedro Henrique F. de Sousa, Houbing Song, and Pedro Pedrosa Rebouças Filho. 2025. "Context-Driven Active Contour (CDAC): A Novel Medical Image Segmentation Method Based on Active Contour and Contextual Understanding" Sensors 25, no. 9: 2864. https://doi.org/10.3390/s25092864

APA Style

Silva, S. P. P. d., Ivo, R. F., Barroso, C. B., Fernandes, J. C. N., Portela, T. F., Medeiros, A. G., Sousa, P. H. F. d., Song, H., & Rebouças Filho, P. P. (2025). Context-Driven Active Contour (CDAC): A Novel Medical Image Segmentation Method Based on Active Contour and Contextual Understanding. Sensors, 25(9), 2864. https://doi.org/10.3390/s25092864

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