Research Article | | Peer-Reviewed

Detection of Polyps Suspected of Colorectal Cancer in Endoscopy Images of Using a Network Based on Transformer

Received: 13 December 2025     Accepted: 30 December 2025     Published: 28 April 2026
Views:       Downloads:
Abstract

Artificial intelligence (AI) has significantly impacted the healthcare sector, particularly in improving diagnostic and prognostic accuracy in medical imaging. This manuscript illustrates that AI integration can enhance polyp characterization accuracy, matching the proficiency of expert practitioners, and thereby reducing diagnostic errors and unnecessary interventions. By empowering general endoscopists with AI tools, underserved areas can ensure comprehensive patient care irrespective of medical expertise levels. The study focuses on developing an automated method for colon cancer categorization in colonoscopy images, leveraging a dataset from Kerman province and evaluating it against the publicly available ELSIVIER dataset. Employing deep learning techniques, specifically the Trans model, the research aims to detect and classify colonoscopy images into polyp-present and polyp-absent categories. The TransResU-Net architecture combines the strengths of residual networks, transformer blocks, and dilated convolutions, facilitating effective real-time polyp segmentation. Results show the model achieved a 98.90% accuracy on the private dataset, with a recall of 94.18% and an F1 score of 0.9641.

Published in Science Discovery Medicine (Volume 1, Issue 2)
DOI 10.11648/j.sdmed.20260102.16
Page(s) 104-110
Creative Commons

This is an Open Access article, distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution and reproduction in any medium or format, provided the original work is properly cited.

Copyright

Copyright © The Author(s), 2026. Published by Science Publishing Group

Keywords

Colorectal Cancer, Colon Examination, Polyp Identification, Neural Networks, U-Net Model

1. Introduction
The healthcare sector continuously evolves, driven by technological advancements, with artificial intelligence (AI) becoming a key player. AI enhances diagnostic precision, treatment efficacy, and operational productivity. AI-driven diagnostic systems automate analysis of medical data, improving accuracy and efficiency, particularly in medical imaging, enabling better quality assessments . These systems, essential in managing chronic diseases, utilize data from wearable devices to predict disease risks . Machine learning, a subset of AI, enables systems to learn from data and recognize patterns, effectively performing tasks like anomaly detection and image recognition with minimal human input . Specifically, machine learning and deep learning algorithms are crucial in analyzing CT and MRI scans, classifying findings to reduce unnecessary biopsies . While AI shows promise in transforming healthcare outcomes and patient engagement, challenges remain regarding data needs, algorithm accuracy, interpretability, and ethical considerations. Furthermore, colorectal cancer's mortality rate is projected to increase significantly by 2030, highlighting the urgent need for improved diagnostics and treatments .
The main way to prevent CRC is to modify lifestyle, and the next best way is regular colon screening. Various diagnostic and prognostic methods for CRC screening include endoscopy, colonoscopy, blood tests, and stool tests . Colonoscopy is considered the gold standard screening test for early detection and prevention of CRC-related cancer and mortality, and is the most widely used and effective invasive examination used to detect changes and search for and eliminate precancerous abnormalities in the large intestine (colon) and rectum. . Artificial intelligence (AI) technologies can speed up medical image analysis and help in the automatic diagnosis of colorectal cancer in its early stages, and can act as a complement and increase the survival rate of patients with cancer by up to 95% if diagnosed in the first 5 years of the disease, and have achieved promising results and help reduce skill gaps among doctors and consequently reduce the number of lesions missed during colonoscopy . Therefore, the use of computer-aided systems for polyp detection is essential. In this study, we aim to introduce a computer-aided polyp detection system that will help to overcome the above problems. Deep learning is a major driver of the increasing use of artificial intelligence in a wide range of applications, including medical image analysis . Deep learning approaches typically use a convolutional neural network (CNN) to extract relevant features. It is therefore essential that automated polyp detection has the highest possible sensitivity and accuracy to detect the most cases and avoid unnecessary treatment. Since artificial intelligence (AI)-based intelligent computer systems have been validated and widely used in medical imaging. A machine can act cognitively like humans, analyze, learn, and understand data, and AI-based models have the potential to help doctors diagnose, make predictions, and find accurate outcomes for treating patients . In general, the goal of these studies can be described as follows: to provide an algorithm for polyp detection and classification, which can be divided into two main parts: First, in the manual database collection process, there is a lot of noise in each image, which deep learning algorithms struggle with in trying to classify and detect polyps . When capturing images, the colonoscope lens rotates inside the intestinal tract to capture images of polyps from different angles. This rotational motion often leads to motion blur and reflection problems. This complicates the detection task by obscuring the boundaries of polyps . First, our goal is to remove noise and artifacts from each image and create a suitable image to feed the introduced algorithm. Second, we compare and verify the performance of the introduced algorithm using public ELSIVIER data and private data collected from patients.
Figure 1. Distribution of new cases of the ten most common cancers in men and women worldwide .
Figure 2. Different stages of bowel cancer .
Intestinal polyps, particularly those located in the colon, are identified through a range of diagnostic techniques aimed at detecting these growths within the large intestine . The selection of a specific diagnostic approach is often influenced by the patient's presenting symptoms, medical history, and the clinician's assessment . The primary methods employed for the diagnosis of intestinal polyps include colonoscopy, stool analysis, blood tests, and imaging modalities such as virtual colonoscopy (CT colonography), capsule endoscopy, flexible sigmoidoscopy, and conventional CT scans. Computer-aided detection (CAD) systems aim to assist endoscopists by improving real-time detection, identification, and pathology prediction of colorectal polyps.
CAD systems primarily utilize deep learning models, especially convolutional neural networks (CNNs), trained on large colonoscopy image datasets to recognize polyp-related patterns.
2. Materials and Method
Figure 3. An example of a private data set collected.
Intestinal polyps, particularly those located in the colon, are identified through a range of diagnostic techniques aimed at detecting these growths within the large intestine. The selection of a specific diagnostic approach is often influenced by the patient's presenting symptoms, medical history, and the clinician's assessment. The primary methods employed for the diagnosis of intestinal polyps include colonoscopy, stool analysis, blood tests, and imaging modalities such as virtual colonoscopy (CT colonography), capsule endoscopy, flexible sigmoidoscopy, and conventional CT scans.
Current research highlights several prevalent challenges encountered by investigators in the development of algorithms for the detection of colorectal polyps utilizing colonoscopy images. The construction of a colorectal polyp detection model that operates on colonoscopy-derived media presents numerous obstacles, which can be categorized into intrinsic and extrinsic issues. Intrinsic challenges pertain specifically to the detection model itself, such as the requirement for substantial computational resources to maximize polyp detection and the risk of overfitting due to data asymmetry. Conversely, extrinsic challenges encompass external factors, including inadequate bowel preparation and reflections from the light source used during colonoscopy, which may hinder the model's performance. Computer-aided detection (CAD) systems are designed to support endoscopists with the objective of enhancing the real-time detection, identification, and prediction of polyp pathology, thereby minimizing the risk of overlooking or misdiagnosing colorectal lesions. These systems leverage deep learning models, particularly convolutional neural networks, which are trained on extensive datasets of colonoscopy images to identify patterns associated with polyps. The potential of these systems to improve diagnostic accuracy and efficiency has garnered significant attention in the field.
The data was screened by specialist physician Dr. Nadia Bani Asad and her medical team at the Park Clinic private clinic, and images containing artifacts, blur, severe bleeding from the biopsy, bubbles in the intestine, and strong light reflection were reviewed and removed from the dataset.
Figure 4. An example of missing and deleted samples from the dataset.
The RGB function in image processing plays a crucial role in the adjustment of color balance and the correction of image coloration. By manipulating the individual red, green, and blue channels, one can significantly enhance the overall visual quality of an image. This function facilitates precise control over the color attributes of an image, enabling adjustments in image channels and color correction, which contribute to a more natural and aesthetically pleasing appearance. A notable aspect of the RGB function is its capacity to achieve color balance, enhance visual appeal, and improve detail. Furthermore, preprocessing techniques that address issues such as contrast, noise, and sharpness allow clinicians to visualize and interpret images with greater efficacy. This enhancement not only leads to improved diagnostic outcomes but also promotes more efficient and cost-effective healthcare delivery.
The highlights of this model are that TransResU-Net uses a combination of binary cross-entropy loss and dice loss for polyp segmentation in colonoscopy. Binary cross-entropy loss improves classification accuracy, while dice loss enhances segmentation quality, especially for unbalanced datasets. This dual approach optimizes both prediction accuracy and mask overlap, addressing a common challenge in medical image segmentation. The goal is to improve real-time polyp detection performance in colonoscopy images. It is worth noting that all models are trained with a set of meta-parameters, including loss functions, which highlight its effectiveness in segmentation and automatic polyp detection tasks.
3. Result and Discussion
Figure 5. Training and evaluating the F1 score of the model on private data.
The highlights of this model are that TransResU-Net uses a combination of binary cross-entropy loss and dice loss for polyp segmentation in colonoscopy. Binary cross-entropy loss improves classification accuracy, while dice loss enhances segmentation quality, especially for unbalanced datasets. This dual approach optimizes both prediction accuracy and mask overlap, addressing a common challenge in medical image segmentation. The goal is to improve real-time polyp detection performance in colonoscopy images. It is worth noting that all models are trained with a set of meta-parameters, including loss functions, which highlight its effectiveness in segmentation and automatic polyp detection tasks. Avoiding overfitting and underfitting: Evaluation helps identify overfitting (when the model performs well on the training data but poorly on new data) and underfitting (when the model fails to capture the underlying structure of the data). A well-evaluated model strikes a balance between these extremes. After training, we evaluated the model on a test dataset to examine its performance metrics.
Figure 6. Sample predicted images of the model.
The evaluation of results is divided into two parts: the U-NET model's performance on the ELSIVIER database and the proposed model's evaluation on personal data. The U-NET model is preferred for polyp segmentation due to its superior performance. The effectiveness of the TransResU-Net architecture is quantitatively and qualitatively assessed across three databases, yielding an accuracy of 0.9890. The model's training indicates rapid convergence in accuracy and error, showcasing its strong segmentation ability for polyp images. Testing utilized a private dataset for colon cancer classification, complemented by Kvasir-SEG and BKAI-IGH datasets, ensuring diverse image representation. Data was split into 80% training, 10% validation, and 10% testing, with training spanning 200 epochs and implementing early stopping to mitigate overfitting. The Adam optimizer, with a learning rate of 1e-4 and batch size of 16, was employed, along with a combined loss function of binary cross-entropy and dice loss to enhance model accuracy and segmentation quality.
4. Conclusion
Convolutional neural networks (CNNs) demonstrate a capacity for processing extensive datasets in a manner akin to human cognitive functions, thereby facilitating the advancement of advanced pattern recognition technologies that assist endoscopists in the real-time identification of pathologies. This thesis investigates a colon polyp detection methodology utilizing two distinct polyp datasets—one publicly available and the other privately collected—both of which are of sufficient size for analysis. The primary objective of this research is to evaluate the efficacy of the proposed method in detecting early indicators of colorectal cancer (CRC) with high accuracy and real-time processing capabilities, leveraging a novel real-world database. Additionally, the study aims to provide specialists with a reliable assessment of colon tissue and to minimize the adenoma detection rate (ADR) errors within the privately collected dataset.
The methodology outlined in this thesis is divided into three components. Initially, a private database was compiled, and the images were processed using various preprocessing techniques to prepare them for model training. This model comprises an encoder and decoder, each consisting of four blocks, with a pre-trained ResNet50 serving as the encoder and four corresponding decoder blocks. The input images are processed through the pre-trained encoder. The results indicate that the proposed approach exhibited superior performance in the segmentation and detection of intestinal polyps within the privately collected database compared to the other two datasets. Evaluation metrics, including accuracy (AC), false negative rate (FNR), false positive rate (FPR), and overall accuracy, demonstrated that the proposed method achieved commendable performance across these criteria.
Abbreviations

CNN

Convolutional Neural Networks

Conflicts of Interest
The authors declares no conflicts of interest.
References
[1] Palanisamy V, Thirunavukarasu R (2019) Implications of big data analytics in developing healthcare frameworks—a review. J King Saud Univ-Comput Inf Sci 31(4): 415–425.
[2] Spring M, Faulconbridge J, Sarwar A (2022) How information technology automates and augments processes: insights from Artificial-Intelligence-based systems in professional service operations. JOper Manag 68(6–7): 592–618.
[3] Castiglioni I, Rundo L, Codari M, Leo GD, Salvatore C, Interlenghi M, Gallivanone F, Cozzi A, Claudia D’amico N, Sardanelli F (2021) AI applications to medical images: from machine learning to deeplearning. Physica Medica 83: 1120–1797.
[4] Messina P, Pino P, Parra D, Soto A, Besa C, Uribe S, Andía M, Tejos C, Prieto C, Capurro D (2022) A survey on deep learning and explainability for automatic report generation from medical images. ACM Comput Surv 54(10s): 1–40.
[5] Iqbal MJ, Javed Z, Sadia H, Qureshi IA, Irshad A, Ahmed R, Malik K, Raza S, Abbas A, Pezzani R, Sharifi-Rad J (2021) Clinical applications of artificial intelligence and machine learning in cancer diagnosis: looking into the future. Cancer Cell Int.
[6] Fernando T, Gammulle H, Denman S, Sridharan S, Fookes C (2022) Deep Learning for medical anomaly detection—a survey. ACM Comput Surv 54(7): 1–37.
[7] A. Shrestha and A. Mahmood, “Review of deep learning algorithms and architectures,” IEEE Access, vol. 7, pp. 53040– 53065, 2019,
[8] Hashimoto R, Requa J, Dao T, et al. Artificial intelligence using convolutional neural networks for real-time detection of early esophageal neoplasia in Barrett’s esophagus (with video). Gastrointest Endosc 2020; 91(6): 1264-1271.e1.
[9] Byrne MF, Chapados N, Soudan F, et al. Real-time differentiation of adeno- matous and hyperplastic diminutive colorectal polyps during analysis of unaltered videos of standard colonoscopy using a deep learning model. Gut 2019; 68(1): 94–100.
[10] Pecere S, Milluzzo SM, Esposito G, Dilaghi E, Telese A, Eusebi LH. Applications of artificial intelligence for the diagnosis of gastrointestinal diseases. Diagnos-tics (Basel) 2021 Aug 30; 11(9): 1575.
[11] Eloranta S, Smedby KE, Dickman PW, Andersson TM (2021) Cancer survival statistics for patients and healthcare professionals—a tutorial of real-world data analysis. J Intern Med 289(1): 12–28.
[12] Key Statistics for Colorectal Cancer. 2021. Available:
[13] Rebecca L. Siegel MPH | Kimberly D. Miller MPH | Nikita Sandeep Wagle MBBS, MHA, PhD | Ahmedin Jemal DVM, PhD Cancer statistics, 2023.
[14] MBiostat NB, Wong GY, Molloy C, Dieng M, Kelly PJ, Hugh TJ (2022) Lifetime direct healthcare costs of treating colorectal cancer: a systematic review. Eur J Health Econ.
[15] J. Ribeiro, S. Nóbrega, and A. Cunha, “Polyps Detection in Colonoscopies,” Procedia Comput. Sci., vol. 196, pp. 477–484, 2021,
[16] Grosu, Sergio, Philipp Wesp, Anno Graser, Stefan Maurus, Christian Schulz, Thomas Knosel, Clemens C. Cyran, Jens Ricke, Michael In- ¨ grisch, and Philipp M. Kazmierczak. ”Machine Learning–based Differentiation of Benign and Premalignant Colorectal Polyps Detected with CT Colonography in an Asymptomatic Screening Population: A Proofof-Concept Study.” Radiology 299, no. 2 (2021): 326-335.
[17] Kahi, C. J. Reviewing the Evidence that Polypectomy Prevents Cancer. Gastrointest. Endosc. Clin. N. Am. 2019, 29, 577–585.
[18] Rahim T, Hassan SA, Shin SY (2021) A deep convolutional neural network for the detection of polyps in colonoscopy images. Biomed Signal Process Control 68: 102654.
[19] Yu C, Helwig EJ (2022) The role of AI technology in prediction, diagnosis and treatment of colorectal cancer. Artif Intell Rev 55(1): 323–343.
[20] G. Gopakumar, “A Review on Polyp Detection and Segmentation in Colonoscopy Images using Deep Learning,” vol. 9, no. 10, pp. 329–335, 2020.
[21] Kaidong, Mohammad I. Fathan, Krushi Patel, Tianxiao Zhang, Cuncong Zhong, Ajay Bansal, Amit Rastogi, Jean S. Wang, and Guanghui Wang. ”Colonoscopy Polyp Detection and Classification: Dataset Creation and Comparative Evaluations.” arXiv preprint arXiv: 2104.10824 (2021).
[22] Keum, N.; Giovannucci, E. Global burden of colorectal cancer: Emerging trends, risk factors and prevention strategies. Nat. Rev. Gastroenterol. Hepatol. 2019, 16, 713–732.
Cite This Article
  • APA Style

    Abdoli, N., Araghi, K., Sangnoghreh, M., Mohammadi, H., Yousefi, S., et al. (2026). Detection of Polyps Suspected of Colorectal Cancer in Endoscopy Images of Using a Network Based on Transformer. Science Discovery Medicine, 1(2), 104-110. https://doi.org/10.11648/j.sdmed.20260102.16

    Copy | Download

    ACS Style

    Abdoli, N.; Araghi, K.; Sangnoghreh, M.; Mohammadi, H.; Yousefi, S., et al. Detection of Polyps Suspected of Colorectal Cancer in Endoscopy Images of Using a Network Based on Transformer. Sci. Discov. Med. 2026, 1(2), 104-110. doi: 10.11648/j.sdmed.20260102.16

    Copy | Download

    AMA Style

    Abdoli N, Araghi K, Sangnoghreh M, Mohammadi H, Yousefi S, et al. Detection of Polyps Suspected of Colorectal Cancer in Endoscopy Images of Using a Network Based on Transformer. Sci Discov Med. 2026;1(2):104-110. doi: 10.11648/j.sdmed.20260102.16

    Copy | Download

  • @article{10.11648/j.sdmed.20260102.16,
      author = {Najmeh Abdoli and Kimiya Araghi and Mobina Sangnoghreh and Hossein Mohammadi and Sareh Yousefi and Farnaz Hesamifar},
      title = {Detection of Polyps Suspected of Colorectal Cancer in Endoscopy Images of Using a Network Based on Transformer},
      journal = {Science Discovery Medicine},
      volume = {1},
      number = {2},
      pages = {104-110},
      doi = {10.11648/j.sdmed.20260102.16},
      url = {https://doi.org/10.11648/j.sdmed.20260102.16},
      eprint = {https://article.sciencepublishinggroup.com/pdf/10.11648.j.sdmed.20260102.16},
      abstract = {Artificial intelligence (AI) has significantly impacted the healthcare sector, particularly in improving diagnostic and prognostic accuracy in medical imaging. This manuscript illustrates that AI integration can enhance polyp characterization accuracy, matching the proficiency of expert practitioners, and thereby reducing diagnostic errors and unnecessary interventions. By empowering general endoscopists with AI tools, underserved areas can ensure comprehensive patient care irrespective of medical expertise levels. The study focuses on developing an automated method for colon cancer categorization in colonoscopy images, leveraging a dataset from Kerman province and evaluating it against the publicly available ELSIVIER dataset. Employing deep learning techniques, specifically the Trans model, the research aims to detect and classify colonoscopy images into polyp-present and polyp-absent categories. The TransResU-Net architecture combines the strengths of residual networks, transformer blocks, and dilated convolutions, facilitating effective real-time polyp segmentation. Results show the model achieved a 98.90% accuracy on the private dataset, with a recall of 94.18% and an F1 score of 0.9641.},
     year = {2026}
    }
    

    Copy | Download

  • TY  - JOUR
    T1  - Detection of Polyps Suspected of Colorectal Cancer in Endoscopy Images of Using a Network Based on Transformer
    AU  - Najmeh Abdoli
    AU  - Kimiya Araghi
    AU  - Mobina Sangnoghreh
    AU  - Hossein Mohammadi
    AU  - Sareh Yousefi
    AU  - Farnaz Hesamifar
    Y1  - 2026/04/28
    PY  - 2026
    N1  - https://doi.org/10.11648/j.sdmed.20260102.16
    DO  - 10.11648/j.sdmed.20260102.16
    T2  - Science Discovery Medicine
    JF  - Science Discovery Medicine
    JO  - Science Discovery Medicine
    SP  - 104
    EP  - 110
    PB  - Science Publishing Group
    UR  - https://doi.org/10.11648/j.sdmed.20260102.16
    AB  - Artificial intelligence (AI) has significantly impacted the healthcare sector, particularly in improving diagnostic and prognostic accuracy in medical imaging. This manuscript illustrates that AI integration can enhance polyp characterization accuracy, matching the proficiency of expert practitioners, and thereby reducing diagnostic errors and unnecessary interventions. By empowering general endoscopists with AI tools, underserved areas can ensure comprehensive patient care irrespective of medical expertise levels. The study focuses on developing an automated method for colon cancer categorization in colonoscopy images, leveraging a dataset from Kerman province and evaluating it against the publicly available ELSIVIER dataset. Employing deep learning techniques, specifically the Trans model, the research aims to detect and classify colonoscopy images into polyp-present and polyp-absent categories. The TransResU-Net architecture combines the strengths of residual networks, transformer blocks, and dilated convolutions, facilitating effective real-time polyp segmentation. Results show the model achieved a 98.90% accuracy on the private dataset, with a recall of 94.18% and an F1 score of 0.9641.
    VL  - 1
    IS  - 2
    ER  - 

    Copy | Download

Author Information