This invention belongs to the interdisciplinary field of medical devices and
artificial intelligence, and discloses a method and
system for measuring the size of intestinal polyps based on
monocular depth vision. The method includes: preprocessing endoscopic keyframe images; sequentially generating a
depth map using a
monocular depth
estimation model; locating the polyp using a target detection model; and generating a pixel-level segmentation
mask using an instance segmentation model. Next, the polyp body and
tail are separated based on the distance distribution analysis from the contour points to the
centroid, and the pixel
diameter is obtained by geometric fitting of the
body contour. Then, edge depth values are sampled in the target's internal region using a contour inward
contraction method based on distance transformation. Finally, the edge depth and pixel
diameter are used as features input to a pre-trained
machine learning regression model to predict the
millimeter / pixel ratio and calculate the physical size of the polyp. This invention achieves
fully automated and high-precision measurement of polyp size, effectively solving the problems of high subjectivity and low accuracy in existing technologies.