  Conventional Endoscopy (CE) and Wireless Capsule Endoscopy (WCE) are known
tools for diagnosing gastrointestinal (GI) tract disorders. Detecting the
anatomical location of GI tract can help clinicians to determine a more
appropriate treatment plan, can reduce repetitive endoscopy and is important in
drug-delivery. There are few research that address detecting anatomical
location of WCE and CE images using classification, mainly because of
difficulty in collecting data and anotating them. In this study, we present a
few-shot learning method based on distance metric learning which combines
transfer-learning and manifold mixup scheme for localizing endoscopy frames and
can be trained on few samples. The manifold mixup process improves few-shot
learning by increasing the number of training epochs while reducing
overfitting, as well as providing more accurate decision boundaries. A dataset
is collected from 10 different anatomical positions of human GI tract. Two
models were trained using only 78 CE and 27 WCE annotated frames to predict the
location of 25700 and 1825 video frames from CE and WCE, respectively. In
addition, we performed subjective evaluation using nine gastroenterologists to
show the necessaity of having an AI system for localization. Various ablation
studies and interpretations are performed to show the importance of each step,
such effect of transfer-learning approach, and impact of manifold mixup on
performance. The proposed method is also compared with various methods trained
on categorical cross-entropy loss and produced better results which show that
proposed method has potential to be used for endoscopy image classification.
