Manuscript Offprint

arXiv:2609.02476

UnCapsTSR: An Unsupervised Transformer-based Image Super-Resolution Approach for Capsule Endoscopy Images

Anjali Sarvaiya, Shubh Kawa, Lalit Agrawal, Jagrit Joshi, Kishor Upla, Kiran Raja

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Wireless Capsule Endoscopy (WCE) captures and streams video while passing through patient's Gastrointestinal (GI) tract which is then used to examine its irregularities. While this technology is advantageous over conventional endoscopy, WCE suffers from capsule's size and wireless transmission that result in images with coarser resolution. Improving the resolution of WCE images in off-line mode (i.e., Super-Resolution (SR)) can help expert physicians to visualize details and help in diagnosis. This work presents a new approach referred as UnCapsTSR to improve the spatial resolution of Low-Resolution (LR) WCE images making use of unsupervised training in transformer-based Generative Adversarial Network (GAN) framework. The novel design of the proposed method accomplishes the SR task without the explicit use of degradation estimation of real-world LR data and eliminates the need for true LR-HR pair. UnCapsTSR employs a new Bilateral Total Variation (BTV) loss to ensure the spatial continuity in the SR images. By combining this loss with other GAN losses, the perceptual and quantitative qualities of the SR results is ensured. In addition, a newly curated dataset from Kvasir capsule set is also presented in this work which is used to train the SR models of WCE images. Consequently, the generalizability of the proposed method is validated by conducting numerous experiments on different WCE datasets i.e., KID and GIANA datasets whose samples are not present in the training process. A new non-reference metric called Endoscopy Quality Metric (EndoQM) is also presented to ensure the quantitative performance of SR results of domain specific WCE data. The experimental analysis demonstrates the consistent improvement over the other state-of-the-art unsupervised SR approaches, both in terms of qualitative and quantitative evaluations on different no-reference quality measures such as NIQE, BRISQUE and PIQE in addition to EndoQM. Along with statistical evaluation the UnCapsTSR gains 40 to 80 % significant quantitative improvement in terms of EndoQM from LR to SR for all above datasets. Code link:https://github.com/KawaShubh/UnCapsTSR/tree/main

Keywords: Wireless Capsule Endoscopy, Super Resolution, Transformer, Unsupervised, Kvasir capsule dataset

1. Introduction

Computerized Tomography (CT), Positron Emission Tomography (PET), Magnetic Resonance Imaging (MRI), ultrasound imaging, endoscopy ad alike imaging approaches provide visual representation of interior parts of human body that are essential for clinical & medical analysis and intervention. Wireless Capsule Endoscopy (WCE) is one such imaging approach

Figure

Figure 1: The illustration of SR performance of the proposed method (i.e., UnCapsTSR) on WCE LR image in comparison to other state-of-the-art methods. The values of newly proposed EndoQM measure is also indicated alongside of each SR result in the bracket.

that is used to examine Gastrointestinal (GI) abnormalities. This technology is comparatively painless compared to the conventional endoscope based examinations which is often painful and stressful (Karargyris and Bourbakis, 2010). It makes use of a pill size imaging device typically in length and diameter of 26 mm and 11 mm, respectively equipped with an optical dome, illuminator, imaging sensor, battery, and RF transmitter that can be easily ingested by patients and help in diagnosis of GI tract abnormalities (Iddan et al., 2000). Due to the limited size of hardware with limited battery and low field of view of CMOS camera, WCE often hinders acquiring High-Resolution (HR) images/videos. While HR images are invariably preferred in all vision-driven applications, LR images are obtained in WCE with limited high-frequency details making diagnosis challenging (Karargyris and Bourbakis, 2010). Additionally, given the limited battery size of pill camera, WCE captures images with coarser resolution with compression. The motion of pill camera also results in images subjected to different artifacts such as motion blur, bubbles, specular reflections, floating objects and pixel saturation which need to be fixed by post-procedural corrections to avoid performance deviation in diagnosis (Swain, 2003). While one can enhance resolution by increasing the size of the optics and sensor array, it is not always an easy solution due to reasonable cost and pill size considerations. To circumvent the aforementioned limitations in other applications, software-driven techniques referred as Super-Resolution (SR) is used for the reconstruction of missing details in the LR observations by posing it as an inverse problem (Wang et al., 2015). Thus, the Medical SR (MedSR) is used to improve visual appearance of anatomical structures to help precise and reliable medical diagnosis.

Several SR techniques have been proposed for traditional RGB images (Chang et al., 2004;

Smith, 1981; Nuño-Maganda and Arias-Estrada, 2005; Dong et al., 2014; Kim et al., 2016; Zhang et al., 2018). Early methods using CNNs (e.g., SRCNN (Dong et al., 2014)) have been improved with Transformer-based methods (e.g., TTSR (Yang et al., 2020)) that leverage self-attention mechanisms to model long-range dependencies more effectively. Unlike CNNs, which are biased toward local spatial structures, Transformers excel in capturing global context, making them particularly useful for medical imaging. Their scalability, robustness to corruption, and ability to handle large datasets have driven significant interest in Transformer-based models for medical imaging applications.

Despite significant progress in SR algorithms, their application to WCE images remains relatively underexplored. Further, traditional SR approaches for regular RGB images employ supervised training, where models learn to upscale LR images by leveraging paired LR and HR images. The availability of HR endoscopy images is limited, and acquiring well-aligned LR-HR image pairs in the medical domain is particularly challenging. In some cases, synthetic generation of these LR-HR pairs is considered, but this approach is only feasible when the image acquisition process is meticulously controlled and well-defined. Typically, only an approximate understanding of the acquisition process is available, and LR images are often simulated using known downsampling techniques, such as bicubic downsampling. Consequently, supervised SR models are trained on these synthetic LR-HR pairs, where the LR images do not correspond to true camera-captured observations. As a result, such models tend to learn the degradation patterns of simulated LR samples, limiting their ability to generalize to real-world, clinically obtained LR images. The challenge is further exacerbated in medical imaging, where generating true LR-HR pairs by manipulating camera settings is impractical and often infeasible. For these reasons, we propose a deep learning architecture that is trained in an unsupervised manner, eliminating the need for precisely aligned LR-HR image pairs. This unsupervised training approach allows the model to learn directly from the available data without relying on synthetic pairings, thus improving its generalization performance when applied to real-world WCE images. Further, to gain deeper insights into the distributional disparities among different modalities such as natural, conventional endoscopy and WCE images we employ t-distributed Stochastic Neighbor Embedding (t-SNE) visualization to examine their feature space in Fig. 1(a) and Kernel Density Estimation (KDE) plots of WCE images and natural images to investigate the pixel intensity distributions in Fig. 1(b) in supplementary material.

This work proposes UnCapsTSR, an unsupervised approach for image super-resolution of WCE images using Transformer without explicit need for true LR-HR pair as it is impossible to obtain such data in WCE. The proposed SR model i.e., UnCapsTSR employs a Generative Adversarial Network (GAN) architecture with a transformer-based generator and dual discriminators. Unlike traditional GAN based SR approaches, the proposed model leverages the power of transformers to capture global and local dependencies effectively, while the dual-discriminator framework ensures enhanced reconstruction quality and realism. The incorporated Bilateral Total Variation (BTV) loss preserves spatial continuity while penalizing inconsistencies. It smoothens SR image across multiple spatially shifted pixel neighborhoods and hence, effectively reduces artifacts enhancing texture fidelity leading to improved perceptual quality in the reconstructed SR images. A sample of SR performance obtained using the proposed method (i.e., UnCapsTSR) is highlighted in Fig. 1 in comparison to other state-of-the-art methods on an LR image of Kvasir dataset along EndoQM score for each SR image. While eliminating the need for explicit LR-HR pair in a true sense of unsupervised setting, this work results in following key contributions:

  • Unsupervised training: Unlike the supervised SR methods exhibiting ineffective generaliz-

ability to the real WCE samples, the proposed model i.e., UnCapsTSR employs transformer-based GAN architecture for SR of WCE images for upscaling factor ×4 which is trained in unsupervised manner, addressing the unavailability of paired LR-HR clinical datasets.

  • Transformer-based architecture design: In UnCapsTSR, a novel GAN architecture with a transformer-based generator and a dual-discriminator framework enhances SR for WCE images without explicit degradation estimation. The generator employs self-attention to capture global and local dependencies, while the dual discriminators refine perceptual quality. One discriminator focuses on high-frequency details like edges and textures, preserving diagnostically critical features, while the other ensures structural and perceptual consistency. This balanced approach improves both local and global quality, producing SR outputs that are visually coherent and clinically reliable for endoscopic imaging.

  • New BTV Loss: Further, a Bilateral Total Variation (BTV) loss is proposed, integrated with adversarial and texture losses to preserve spatial continuity while improving perceptual quality in SR images. Unlike conventional Total Variation (TV) loss, this loss ensures the spatial smoothness balanced with the retention of edge sharpness, which is critical for maintaining significant details in medical imaging. Thus, by combining BTV loss with adversarial and texture losses, is particularly beneficial in medical applications, where preserving the continuity of anatomical structures alongside detailed textures is essential for accurate diagnosis. Hence, the proposed BTV loss guarantees that the SR outputs not only achieve high visual fidelity but also comply with the rigorous clinical standards.

  • New non-reference metric: A reference-less metric Endoscopy Quality Metric (EndoQM) is proposed to gauge the SR performance of the different methods on WCE images. This metric is exclusively trained on conventional endoscopic images to assess the preservation and enhancement of edge details essential for diagnostic accuracy in SR images. Unlike other non-reference metrics such as BRISQUE, NIQE, and PIQE, which primarily assess the perceptual quality or statistical characteristics of natural images, this new metric is designed to address the unique medical imaging requirements. Thus, by prioritizing edge preservation, this metric reflects the ability of SR methods to reconstruct fine-grained details such as mucosal patterns, vascular structures, and lesions, which are essential for reliable clinical assessments in WCE images.

  • New SR Dataset: An another significant contribution through this work is the creation of a new derivative dataset specifically designed for SR task. It is curated from the publicly available Kvasir Capsule Endoscopy Dataset (Smedsrud et al., 2021). However, the original dataset is not directly suitable for SR tasks due to the presence of redundant and low-quality images, as well as unwanted border pixels that do not contribute meaningful information for training. The original Kvasir dataset is therefore curated through a meticulous pre-processing pipeline. Redundant and non-informative images were identified and removed. Additionally, unwanted border pixels were manually cropped out to improve the overall quality and relevance of the dataset for SR model training. Thus, this newly created derivative dataset provides a unique and valuable resource for advancing SR research in the medical domain, particularly for WCE images and its improved quality and relevance make it well-suited for training and evaluating SR models.

  • Generalizability: Finally, the proposed model i.e., UnCapsTSR is trained on the newly derived Kvasir dataset for SR task, and for fair comparison with other state-of-the-art SR meth-

ods, we have trained all those methods on the above dataset. Further, to show the generalizability of the proposed method, all SR methods extensively evaluated on other datasets which are not part of training i.e., KID (Koulaouzidis et al., 2017) and GIANA (Bernal and Aymeric, 2017) datasets. It is evident from those experiments that, for real LR samples, the proposed SR method performs better both perceptually and quantitatively than the other SR methods in terms of numerous non-reference metrics, including BRISQUE, NIQE, PIQE, and EndoQM.

References (49)