the retention of a capsule endoscope (ce) in the stomach and the duodenal bulb during the examination is a troublesome problem, which can make the medical staff spend several hours observing whether the ce enters the descending segment of the duodenum (DSD). this paper investigated and evaluated the convolution neural network (cnn) for automatic retention-monitoring of the ce in the stomach or the duodenal bulb. A trained CNN system based on 180,000 CE images of the DSD, stomach, and duodenal bulb was used to assess its recognition of the accuracy by calculating the area under the receiver operating characteristic curve (ROC-AUC), sensitivity and specificity. The AUC for distinguishing the DSD was 0.984. The sensitivity, specificity, positive predictive value, and negative predictive value of the CNN were 97.8%, 96.0%, 96.1% and 97.8%, respectively, at a cut-off value of 0.42 for the probability score. the deviated rate of the time into the DSD marked by the cnn at less than ±8 min was 95.7% (P < 0.01). these results indicate that the cnn for automatic retention-monitoring of the ce in the stomach or the duodenal bulb can be used as an efficient auxiliary measure in the clinical practice.Capsule endoscope (CE) has become one of the best diagnostic tools for diagnosing small intestinal diseases because of its painless and non-invasive nature 1-4 , but it has some weaknesses. One of these is that after the CE is swallowed, its movement in the digestive tract is completely dependent on gastrointestinal motility, especially the gastroduodenal emptying velocity. If the gastroduodenal emptying velocity is too slow, the CE can become stagnated in the stomach or duodenal bulb for several hours, which can cause energy loss of the built-in battery. Thus, examination of the whole small intestine may not be finished. How to predict the residence time of the CE in the stomach or duodenal bulb has not been solved, and medical staff may have to wait for several hours in the examination room to monitor whether the CE enters the descending segment of the duodenum (DSD) 5,6 . If the CE cannot enter the DSD in 2-3 h, some interventions, e.g., drugs or gastroscopy, can be used to push the CE forward into the DSD 7 , which is a tedious and boring task, especially for some patients who have to undergo the CE examination at the same time, which could greatly increase the monitoring workload for the medical staff.Artificial intelligence (AI), as a new technique, has been developed in the recent years, which includes Autoencoder 8 , Deep Belief Network 9 , Convolution Neural Network (CNN) 10 , and Deep Residual Network 11 , and they have been used in the medical image analysis and have been proved to be effective in some medical diagnostic fields, such as pulmonary nodules 12 , breast lesions 13,14 , skin cancer 15 , early gastrointestinal cancers 16,17 , polyps 18 , and small-bowel diseases [19][20][21][22][23] .Of those techniques, the CNN 24 is a type of deep learning mode 25-27 that requires the preprocessing of the image data inputt...