This invention discloses a method, device, and storage medium for preventing accidental injury during
laser surgery for
urinary tract stones based on a visual AI model. The method includes: acquiring and preprocessing a video
stream captured in real-time by a
monocular ureteroscope; inputting the image to be identified into a multi-task neural
network model, simultaneously outputting a
laser point detection box, a mucosal region segmentation
mask, and a
monocular depth map; determining the coordinates of the
laser point center
pixel based on the detection box, determining the coordinates of the nearest mucosal edge
pixel based on the segmentation
mask, and obtaining the corresponding first and second depth values from the
depth map; inputting the coordinates, depth values, and intrinsic parameter matrix into a three-dimensional distance calculation model, reconstructing the three-dimensional spatial point coordinates based on the pinhole imaging formula, and calculating the actual physical distance; comparing the actual physical distance with dynamically adjusted safety and warning thresholds, and determining the
risk level through
fuzzy logic; generating control commands based on the
risk level and sending them to the laser host to achieve graded early warning, power adjustment, or emergency interruption.