The official Pytorch implementation of NCDD: Nearest Centroid Distance Deficit for Out-Of-Distribution Detection in Gastrointestinal Vision paper available at here.
Landscape of clinical procedures in gastrointestinal vision. Orange: Unassisted, a doctor has to assess all patients’ data tediously and redundantly. Blue: Artificial Intelligence can help in the classification of known or seen diseases but makes misleading assumptions and often overconfident predictions on images when it faces real-world examples consisting of examples that it had never seen. Green: A combination of human intervention and OOD enabled AI method to improve efficacy in the current scenario, where a specialist intervenes to correct any unseen or unknown instances that the AI model is uncertain in classifying.
The code to train the models is available in the directory model_training. For OOD calculation and evaluation the code is available in the directory ood with the implementation of our method and other OOD methods we tested.
git clone https://github.com/bhattarailab/NCDD
cd NCDD
The required packages of the environment we used to conduct experiments are listed in requirements.txt
pip install -r requirements.txt
The two publicly available datasets on which OOD methods are evaluated are Kvasirv2 and Gastrovision.
To run the ood detection, do the following:
For KVASIR dataset:
cd ood
bash demo_kvasir.sh
For Gastrovision dataset:
cd ood
bash demo_gastro.sh