NCDD: Nearest Centroid Distance Deficit for Out-Of-Distribution Detection in Gastrointestinal Vision

Sandesh Pokhrel, Sanjay Bhandari, Sharib Ali, Tryphon Lambrou, Anh Nguyen +5 more
12/2/2024
cs.CVcs.AI

Official code: bhattarailab/NCDD (8 stars, Apache-2.0, last commit 2025-07-17).

Abstract

The integration of deep learning tools in gastrointestinal vision holds the potential for significant advancements in diagnosis, treatment, and overall patient care. A major challenge, however, is these tools' tendency to make overconfident predictions, even when encountering unseen or newly emerging disease patterns, undermining their reliability. We address this critical issue of reliability by framing it as an out-of-distribution (OOD) detection problem, where previously unseen and emerging diseases are identified as OOD examples. However, gastrointestinal images pose a unique challenge due to the overlapping feature representations between in- Distribution (ID) and OOD examples. Existing approaches often overlook this characteristic, as they are primarily developed for natural image datasets, where feature distinctions are more apparent. Despite the overlap, we hypothesize that the features of an in-distribution example will cluster closer to the centroids of their ground truth class, resulting in a shorter distance to the nearest centroid. In contrast, OOD examples maintain an equal distance from all class centroids. Based on this observation, we propose a novel nearest-centroid distance deficit (NCCD) score in the feature space for gastrointestinal OOD detection. Evaluations across multiple deep learning architectures and two publicly available benchmarks, Kvasir2 and Gastrovision, demonstrate the effectiveness of our approach compared to several state-of-the-art methods. The code and implementation details are publicly available at: https://github.com/bhattarailab/NCDD

View on arXivView PDF

Code Implementations(1)

bhattarailab/NCDDOfficial100%
Apache-2.0

The official implementation of NCDD: Nearest Centroid Distance Deficit for Out-Of-Distribution Detection in Gastrointestional Vision

80Shell, PythonDec 2, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{pokhrel2024ncdd,
  title  = {NCDD: Nearest Centroid Distance Deficit for Out-Of-Distribution Detection in Gastrointestinal Vision},
  author = {Sandesh Pokhrel and Sanjay Bhandari and Sharib Ali and Tryphon Lambrou and Anh Nguyen and Yash Raj Shrestha and Angus Watson and Danail Stoyanov and Prashnna Gyawali and Binod Bhattarai},
  year   = {2024},
  eprint = {2412.01590},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.01590v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.01590.svg)](https://codeofpaper.com/paper/2412.01590)

Discussion