When applying the tubing ultrasonic testing technology to evaluate the contact condition of the metal-to-metal sealing surface of premium connection, it is necessary to judge the ultrasonic reflection amplitude image of the manual contact interface to observe whether there is sealing defect. At present, the images of phased array ultrasonic testing results usually require professionals to rely on technical knowledge to judge, the analysis has low efficiency and strong evaluation subjectivity. Therefore, there is an urgent need for an intelligent method to identify the location, range and type of sealing defects in ultrasonic images accurately and efficiently, so as assisting or replacing manual operations. Aiming at the problems of heavy reliance on data quality and inflexible segmentation effect during the process of identifying the sealing surface region using the original Mask R-CNN network, the approach described in this paper enhances the model by incorporating the Segment Anything Model(SAM) and employs prompts to guide the object detection model in generating masks that fulfill various criteria. Experiments show that the method adopted in this paper can not only correctly identify the sealing surface location, but also, compared with the original Mask R-CNN network model, it can output a segmentation mask that meets the demand according to the prompts of different segmentation criteria, and the obtained sealing surface region is closer to the theoretical segmentation region.