arXiv:2610.06663cs.CVOct 2026

Manuscript Offprint

arXiv:2610.06663

Cross-dataset harmonization for robust endoscopic image analysis

Romil Imtiaz, Dimitris K. Iakovidis

ABSTRACT

A significant problem in endoscopic image analysis is that the machine learning (ML) models used for this purpose usually underperform when applied on images acquired from endoscopes that are different from those used to acquire the images of their training set. The main difference of the images originating from different endoscopes is their color distributions, which depend both on the image sensors and the light sources used. Although previous studies have highlighted this challenge, to the best of our knowledge it has not been previously explicitly tackled. This study focuses on this problem and proposes very simple but impactful method. It implements a reference-based image harmonization that reduces global appearance differences between endoscopic datasets. Specifically, it extracts global color statistics from a chosen reference dataset in the CIE-Lab color space and applies a statistical channel-wise transformation to map each target image toward the appearance of the images of the reference dataset. The method is evaluated in the context of polyp detection in both flexible colonoscopy and capsule endoscopy datasets using a dataset-level cross validation protocol. The results indicate that the proposed harmonization consistently improves cross-dataset performance up to 30.7%, outperforming relevant baseline and state-of-the-art methods. The results indicate that a substantial part of the generalization gap is driven by low-level appearance variation that can be mitigated without retraining.

Index Terms—Image harmonization, color transfer, polyp detection, endoscopy, cross-dataset evaluation

1. INTRODUCTION

Endoscopic image analysis plays an important role in colorectal cancer prevention, where early detection of lesions such as polyps can support timely intervention. Despite strong progress in automated polyp analysis, machine learning models often underperform when applied to images acquired with endoscope systems different from those used for training. A major cause of this degradation is the shift in global appearance, especially color distributions, caused by differences in image sensors and illumination. Clinical evidence shows that even standard enhancement settings of endoscopy systems can alter AI performance consistency, indicating that image acquisition and processing differences can create a domain shift that could result in misinterpretation of the medical images in practice [1]. Cross-dataset performance degradation has also been reported in endoscopy under realistic transfer settings, where models trained on one source fail to generalize reliably to another source acquired under different conditions [2].

Figure

(a)

(b)

(c)

(f)

(d)

(g)

(e)

(h)

(i)

(j)

Fig. 1. (a–e) Representative samples from five different endoscopy datasets. (f–j) The samples after the application of the proposed image harmonization method, using image (a) as a reference image.

This work targets this device-driven appearance shift using a simple, reference-based image harmonization step. Global color statistics are extracted from a chosen reference dataset in the CIE-Lab color space, and each target image is mapped toward the reference appearance using a lightweight channel-wise statistical transformation. While global-statistics color transfer has been investigated years ago in general vision [3], its utility in the context of harmonization of different endoscopic datasets acquired from different devices has not been previously studied. Most relevant previous works have addressed single-image enhancements, such as linear or non-linear color transformations [4], without considering aligning the color distributions of images acquired using different endoscopic devices. The method presented in this paper does not require retraining of a machine learning-based image analysis system to perform well on images acquired by a different endoscope from that used for the system's training. Sample images from a reference set of images acquired with the same device as the system's training set, are used to compute fixed CIE-Lab statistics for a deterministic preprocessing step. The system can then be applied across datasets with different color distributions using the same trained weights and inference settings. An example is provided in Fig. 1, which demonstrates how the proposed method impacts the appearance of images acquired with different endoscopes, after harmonizing them using Fig. 1(a) as a reference.

Therefore, contribution of this paper is primarily a controlled endoscopy-specific preprocessing protocol rather than a training-heavy adaptation framework. To the best of our knowledge there is no other state-of-the-art method explicitly tackling this problem.

The rest of this paper consists of four sections. Section 2 reviews the state-of-the-art works related to this study, and section 3 details the proposed methodology. The experimental framework and the results obtained are presented in section 4, and the conclusions of this study are summarized in section 5.

References (24)