International Journal of Electrical and Computer Engineering (IJECE) Vol. No. December 2024, pp. ISSN: 2088-8708. DOI: 10. 11591/ijece. Automated lung cancer T-Stage detection and classification using improved U-Net model Babu Kumar Sathiyamurthy1,2. Vinoth Kumar Madhaiyan1 Department of Information Science and Engineering. RV Institute of Technology and Management. Bangalore. Affiliate to Visvesvaraya Technological University. Belagavi. India Department of Computer Science and Engineering. CHRIST University Bangalore. India Article Info ABSTRACT Article history: Lung cancer results from the uncontrolled growth of abnormal cells. This research proposes an automated, improved U-Net model for lung cancer detection and tumor staging using the TNM system. A novel maskgeneration process using thresholding and morphological operations is developed for the U-Net segmentation process. In the pre-processing stage, an advanced augmentation technique and contrast limited adaptive histogram equalization (CLAHE) are implemented for image enhancement. The improved U-Net model, enhanced with an advanced residual network (ARESNET) and batch normalization, is trained to accurately segment the tumor region from lung computed tomography (CT) images. Geometrical parameters, including perimeter, area, convex area, solidity, roundness, and eccentricity, are used to find precise T-stage of lung cancer. Validation using performance metrics such as accuracy, specificity, sensitivity, precision, and recall shows the proposed hybrid method is more accurate than existing approaches, achieving a staging accuracy of 94%. This model addresses the need for a highly accurate automated technique for lung cancer staging, essential for effective detection and treatment. Received Apr 20, 2024 Revised Jul 15, 2024 Accepted Aug 6, 2024 Keywords: Computed tomography Deep learning Lung nodule Segmentation TNM staging U-Net This is an open access article under the CC BY-SA license. Corresponding Author: Babu Kumar Sathiyamurthy Department of Information Science and Engineering. RV Institute of Technology and Management Bangalore. Affiliate to Visvesvaraya Technological University Belagavi-590018. Karnataka. India Email: babukumar. sbk@gmail. INTRODUCTION Accurate lung cancer staging is essential for determining the prognosis and course of treatment. Expert imaging interpretation is required for tumor staging. The stage of lung cancer is determined based on the 9th Edition TNM staging system, which includes three parameters: the tumorAos size, the extent of lymph node involvement, and the level of metastasis . Ae. Since the survival rate decreases significantly as lung cancer progresses from stage II to stage IV and treatment methods become more complex, accurate staging of early-stage patients is crucial to improve the five-year survival rate . Ae. Medical imaging is a critical tool in oncology to decrease the mortality rate. It is a painless, non-invasive method with few adverse side effects for the patient. Creating images of tumors can reveal comprehensive anatomical details regarding the illness. Imaging can provide a more thorough analysis of the complete tumor compared to other invasive techniques like surgeries and biopsies, which are often painful and costly . , . Various techniques have been developed for the correct detection of lung cancer stages. Complementary information is drawn from these modalities, assisting in the accurate staging due to the Journal homepage: http://ijece. ISSN: 2088-8708 investigation of anatomical and functional changes in tissues. In what follows, a categorization of related works, grouped in similar techniques used for lung cancer staging is presented. In study . , various methods, such as median filtering, contrast enhancement, morphological operations, and thresholding, were employed to pre-process input images and detect tumors within regions of interest (ROI). Marker-controlled watershed segmentation techniques were subsequently used. Parameters like perimeter, area, eccentricity, and tumor diameter were then analyzed to determine the cancer stage. This approach achieved a detection rate of approximately 90%. Kavitha et al. implemented data mining with image processing techniques, a fuzzy c-means clustering model is used for nodule segmentation and support vector machine for staging of lung cancer, resulting in overall accuracy of 93%. In . , the real time datasets are integrated with public dataset and implemented median filter, watershed transform, and multiclass SVM The experiment achieved a staging accuracy of 87%. These techniques use traditional image processing and datamining techniques for cancer staging and segmentation, which are time-consuming and less accurate. Medical imaging has significantly improved as a result of recent developments in deep learning. Using CT scans. Akimovski and Davcev . built a double convolutional deep neural network (DCDNN) and a conventional neural network (CNN). To enable focused CNN training the first step in the process, involved pre-classifying the CT scans from the input dataset. The construction of the DCDNN with maximal pooling allows for a more thorough investigation and the determination of the Tx-stage of lung cancer. After lengthy training over 100 epochs, this approach attained an accuracy of 0. A CNN-based technique for categorizing lung cancer stages as T1-T2 or T3-T4 lesions was developed in . Two networks were used: one as a "feature extractor" and the other as a "classifier," achieving an accuracy of 87%. In . , a cascaded deep learning model was proposed. The initial step involved converting the input image into a latent variable using an auto-encoder network. The next phase involved staging the compressed latent variable to an appropriate stage using a convolutional neural network. This model delivered an accuracy of 86. All the existing deep learning models discussed for staging use the full CT image as an input without segmenting the nodules, which are generally error-prone and do not yield highly accurate staging. Though significant works are carried out in lung cancer detection and classification, very little research has been done on lung cancer Moreover, the existing techniques focused on staging using direct CT images without segmentation of nodules, which results in an excessive number of false positives and false negatives. From the perspective of medical computer vision, this challenge can be seen as a categorical classification problem, and it can be solved by segmenting the data using deep learning techniques . order to successfully detect and treat lung cancer, an automated and extremely accurate method for staging lung tumors is required. This work attempts to address this need. Because present procedures are inaccurate and inefficient, patient results are often suboptimal. To solve these issues and enhance the accuracy and consistency of lung tumor staging, the suggested model makes use of cutting-edge deep learning algorithms and creative segmentation techniques. The main objective of the proposed model is addressed in three major focus areas. Firstly, the generation of masks plays a significant role in U-Net image segmentation. Many modern tools use manual segmentation for mask generation, but this is an error-prone and time-consuming process. To overcome these drawbacks, the proposed technique is implemented with automated lung nodule mask generation from the original input CT image, resulting in more accurate outcomes. Secondly, the seven-class classification holds a variable number of data samples in each group. Data augmentation plays an important role in balancing the sample count in each category. The main drawback of the existing augmentation process is that a separate method is required for each type of augmentation. To overcome this, an extended mobius augmentation technique is implemented, which includes almost all types of augmentation functions such as rotation, inversion, left shift, right shift, and zoom operations. Finally, as the network gets deeper, the performance worsens after the number of layers increases beyond a certain point. To overcome this problem and to improve segmentation accuracy while decreasing loss, the proposed model embeds the advanced residual network (ARESNET) with fine-tuned layers. METHOD The primary objective of the proposed model is to develop a novel and accurate method for detecting lung tumor stages using cutting-edge segmentation techniques and deep learning. The proposed method is assessed using the lung image database consortium (LIDC) datasets . The model is implemented in a three-stage process. In the first phase, lung regions are segmented from the preprocessed CT images. In the second phase, the nodule mask is created. In the third phase, the preprocessed input image is trained with the generated nodule mask using an improved U-Net model for accurate segmentation of lung tumors and detection of the T-stage of lung cancer, as described in Figure 1. Techniques such as Int J Elec & Comp Eng. Vol. No. December 2024: 6817-6826 Int J Elec & Comp Eng ISSN: 2088-8708 thresholding, morphological operations, border removal, connected component analysis (CCA-. , and superimposing are implemented to generate two lung region segmentations. From the segmented lung regions. Thresholding-2, connected component analysis (CCA-. , and holes filling operations are carried out to obtain the lung nodule mask. In the next phase, the preprocessed images and generated nodule masks are augmented to create sufficient input images in each stage for efficient training. The improved U-Net model is trained to segment nodules from the input CT images. Finally, the accurate T-stage of lung tumors is detected and classified using parameters like area, perimeter, eccentricity, circularity, and solidity from the segmented Figure 1. Proposed model Pre-processing After trying many filters, the upgraded CLAHE improved the staging accuracy of the proposed CLAHE overcomes the problem of increasing contrast by applying boundary values on the histogram . These boundary values are calculated using . ycE indicates the region's size covered. Q is the grayscale value, and is the cut factor whose value ranges between 0 and 100. The CLAHE process begins with region size and cut limit. The framed histogram is trimmed with the cut limit , and a new histogram is prepared for the input CT image. In the final step, the pixel interpolation is carried out in the neighbor region, and finally, the enhanced image is generated. ycE yu ycE yu = . cAycoycaycuycnycoycyco Oe . ) . Data augmentation The seven-class classification holds a variable number of data samples in each group. Augmentation is important in increasing and balancing the sample count in each category. The extended mobius augmentation technique is a modified version of the traditional Mobius technique with a four-point augmentation process . , . This technique includes most of the common augmentation functions such as rotation, inversion, left shift, right shift, zoom, and shrink operations. In the input image, four source points ycU1, ycU2, ycU3, ycU4 OO complex function ya are defined, then the four other target points ycU1, ycU2, ycU3, and ycU4 OO complex function ya. Target points are mapped to source points to generate the required transformation. Improved U-Net model U-Net, a significant semantic segmentation framework in CNN, is crucial in medical image analysis . Its major components, up-sampling and down-sampling, work together to generate thumbnails of the corresponding image, extracting detailed image attributes while reducing the fixed-size appearance to fit the display area. After up-sampling to enlarge the image, the network uses copy and crop operations to merge Automated lung cancer T-Stage detection and classification usingA (Babu Kumar Sathiyamurth. A ISSN: 2088-8708 down-sampling and up-sampling features. A convolutional layer then processes this data to produce more accurate outputs. The U-Net network's considerable number of channels during feature extraction in the upsampling phase ensures that contextual information is conveyed to subsequent higher-resolution layers, providing a significant advantage . , . Two convolutional layers are included to enhance feature extraction. These 64-dimensional characteristics are mapped to a two-dimensional output map in the final output layer using two additional convolutional layers. While it is often believed that a deeper network with more information leads to higher nonlinear expression ability, this is not always true. In practice, performance can degrade as the network depth increases beyond a certain point . , . U-Net is integrated with an ARESNET to address this issue and improve lung tumor segmentation accuracy. This enhancement is added after each preliminary feature extraction layer in both the encoding and decoding stages of the neural network. By assigning larger weights to vital key features and smaller weights to less critical elements, the network eliminates error-prone segmentation of lung nodules and improves segmentation accuracy. Figure 2 illustrates the modified neural network with the added ARESNET architecture. This novel approach leverages the strengths of U-Net while incorporating advanced residual connections to enhance performance, offering a more robust and accurate solution for medical image segmentation and lung tumor stage detection. Figure 2. shows the built U-Net model and Figure 2. depicts the added ARESNET architecture to U-Net The up sampling and the down sampling process after adding ARESNET which enhances the feature enhancement process, is illustrated with . Down sampling path Input to the layer 1: = ycI. cnycoyci )) . Down sampling layers: cn=ycn . = ycI. aycI . ))) yceycuyc ycn = 1,3. A , ycA Bottleneck Bottom layer, ycn = ycA: yaAya. cn=ycA) = ycI. cn=ycA) ))) . Up-sampling path First up-sampling layer from bottleneck: ycOya. cn=ycA) = ycI. cOya. aAya. cn=ycA) )))) . Subsequent up-sampling layers: ycOya. = ycI . cOya . cA . cOya. , ycI. ))))) yceycuyc ycn = ycA Oe 1, ycA Oe 2 A 1 where ycA . cOya. , ycI. )) indicates the process of combining . , concatenatin. the feature map that was up-sampled with the matching feature map that was enhanced by the residuals from the downsampling path. Final output layer ycC. cOya. ) = ycI. cOya. )) . According to . , the residual block ycI is added after each convolutional layer, enhancing the feature extraction process. These residual blocks are integrated into both the down-sampling and up-sampling paths, ensuring that the network efficiently learns critical characteristics and mitigates the degradation issue commonly associated with deep networks . Ae. The merging operation ycA combines the upsampled feature maps with the corresponding residual-enhanced feature maps from the down-sampling Int J Elec & Comp Eng. Vol. No. December 2024: 6817-6826 Int J Elec & Comp Eng ISSN: 2088-8708 Figure 2. Improved U-Net model . U-Net model with added ARESNET . architecture of ARESNET RESULTS AND DISCUSSION Mask generation and nodule segmentation Figure 3 displays sample output images of the proposed model. Initial raw lung CT scan acts as input for the proposed model. Second, the lung CT scan after applying contrast limited adaptive histogram equalization (CLAHE). The enhancement improves the contrast and highlights critical features, making the lung structures and potential nodules more discernible. The third image illustrates the mask generated. The mask highlights the regions of interest, which the improved U-Net model uses for nodule segmentation. Finally, the last image displays the final output of segmented nodule. The suspected lung nodule has been accurately identified and segmented from the rest of the lung tissue, highlighting its precise location boundaries and features. Original input image Enhanced image (CLAHE) Generated mask Segmented nodule Figure 3. Output results Automated lung cancer T-Stage detection and classification usingA (Babu Kumar Sathiyamurth. A ISSN: 2088-8708 Performance metrics The first experiment focuses on the results of segmented nodules with the help of a generated mask using the Improved U-Net model with Adam optimizer. The model is trained with 1,655 input images that include augmented images. The input image size is 512y512, the learning rate initially is 1y10 -2, the batch of size 8, and a total of 50 epochs in the training process is carried out. The accuracy and loss change curve graphs are shown in Figure 4. It is observed that after 50 iterations, the training accuracy of the modified U-Net model stabilizes at 0. 97, and the training loss converges to around 0. Figure 4. Accuracy and loss curve graphs The statistical verification of proper segmentation uses the average mean-intersection-over-union (M-IOU)-Jaccard, dice similarity coefficient (DSC). Jaccard Index, and Hausdorff distance. As seen from the graphical analysis in Figure 5, the results of the proposed model accurately segment the lung tumor, matching the majority of the ground truth tumors. The average Jaccard value is 96. 25, the dice similarity coefficient is 19, the minimum Jaccard distance is 3. 75, and the Hausdorff distance is 2. 2 for the overall segmented The graph in the figure depicts the statistical results of various parameters and shows the highest M-IOU-Jaccard and DSC, as well as the minimum Jaccard distance and Hausdorff distance, respectively. This indicates that the proposed segmentation technique accurately segments the tumor region with all segmented nodules on average. Figure 5. Analysis of segmentation evaluation with other techniques Int J Elec & Comp Eng. Vol. No. December 2024: 6817-6826 Int J Elec & Comp Eng ISSN: 2088-8708 The second experiment focused on extracting shape-based features such as area, eccentricity, perimeter, convex area, solidity, and circularity. Although there are various parameters to assess the shape and size factors of segmented nodules, area and perimeter play a significant role in categorizing lung tumors into the appropriate stage. Additional supportive parameters like eccentricity, circularity, and solidity help analyze notable differences in values across different stages of lung cancer. The total number of segmented pixels in a target region of an image is considered the area of the nodule. The perimeter is the overall count of pixels contributing to the segmented tumor's boundary in an image. Eccentricity measures the degree to which a shape deviates from being circular. Solidity assesses the size and number of concavities in a tumor. Circularity, ranging in value from 0 to 1, defines the roundness of the segmented target's shape. The graphs in Figure 6 illustrate the graphical analysis of the shape and size attributes of the segmented tumor. The results demonstrate that the proposed method shows noticeable variations among different stages of tumor progression, respectively. Figure 6. Analysis of stage classification with shape and size parameters The confusion matrix in Figure 7. depicts the classification results of the proposed model. seen, the model could accurately stage the Lung cancer from the input CT image. The ultimate performance analysis was conducted to verify the overall accuracy of the proposed model by comparing it with existing The experiment tested 550 individual lung CT images, each corresponding to one of the stages of lung cancer. The classified results, accuracy, recall, precision, specificity, and F1-score for each respective stage are summarized in the graphical analysis depicted in Figure 7. The graph indicates that there is a range of accuracy from 97. 64% to 98. The suggested model can efficiently stage lung cancer, according to the recall, accuracy, and specificity values. Automated lung cancer T-Stage detection and classification usingA (Babu Kumar Sathiyamurth. A ISSN: 2088-8708 The high accuracy of the proposed model was confirmed by analysis and comparison with current In Figure 8, the comparison analysis is shown. With an overall accuracy of 94%, the suggested model accurately identified 516 out of 550 input CT pictures as the appropriate T-stage of lung cancer. The graphical analysis shows that the suggested model outperformed previous methods in terms of accuracy when evaluated on a greater number of images. Figure 7. Staging result analysis . confusion matrix and . performance graph Figure 8. Analysis of proposed modelAos accuracy CONCLUSION This paper proposed an automated technique for the detection and staging of lung cancer tumors stage that combines an improved U-Net model with an ARESNET. The model is implemented with CLAHE for contrast enhancement and an automated generation procedure to increase segmentation accuracy. Extended mobius augmentation procedure is used to increase and balance the dataset in order to provide robust training. The model achieved 94% staging accuracy, demonstrating its superior performance over current approaches. The findings demonstrate that the recommended approach offers a stable and efficient means of staging lung cancer, significantly improving the precision and consistency of early-stage detection and treatment planning. The model offers a non-invasive, low-cost solution that can be developed for wider applications in medical imaging. The proposed method would increase the accuracy of lung cancer staging, which would help patients and advance the field of medical oncology. By utilizing more datasets and Int J Elec & Comp Eng. Vol. No. December 2024: 6817-6826 Int J Elec & Comp Eng ISSN: 2088-8708 investigating 3D U-Net segmentation to address the loss function and improve accuracy, future research can further improve the model. ACKNOWLEDGEMENTS The authors would like to thank the DSATM. RVITM and Christ University. Bangalore, for providing support in using High-Performance Laboratory and supporting tools for carrying out the The authors would like to thank all the researchers working in medical and health-allied fields who are playing a key role in bringing appropriate CAD techniques to save lives. REFERENCES