An optimal diagnosis model for pancreatic cancer prediction based on deep learning method
- Published
- Accepted
- Received
- Academic Editor
- Consolato Sergi
- Subject Areas
- Algorithms and Analysis of Algorithms, Artificial Intelligence, Computer Vision, Data Mining and Machine Learning, Neural Networks
- Keywords
- CT, Pancreatic cancer, Segmentation, Deep learning, Optimization theory & computation
- Copyright
- © 2026 C. et al.
- Licence
- This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, reproduction and adaptation in any medium and for any purpose provided that it is properly attributed. For attribution, the original author(s), title, publication source (PeerJ Computer Science) and either DOI or URL of the article must be cited.
- Cite this article
- 2026. An optimal diagnosis model for pancreatic cancer prediction based on deep learning method. PeerJ Computer Science 12:e3541 https://doi.org/10.7717/peerj-cs.3541
Abstract
Carcinoma of the pancreas is one of the deadliest malignant neoplasms due to its late detection, high mortality rate, and poor prognosis. Pancreatic tumors show significant variation in location, size, and shape, complicating accurate diagnosis. Moreover, they are often small and embedded within tissues of similar intensity in computed tomography (CT) images, making differentiation from healthy tissue difficult. Since biopsies and other pathological tests are not routinely performed in clinical settings, there is a growing need for non-invasive and repeatable diagnostic solutions. In current practice, CT images used for pancreatic cancer analysis require manual outlining, which is both time-consuming and subjective. Manual segmentation is inefficient for clinical use, thus emphasizing the need for a robust automated segmentation system. Both radiologists and existing algorithms struggle to accurately identify cancerous regions due to the visual similarity between tumor and normal tissue in CT scans. To address these challenges, this study proposes an automated pancreatic cancer detection system that integrates deep learning with optimization-based segmentation. This combined approach enhances threshold selection and improves segmentation accuracy in complex tumor regions. Specifically, multilevel thresholding guided by an optimization technique is applied to detect pancreatic cancer at an early stage, thereby helping reduce mortality rates. The optimization strategy is used to identify optimal parameters for maximizing the prediction rate using a deep learning classifier such as convolutional neural networks (CNN). The proposed system achieved an accuracy of 95.92%. Additionally, evaluation metrics including peak signal-to-noise ratio (PSNR), sensitivity, specificity, and mean square error (MSE) were calculated and compared with those of existing systems. This study demonstrates that the proposed particle swarm optimization (PSO)–CNN–based automated system offers a promising approach for reliable early detection and improved diagnostic accuracy in pancreatic cancer.
Introduction
Pancreatic cancer remains one of the most challenging malignancies to treat, characterized by a high incidence and an exceptionally high mortality rate. It is currently the seventh leading cause of cancer-related deaths worldwide, accounting for over 430,000 fatalities annually, according to the latest data (Bray et al., 2021). Based on the American Cancer Society’s Cancer Facts & Figures 2025, it is estimated that approximately 67,440 individuals in the United States will be diagnosed with pancreatic cancer, and about 51,980 will succumb to the disease this year. Despite advances in medical technology, the overall 5-year survival rate for pancreatic cancer remains dismal at only 13%, underscoring the urgent need for improved methods of detection and treatment (American Cancer Society, 2025).
Pancreatic cancer is among the most aggressive types of carcinoma, marked by delayed diagnosis, high mortality, and poor prognosis. Over the past 5 years, the survival rate has remained below 3.5%, with approximately 75% of patients exhibiting mutations in the TP53 gene, a genetic alteration that differentiates an individual’s DNA sequence from others. The standard procedures for identifying such mutations, surgery and biopsy are invasive and often cause discomfort, making them unsuitable for routine use in clinical practice (Chen et al., 2021). Consequently, there is a growing demand for non-invasive methods to predict cancer gene mutations. Recently, medical imaging techniques have emerged as promising tools for examining genetic changes in living tissues in a non-invasive manner.
The majority of symptoms associated with pancreatic malignancies are vague and nonspecific, often overlapping with those of other gastrointestinal disorders (Shah, Surve & Turkar, 2015). Common symptoms include unexplained weight loss, jaundice, abdominal pain, loss of appetite, and diabetes. In most cases, invasive procedures such as resection are employed to determine the exact stage and severity of the disease. It is, therefore, essential for clinicians to accurately assess the tumor and develop effective treatment strategies (Huang et al., 2021).
Image-based assessment has become increasingly prevalent in tumor imaging research. This process involves extracting high-dimensional information from medical images and translating it into meaningful features to objectively evaluate tumor morphology and heterogeneity. Medical imaging has also been used to analyze genetic alterations in living tissues in a non-invasive way. However, the pancreas exhibits considerable variation in terms of its location, size, and shape, making the segmentation of pancreatic tumors particularly difficult (Ryan, Hong & Bardeesy, 2014; Eran et al., 2007).
According to the American Cancer Society (ACS) 2022 report, approximately 62,210 new cases of pancreatic cancer and 49,830 deaths were recorded in that year. To effectively reduce pancreatic cancer fatalities, deep learning and optimization techniques must be utilized to enable early-stage tumor detection. Among various imaging techniques, computed tomography (CT) plays a crucial role in identifying pancreatic abnormalities (Kaissis & Braren, 2019).
CT imaging, combined with mathematical optimization algorithms, forms one of the most powerful approaches for pancreatic cancer screening and detection (Gad, 2022). The proposed approach iteratively trains the deep learning model using optimization principles to estimate both the maximum and minimum functions. This iterative learning mechanism enhances the model’s performance and accuracy, representing a significant advancement in deep learning applications for medical imaging (Coudray et al., 2018). The primary goal of optimization is to derive the best possible design or model parameters based on defined criteria or constraints. In this context, a deep learning-based convolutional neural network (CNN) is employed to extract distinct pancreatic cancer features (Viriyasaranon et al., 2023) and to accurately detect and classify key tumor characteristics (GandikotaID, Abirami & Sunil Kumar, 2023).
The motivation for this study stems from the urgent need to overcome the challenges of pancreatic cancer detection, which remains one of the deadliest cancers due to its late onset, ambiguous symptoms, and complex morphology. Traditional diagnostic techniques have inherent limitations, while manual segmentation of CT scans is both time-consuming and subjective, making it unsuitable for routine clinical use—particularly given the small size and indistinct boundaries of pancreatic tumors. To address these challenges, this study proposes the development of an automated, accurate, and efficient detection system that integrates deep learning and optimization methods. This hybrid approach is designed to provide a non-invasive, reliable solution for early-stage pancreatic cancer detection, ultimately aiming to improve patient survival rates and reduce mortality.
Related work
Numerous diagnostic approaches for pancreatic cancer have been proposed by various researchers. The present study provides an overview of these existing diagnostic techniques to clearly establish the objective and significance of the current research work.
Chen et al. (2022b) proposed a screening framework in 2022 for predicting pancreatic malignancies using CT imaging and a large-scale practical test dataset. The developed approach demonstrated a prediction accuracy of 91%, with consistent sensitivity and no significant variations observed across test cases. The limitation of this method is its low accuracy when applied to the utilized CT datasets. It demonstrated decreased performance across different CT datasets, indicating limited generalization capability.
Agarwal et al. (2022) introduced a technique in 2022 for the early detection of pancreatic cancer. The proposed approach utilized liquid biopsy samples combined with a hierarchical decision framework to effectively screen and identify pancreatic carcinoma at its initial stages. This work had 92% accuracy. Although the model achieved 92% accuracy during initial evaluations, its performance declined when tested on publicly available datasets, which are more representative of real-world variability and complexity.
Mukherjee et al. (2022) developed an approach that detects malignancies in the pancreas in CT scan images in 2022. For the detection of pancreatic cancer, the proposed system employed a Support Vector Machine (SVM) classifier in conjunction with advanced image processing techniques. A pre-processing technique was applied to eliminate artifacts from the CT images, while a volumetric segmentation method was utilized to perform precise image segmentation. This method does not produce accurate results for large datasets due to the lengthy training period.
In 2021, Dhruv, Mittal & Modi (2021a) proposed an image enhancement approach based on swarm optimization for detecting pancreatic tumors in 3D CT images. The model’s effectiveness was assessed using validation metrics such as entropy. However, the limitation of this method is that it achieved an accuracy of only 91%.
In 2021, Dhruv, Mittal & Modi (2021b) recommended an approach for identifying pancreatic tumors using the particle swarm optimization, as well as the split and merge algorithm in CT images. The enhancing approach was utilised to restore pancreatic tissue information in CT scan images. Empirical findings reveal that the method outperforms conventional particle swarm optimization (PSO) in terms of contrast and entropy.
Zhang et al. (2020) recommended a model for identifying pancreatic cancer with CT scans in 2020. The proposed method incorporates three key components: computational dependencies, self-adaptive mechanisms, and an augmented feature pyramid network. For feature extraction and pancreatic categorization, the CNN with ResNet-101 was employed. By combining these three recommended components the suggested method yielded an accuracy of 90.18%. The primary limitation of this model is its inability to accurately detect cancer during its early stages, resulting in reduced precision in diagnosis.
Li et al. (2020) suggested a technique for identifying pancreatic cancer in 2020. By utilizing ensemble learning, this research unveils an exhaustive diagnostic automated approach to figuring out and grading pancreatic cancer in CT scans in advance of surgery. This approach achieved a classification accuracy of 86.61%. However, the primary limitation of this model is its relatively low accuracy compared to the desired performance level. In 2019, Liang et al. (2019) introduced a nomogram-based predictive model that used quantitative data obtained from CT scan images to determine the histologic grades of pancreatic neuroendocrine tumors. The model achieved an accuracy of 90.70%, showing its effectiveness in differentiating tumor grades through imaging-based indicators. Although the study produced encouraging outcomes, it was limited to assessing already identified tumors and lacked an automated mechanism for detecting or classifying pancreatic tumors, which is crucial for early diagnosis and comprehensive clinical evaluation.
Hussein et al. (2019) discovered a method for detecting pancreatic and lung tumors in 2019. To detect tumours in the pancreas and lungs, computer-aided diagnosis approaches, both supervised and unsupervised, were devised in this model. They demonstrated a novel 3D CNN architecture for supervised learning based on graph regularised sparse multi-task learning and performed tumour segmentation classification from CT data. In this model, a novel supervised learning approach like SVM is utilized for classification of pancreatic tumours from MRI images and lung tumours from CT scans. This approach detects the pancreatic tumours with 91.26% accuracy.
The existing methods for pancreatic cancer detection, despite achieving high accuracy in controlled environments, face significant limitations when it comes to generalization across diverse, real-world datasets. Many techniques, such as those based on traditional methods, show reduced performance on different datasets due to data dependency, indicating a need for more robust training techniques. Additionally, methods like the optimized SVM classifier require extensive training time and computational resources, posing barriers to practical clinical application. Early-stage detection remains a critical challenge, with models struggling to identify tumors at nascent stages. Advanced approaches, including ensemble learning and self-adaptive networks, while potentially improving accuracy, add complexity and reduce interpretability for clinical practitioners. Furthermore, the integration of these diagnostic methods into everyday clinical practice is hindered by issues such as training requirements, computational demands, and the need for specialized knowledge, limiting their widespread adoption. Also, in all the above methods, researchers never used the optimization technique in conjunction with multilevel thresholding to segment pancreatic cancer tumors accurately. As a result, such models provide less precision. To address these issues, a novel model based on optimization (PSO) with multilevel thresholding and deep learning technique (CNN) was presented to detect pancreatic cancer in CT images, where the model will improve detection and classification accuracy.
It is important to note that although several segmentation methods have been cited and explored in the literature, most achieve moderate accuracy and lack robustness when applied to diverse or real-world datasets. This consistent underperformance, particularly in early-stage tumor detection, highlights a significant gap. To bridge this, our study proposes a novel integration of PSO-based multilevel thresholding and CNN classification, which addresses these limitations and demonstrates superior performance.
The novelty of the proposed work lies in the strategic integration of PSO with CNN within a unified framework for the detection and categorization of pancreatic cancer from CT scans. While individual techniques like CNN, PSO, or thresholding have been previously used in isolation, this work uniquely combines median filtering for noise reduction, Otsu-based multilevel thresholding enhanced by PSO for optimal segmentation, and CNN for robust feature extraction and classification. This tailored pipeline is specifically designed to address real-world challenges such as the presence of noise, anatomical variability, and the difficulty in distinguishing small or early-stage lesions from healthy tissue. The proposed method demonstrates superior performance and generalization across publicly available datasets, achieving a high accuracy and proves to be more resilient and efficient compared to conventional or fragmented approaches. Thus, the framework itself is novel in its comprehensive structure and clinical applicability, even though its components are based on established techniques.
Proposed methodology
In this diagnosis model, deep learning and optimization approaches are employed to recognise and define pancreatic cancer in CT scan imagery.
The proposed method for pancreatic cancer detection is a four-stage pipeline involving: (1) Acquisition of CT images, (2) Pre-processing with a median filter to reduce noise, (3) Optimized multilevel thresholding segmentation using Otsu method enhanced with PSO, and (4) Classification of tumor regions using a CNN. Each stage is designed to address specific challenges such as noise, anatomical variability, and boundary ambiguity in pancreatic tumor detection.
The schematic structure of the suggested methodology is depicted in Fig. 1. This method comprises image enhancement as a pre-processing strategy, as well as image segmentation, feature extraction, and classification as a post-processing tool.
Figure 1: Block diagram of proposed method.
Input CT images
CT scan images are utilised to detect pancreatic cancer in this work since they are the most frequently used in determining the presence of tumours in pancreas and are available to most medical facilities in terms of tumour size and location. A CT scan of the pancreas is used to check for tumours, injuries, haemorrhage, infection, or other problems (Zhou et al., 2017; Tongtong et al., 2018). As a result, CT imagery is obtained in this work from public databases such as Kaggle and Cancer Imaging Archive (CIA).
Image enhancement
Image enhancement is utilised to recover information about pancreatic cancer from CT images. Enhancing an image before processing seeks to improve its clarity and informational content. The image enhancement’s two goals are to reduce noise and reinforce the preservation of the image’s edge and structural information.
Median filter
Usually, the acquired CT images often contain noise introduced by scanner settings, patient movement, or reconstruction artifacts. Effective noise reduction is essential to enhance image quality while preserving critical structural details such as edges, which are important for accurate diagnosis. It reduces noise from input imagery and keeps edges intact during noise removal. The filtered image is more similar to the original image and more features are preserved, it has a better effect on salt and pepper noise (Song et al., 2011). As a result, the median filter is very useful in image processing. A range of morphological activities can be taken to reduce background noise. The photos can be smoothed out using the Median filtering methodology in this manner, and the brightness of the pixels can be modified. The median filter replaces the central pixel of a M * M neighbourhood with the median value of the relevant window. The median of h in S is computed by using Eq. (1).
(1) are pixel co-ordinates, is Multivariate smooth function, Sxy is Neighbourhood of the image, is Processed image.
The median intensity value has been selected for the central pixel after evaluating the brightness values of pixels in the specified region inside the window. This filter does not diminish the brightness distinction among images. Additionally, minor morphological operations were used to smooth the background and normalize brightness variations across the image, ensuring consistent contrast levels. The resultant image is sent into the segmentation process for tumour detection.
While median filtering is a widely used de-noising technique, it is used here purely for noise removal and is not claimed as a novel contribution. The novelty of this work lies in the integration of optimization-assisted segmentation with deep learning for precise tumor classification.
Segmentation
The means of partitioning a single illustration into numerous pieces or sections is known as image segmentation. Segmentation is utilised for rendering an image more comprehensible and simpler to assess. Several image segmentation methods have been proposed (Liu et al., 2019). The Thresholding approach is used in this study to separate the object from the backdrop. Thresholding is the practise of comparing each pixel value in an image to a specific threshold (Ferrari et al., 2012). Binary thresholding and multilevel thresholding are the two types of thresholding procedures. The Binary threshold ignores the image’s unique properties. Because of this, the Binary threshold does not apply to images with multiple channels. To ascertain the optimal threshold value, the multilevel thresholding approach is utilized. A grayscale image is divided into several separate pieces using multilevel thresholding. Numerous thresholds are utilized in this procedure. to partition the target image into distinct intensity zones, each of which corresponds to a different background and different objects. Pixel intensities are commonly employed in segmentation algorithms. Every algorithm necessitates the selection of a threshold value (Venkatesh & Bojja, 2022). An optimal threshold results in better segmentation. In this article, Otsu thresholding is employed to address the segmentation problem by selecting suitable threshold values. An optimization process helps determine the maximum or minimum value of a given function, and in this context, it aids in finding the best thresholds. The performance of PSO is improved through multiple iterations, allowing for more accurate and reliable segmentation results.
Otsu multilevel thresholding technique
Because of its effective segmentation results, the Otsu multilevel thresholding technique has evolved into among the most frequently utilized threshold-based segmentation algorithms. Despite the fact that other threshold approach methods have been proposed in various publications, because of its efficacy and brevity, which maximizes between-class variance (Preity & Jayanthi, 2020). Otsu’s method decreases the intraclass variation of black-and-white pixels by using a threshold. Binarize can be used with the global threshold to transfigure a binary image (Dercle et al., 2020). In the absence of any additional a priori knowledge, simply the gray-level histogram suffices in this procedure (Zhang & Zhou, 2012). Experiments show that this strategy yields the best segmentation results and produces the correct threshold value. The number of pixels with grey values of i is indicated by and is computed using Eq. (2).
(2) where H is the pending image grayscale.
The pixels probability having the gray value of i is given in Eq. (3)
(3)
Assume the threshold has a grey value of n and separates the image into two parts. The pixels in area D0 (background) have values from to and D1 (objects) has to . The Eq. (4) calculates the current probability and average grey value of the D0 region.
(4) The existing probability and gray level average value of D1 region are calculated by using Eq. (5).
(5)
The gray level average value of complete image is calculated by using Eq. (6).
(6)
The variance in between the two areas is calculated by using Eq. (7).
(7)
The ith particle fitness value is calculated by using Eq. (8) indicates that the best threshold of Otsu’s method maximizes the inter-class variance.
(8)
More Effective segmentation outcomes can be obtained with the suggested approach. Furthermore, PSO technique is used to determine the best outcome.
Integrating multilevel thresholding techniques, such as the Otsu method, with PSO enhances the segmentation process of medical images by optimizing the selection of threshold values. The Otsu method, determines the optimal threshold by maximizing inter-class variance as mentioned in the Eq. (8). When combined with PSO, each particle in the swarm represents a candidate set of threshold values for segmenting the image into multiple levels. PSO iteratively adjusts these thresholds by evaluating the fitness of each particle, typically defined by the intra-class and inter-class variance achieved with the proposed thresholds. By leveraging the global search capabilities of PSO, the integration ensures that the optimal threshold values are effectively identified, leading to more accurate and robust segmentation results. This combined approach is particularly beneficial for complex medical images, such as CT scans of pancreatic cancer, where precise segmentation of tumor regions is crucial for accurate diagnosis and treatment planning.
Segmentation using particle swarm optimization
PSO is a randomised optimization strategy driven by the swarm’s movement and reasoning. This makes recourse to an immense quantity of particles (agents) that swarm around exploring every dimension in search of the finest solution. The particles in the swarm investigate for a solution space for geographic dimensions that are closely correlated with the best solution that particle had actually presented called as (personal best). Also, PSO maintains a maximum possible value attained by any neighbouring particle known as or global best. It refers to maximising profits or minimising losses. To achieve optimal results, it is essential to either maximize or minimize a given objective function. Such a function may exhibit multiple local maxima and minima. The PSO algorithm aims to identify the global maximum and minimum values among these possibilities (Wei & Kangling, 2008). In this study, PSO is described as a heuristic optimization technique. The velocity of each particle is adaptively adjusted according to its own previous experience and the collective experience of other particles in the swarm (Divya & Sowjanya, 2015). The velocity and position of each particle are iteratively updated at every data point using Eq. (9), continuing until the swarm converges to an optimal solution.
(9) where is the velocity of the agent or particle, Wi is the weight of inertia, is the cognitive constant, is the social constant, is the location of the agent or particle, is the personal best, is the global best, , are random values, and t is the iterations count. Particles must be relocated to their new locations. Equation (10) is used to calculate the new placements.
(10)
The particle velocity is calculated by using the Eq. (9).
The particle moves with the same velocity and direction due to inertia. Personal influence causes the particle to return to its original position, which is preferable to the current one. Because of social impact, the particle follows the course of its closest neighbours.
If = 1, the particle will continue to move in the same direction since its motion will only be affected by the previous motion. If is lowered, this implies that a particle examines different portions of the search space. In the situation of = = 0, all particles strike with the search space boundary. Particles are independent when > 0 and = 0 and the entire swarm’s particles are drawn to a single location. In the case of = = 0, every particle is dragged to the average of and .
Steps involved in PSO algorithm:
-
(1)
Establish a ‘population’ of individuals (particles) evenly scattered across P.
-
(2)
Consider the objective function from Eq. (8) while assessing the position of each particle.
-
(3)
Whenever a particle’s present positioning is superior than its earlier spot, adjust its position.
-
(4)
Discover the best particle.
-
(5)
Update velocities of Particle or Agent.
-
(6)
Particles should be moved to their new positions.
-
(7)
Until the stopping requirements are met, go on to step 2.
The PSO algorithm involves several steps. The Fig. 2 represents the steps involved in PSO algorithm. CNN classification is utilised based on segmented image to determine if the tumour is benign or malignant. Other image classification methods require more pre-processing than CNN (Venkatesh et al., 2022).
Figure 2: Flowchart of PSO algorithm.
PSO is employed for the segmentation of pancreatic cancer in CT images by optimizing the process of identifying tumor regions within the images. In this context, PSO enhances the accuracy and efficiency of segmentation by leveraging the collective behavior of particles to explore and exploit the solution space. Each particle in the swarm represents a potential solution, such as a set of segmentation parameters or thresholds. The particles iteratively adjust their positions based on their own experience and the experiences of their neighbours, guided by the objective of maximizing segmentation quality as measured by a fitness function. This function typically evaluates the contrast, entropy, or other image features that distinguish tumor tissues from healthy tissues. By converging towards the optimal segmentation parameters, PSO enables more precise delineation of tumor boundaries, thereby facilitating early detection and accurate diagnosis of pancreatic cancer in CT images. In this work, particle Swarm Optimization was configured with 200 iterations, a population size of 100 particles, cognitive weight of 0.8, social weight of 0.8, and an inertial factor of 1.2.
Although deep learning models like U-Net are widely used for segmentation, they require extensive pixel-level annotations, which are limited in public pancreatic cancer datasets. Hence, the PSO-optimized thresholding method is used for segmentation, providing an efficient and interpretable mechanism to delineate tumor regions before applying deep learning for classification.
Classification with convolutional neural network
In this research, the deep learning (DL) approach has been utilized to categorizing traits of pancreatic tissues in CT scans.
DL techniques have lately demonstrated considerable advances in image-based cancer detection and identification in malignancies and cancer research. Deep learning approaches have had a lot of success (Chen et al., 2022a). These classification techniques have shown tremendous potential for processing medical images. As a result, CNN is used by deep learning to detect objects in images (Zhisheng, Qing & Xuehai, 2020).
CNN is primarily employed in feature representation, computer vision features, object identification, and classification (Si et al., 2021). To retrieve and synthesise data from images as well as create a framework that illustrates the intricate relationship involving images and evaluation. Neural networks are constructed on an arrangement of neurons composed of activation mechanisms and characteristics (Liu et al., 2020). Individual neurons in a CNN are laid out differently than neurons in other neural networks, letting them to adapt to overlapped areas of the input image (Oktay et al., 2018). The convolutional layer neurons receive data originating from selected regions of the inputs (Aljaloud et al., 2022). Convolutional networks are transcriptional networks by definition. Their fundamental components (convolution, pooling, and activation functions) only require relative spatial coordinates and operate on a local scale.
As part of the complex network classification challenge, the training data (a labelled network dataset), is constantly learnt using an existing network classification model (Shelhamer, Long & Darrell, 2017). Convolutional neural networks have the capability to produce accurate image recognition results (Xin, Zhang & Shao, 2020; Utama, Faqih & Kusumoputro, 2019). Convolutional neural networks, as opposed to full connection networks, use specific nodes for connectivity rather than the entire network in each layer of neurons.
As appears in Fig. 3, the architecture is made up of three layers such as Convolution, Pooling and Fully Connected layers (Wang et al., 2021). Filter settings for the initial and secondary convolution layers were fixed to [3 × 3], while the filter settings of pooling layers were set to [2 × 2]. The initial convolution to the input could be considered, which 256 × 256 × 3 is. Convolution will be implemented the following time 32 × 32 × 64. Similarly, the pooling layer implementation in the first and second time is 64 × 64 × 32 and 16 × 16 × 128 respectively. The CNN model was trained for 100 epochs using the Adam optimizer with a learning rate of 0.001, batch size of 16, ReLU activation, and categorical cross-entropy loss.
Figure 3: CNN architecture.
Convolution layer: This layer is the cornerstone of the CNN. It handles the vast majority of the network’s computing needs. If there is an input with dimensions , where is the feature map’s height & width, is the number of channels in the feature map, Nout is the number of kernels with a size of , E is the stride, and Ap is the padding. The Eq. (11) can be used to compute the output volume of size Lout X Lout X Nout.
(11)
Pooling layer: Pooling is a kind of non-linear down sampling intended for reducing the data included in a convolutional layer’s output. By generating a cumulative average from other nearby outputs, the pooling layer replaces with the network’s output at defined points. Equation (12) summarises the method of calculus needed in calculating the measurement of the outcome.
(12)
Fully Connected layer: In this layer, virtually each neuron, as well as those above and below it, are totally linked to those in this layer (Luo et al., 2020). The Fully Connected layer maps the correspondence amid the input and the result. During the Normalisation stage Specifically, the response is normalised using a total average function that varies with distance (Almakky, Palade & Ruiz-Garcia, 2019). The neural network’s final output, which offers the prediction score, is integrated using the gradient descent method (Venkatesh et al., 2023; Matsubara et al., 2018).
Initially, the CNN takes raw CT image inputs and applies convolutional layers to detect local features such as edges and textures, which are crucial for distinguishing tumor tissues from healthy tissues. As the data progresses through deeper layers, the network captures more complex patterns and higher-level features specific to pancreatic cancer, such as shape and texture anomalies indicative of tumors. Pooling layers reduce the spatial dimensions, enhancing computational efficiency and allowing the network to focus on the most critical features. Finally, fully connected layers aggregate these features and output a classification decision, typically through a softmax layer that provides probabilities for the presence or absence of pancreatic cancer. By training on a large dataset of labelled images, the CNN learns to accurately identify and classify pancreatic tumors, making it a powerful tool for early diagnosis and treatment planning.
Performance statistics
The performance statistics are utilized to assess the proposed method’s efficacy.
Sensitivity: It is the ability of the test to detect the unrecognized disease. Sensitivity is determined by using the Eq. (13).
(13)
High sensitivity is vital in pancreatic cancer detection to ensure that most cancerous regions are identified, minimizing the risk of missing tumors.
Specificity: It is the proportion of patients who test negative for a particular disease among those who do not have the disease. The Eq. (14) is used to calculate specificity.
(14)
High specificity ensures that healthy regions are not mistakenly classified as cancerous, reducing unnecessary biopsies or treatments.
Accuracy: It is the amount of detail whereby an indicator precisely reflects the real or accepted value. It is determined by using the Eq. (15).
(15) where (True positive) and (True negative) implies the sheer number of precise classifiers. (False positive) and (False negative) implies the sheer number of erroneous classifiers.
Mean square error (MSE): MSE can be described as the square of the difference among the original and resultant images. MSE is calculated using the Eq. (16).
(16)
where, and is the input and out images respectively, is the rows and column.
A lower MSE indicates that the segmentation or reconstruction method closely approximates the original image, which is essential for maintaining the integrity of medical images in pancreatic cancer detection.
Peak signal to noise ratio (PSNR): It is the measure of the peak error. PSNR is determined by using the Eq. (17). It measures the pixel-level accuracy, indicating how well the method preserves original image details.
(17)
where, K is the utmost fluctuation, MSE indicates mean square error.
In pancreatic cancer detection, a higher PSNR indicates better image quality, meaning the segmentation or enhancement techniques preserve the original image details effectively. This is crucial for accurate tumor detection and analysis.
Entropy: It is the measure of randomness in the information being handled. It is calculated by using Eq. (18).
(18) where, p contains the normalized histogram count.
Structure Similarity Index (SSI): This approach is used to forecast an image’s quality. It is calculated by using the Eq. (19). SSI assesses structural and perceptual quality, which is critical in medical imaging.
(19)
where and are sample mean values, and are the variances and is covariance.
Correlation: It is the measurement of statistical significance of a two-variable association.
Results and Discussions
This section illustrates the experimental findings of the suggested methodology. The pancreatic cancer CT scans used in this study were obtained from public databases such as Kaggle and Cancer Imaging Archive (CIA). This work is carried out on nearly 60 images. Figures 4A and 4B show the pancreatic cancer input CT images.
Figure 4: Pancreatic cancer input CT images.
(A) Image i (B) Image ii.The acquired input CT scans contain noise, such as random noise and salt and pepper noise. Figures 5A and 5B illustrate the noisy images of input image-i and input image-ii, respectively.
Figure 5: Noisy output of image-i (A) and image-ii (B).
Noise reduction is critical in the processing of images for subsequent analysis. While removing noise, image details such as edges and object edges must be preserved and kept clear. To eliminate noise from the acquired input images, they are supplied to the pre-processing stage, which improves image quality by reducing noise. The presence of noise is filtered out in this work deploying the median filter. This is a nonlinear filter that preserves visual features by removing blur in the input images. It gets rid of the Salt and Pepper noise. Figures 6A and 6B exhibit the filtered output images of input image-i and input image-ii, respectively.
Figure 6: De-noised output of image-i (A) and image-ii (B).
After getting the pre-processed image, the image is segmented in order to detect tumours in CT images. Initially, the Otsu multilevel thresholding technique is used to divide the pre-processed image into distinct regions based on threshold values. Figures 7A and 7B illustrate the segmented images of input image-i and input image-ii, respectively.
Figure 7: Otsu segmented output of image-i (A) and image-ii (B).
Typically, a grayscale image includes 256 intensity values. Particle swarm optimization is utilised in this work to pick the optimal threshold value among 255 (256-1) threshold values. Figures 8A and 8B illustrate the recognised output image of input image-i and input image-ii, respectively.
Figure 8: Detected output of image-i (A) and image-ii (B).
After getting the segmented image using the Otsu method and PSO, it was subjected to a classification process in which the identified tumour was classed as benign or malignant. Convolution neural network is utilised for classification and feature extraction in this work. Based on the features collected from the tumour portion (or) region (from the detected output image), the CNN classifier determines whether the tumour is benign or malignant. It also informs whether or not the tumour has been found. Figures 9A and 9B illustrate the tumour detection status of input image-i and input image-ii, respectively.
Figure 9: Classifier output of (A) image-i and (B) image-ii.
After all of the features have been recovered, they are sent into the classification process, where a CNN is utilized to classify pancreatic tumors in CT data. It has the ability to learn, save, and connect input and output signals. The neural network starts its activity by modifying the weights associated with all correlations. The network was trained using certain data sets. Figures 10A and 10B displays the neural network training phase and number of validation epochs respectively.
Figure 10: (A) Neural network training phase (B) Validation epochs.
After disease categorization, the results are confirmed by building cross entropy and gradient features. In the validation performance curve and training state, if the cross entropy and gradient values are close to zero, the model is perfectly trained; otherwise, it is not trained well. The ideal line should be a dotted line, which represents that if additional lines are on or near these lines, we can affirm that training has been completed successfully. If any line intersects or passes near the best dotted line, convergence has been achieved. Cross Entropy is utilized in categorization problems. Figure 11 shows the cross entropy and epochs.
Figure 11: Cross-entropy validation performance.
The confusion matrix determines a classification algorithm’s performance. It shows how many correct and wrong predictions the model generated. The diagonal matrix represents the distribution of correct prophesies for each class. Figure 12 illustrates the confusion matrix.
Figure 12: Confusion matrix of the method.
Statistical parameters
After the tumour was identified (or) classified by the CNN classifier, objective analysis was performed by calculating the performance statistics like Specificity, MSE, Sensitivity, PSNR, Entropy, Correlation, Accuracy, Structure similarity index, Dice coefficient, and Jaccard coefficient. Table 1 displays the statistical metrics for image-i and image-ii. Figures 13 and 14 depicts the graphical depiction of all statistical values interms of performance and gray level metrics respectively.
| S. no. | Metric type | Attributes | Image-i | Image-ii |
|---|---|---|---|---|
| 1. | Performance | PSNR | 74.65 | 75.69 |
| 2. | Sensitivity (%) | 96.3174 | 98.5605 | |
| 3. | Specificity (%) | 73.4516 | 75.1622 | |
| 4. | Accuracy (%) | 95.4896 | 95.9218 | |
| 5. | Gray level | MSE | 0.001 | 0.0071 |
| 6. | Entropy | 0.3489 | 0.3378 | |
| 7. | Correlation | 0.7817 | 0.6012 | |
| 8. | Structure similarity index | 0.0076 | 0.0615 | |
| 9. | Dice coefficient | 0.2075 | 0.0337 | |
| 10. | Jaccard coefficient | 0.1158 | 0.0171 |
Figure 13: Graphical representation of performance metrics for image-i and image-ii.
Figure 14: Graphical representation of gray level metrics for image-i and image-ii.
Table 1 clearly shows that the suggested method achieves high accuracy of 95.48% and 95.92% for input images i and ii, respectively. In addition, the proposed technique has a low MSE and a high PSNR. MSE values of 0.001 and 0.0071 are obtained for first and second input images respectively, as are PSNR values of 74.65% and 75.69% for first and second input images respectively.
The dataset comprises approximately 60 high-resolution images, which have been meticulously pre-processed to remove various types of noise such as random noise and salt-and-pepper noise using a median filter. This pre-processing stage ensures the preservation of important image details, which is crucial for accurate tumor detection and analysis. The findings of the study highlight significant improvements over previous methods by combining PSO with CNN. This integration has resulted in a high accuracy of 95.92%, surpassing the performance of traditional methods as shown in Table 2. The novel approach effectively addresses the challenges of distinguishing small lesions, reducing noise artifacts, and achieving precise segmentation and feature extraction, thereby enhancing the diagnostic accuracy and robustness of pancreatic cancer detection models. Figure 15 depicts a graphical depiction of the comparison results. The graphic clearly shows that the proposed method produces great accuracy and is superior to the existing methods.
| S. no. | Authors | Method | Accuracy |
|---|---|---|---|
| 1. | Viriyasaranon et al. (2023) | CNN | 91.00% |
| 2. | GandikotaID, Abirami & Sunil Kumar (2023) | Hierarchical decision structure | 92.00% |
| 3. | Chen et al. (2022b) | PSO with SVM | 72.20% |
| 4. | Agarwal et al. (2022) | PSO | 90.18% |
| 5. | Dhruv, Mittal & Modi (2021a) | CNN with ResNet-101 | 84.00% |
| 6. | Dhruv, Mittal & Modi (2021b) | Ensemble learning with SVM | 86.61%. |
| 7. | Li et al. (2020) | Graph regularised sparse multi-task learning | 91.26% |
| 8. | Proposed method | PSO and CNN | 95.92% |
Figure 15: Graphical representation of comparative results.
The implementation of proposed model for pancreatic cancer detection on CT images poses several challenges primarily like distinguishing small lesions from normal tissue, noise, artifacts, accurate segmentation and feature extraction in the presence of anatomical variations due to the variability in image quality, the complex anatomical structures involved. These problems are rectified in the proposed model by implementing the median filter for noise reduction, robust segmentation method like multilevel thresholding along with PSO tailored to pancreatic anatomy, and deep learning models trained on diverse datasets to improve detection sensitivity and specificity.
The significant constraint of the proposed model is the requirement for larger and more diverse datasets to effectively train and validate the model. Limited availability of annotated data for pancreatic cancer CT scans can lead to overfitting or insufficient generalization of the model across different patient demographics or imaging protocols. Moreover, potential biases in the data, such as variations in image quality or patient populations, may affect the model’s performance and diagnostic accuracy. These constraints are addressed in the proposed method by employing a data augmentation technique like intensity variation to enhance dataset size and diversity.
Conclusion
Pancreatic cancer-related deaths continue to rise due to the lack of reliable early detection techniques. To address this, we proposed a novel automated diagnostic model combining PSO and CNN for effective detection and classification of pancreatic tumors in CT scan images. The model involves a sequence of processing stages: median filtering for noise reduction, PSO-optimized multilevel Otsu thresholding for accurate segmentation, and CNN-based feature extraction and classification to distinguish between benign and malignant tumors. The system achieved a high accuracy of 95.92%, demonstrating its potential effectiveness.
This model offers practical benefits such as improving early-stage diagnosis, minimizing manual interpretation errors, enhancing workflow efficiency, and providing a cost-effective diagnostic aid. However, the study is not without limitations. The small and relatively homogeneous dataset may affect generalizability. Relying solely on CT imaging may result in the loss of valuable diagnostic insights available from other imaging modalities such as MRI or PET. Furthermore, inconsistencies in image quality, scanner configurations, and acquisition conditions can introduce biases that compromise the model’s reliability. The high computational requirements of deep learning models further present challenges for seamless integration into real-time clinical settings and may impact the level of confidence among medical professionals. To enhance clinical applicability, future work will focus on expanding the dataset across multiple institutions, incorporating multimodal imaging, accounting for quality variations, and validating the model through collaboration with clinical experts to ensure robust, real-world performance.
To further improve detection, future research should focus on increasing model accuracy greater than the, integrating with other diagnostic modalities, conducting large-scale validation studies, enhancing real-time processing capabilities, incorporating clinical data, developing user-friendly interfaces, and exploring explainable AI techniques. These advancements can collectively improve patient outcomes and the overall quality of care in pancreatic cancer diagnosis.














