The application discloses a gastroscope in-vivo
residence time detection method based on
deep learning, relates to the technical field of gastroscope detection, and comprises the following steps: acquiring an in-vivo and in-vitro environment two-classification
data set; constructing a two-classification network based on a Vision
Transformer; training the two-classification network based on the Vision
Transformer by using the in-vivo and in-vitro environment two-classification
data set; for a complete gastroscope video
frame sequence to be detected for gastroscope in-vivo
residence time, extracting a frame as a representative frame every certain number of intervals, feeding all the representative frames into the trained two-classification network based on the Vision
Transformer for classification, searching for the last group of in-vivo
frame sequence numbers Id_a from in-vitro to in-vivo and the last group of in-vivo
frame sequence numbers Id_b from in-vivo to in-vitro, and calculating the gastroscope in-vivo
residence time. The application has high
automation processing level, does not need additional manual
processing in the whole process, can greatly reduce
workload and improve
time efficiency, and can avoid missing and misreading caused by careless artificial retrospective observation in the traditional method.