A method for identifying cross-medium water-entry cavity profiles based on U-Net

By combining U-Net semantic segmentation and adaptive morphological processing with a cross-medium water cavitation contour recognition method, the robustness and accuracy issues of cavitation contour recognition are solved, achieving high-precision cavitation boundary extraction and parameter calculation, which is applicable to aerospace, shipbuilding and other fields.

CN122493041APending Publication Date: 2026-07-31BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING INST OF TECH
Filing Date
2026-04-17
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies suffer from poor robustness, low accuracy, and weak generalization ability in cavitation contour recognition, making them difficult to automate. Furthermore, traditional methods are susceptible to changes in lighting and water splashes.

Method used

A U-Net-based method for cross-medium water cavitation contour recognition is adopted, which combines U-Net semantic segmentation, SCSE attention mechanism and adaptive morphological processing. The cavitation boundary is extracted by U-Net model, sub-pixel level accuracy optimization is performed, and the geometric parameters of the cavitation are calculated.

Benefits of technology

It achieves high-precision and robust cavitation contour recognition, with a Dice coefficient of 0.9903 and a boundary positioning error of less than 0.5 pixels. It is highly automated and meets the needs of fluid dynamics analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122493041A_ABST
    Figure CN122493041A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of image recognition technology, specifically relating to a U-Net-based method for recognizing the contours of cavitation bubbles entering water across media, particularly suitable for detecting cavitation bubbles and extracting their physical parameters in high-speed photographic images. The specific process is as follows: Image preprocessing: Preprocessing the image of the object entering the water; U-Net semantic segmentation: Constructing a semantic segmentation model based on the U-Net architecture; Output layer using 1×1 convolution to output a single-channel probability map; Binarization and morphological processing: Setting an adaptive Otsu threshold to binarize the single-channel probability map, and using gradient-assisted refinement for boundary regions; Adaptive morphological processing for cavitation features; Sub-pixel precision contour extraction: Using a multi-level contour detection algorithm to extract cavitation bubble boundaries, and optimizing the contours for sub-pixel precision; Calculating the basic geometric parameters of the cavitation bubble: Converting pixel coordinates to physical coordinates based on camera calibration parameters, and then calculating the set of basic geometric parameters of the cavitation bubble.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image recognition technology, specifically relating to a method for cross-medium water cavitation contour recognition based on U-Net, which is particularly suitable for cross-medium water cavitation detection and physical parameter extraction in high-speed photographic images. Background Technology

[0002] The cavitation phenomenon generated during the entry of an object into water is an important topic in fluid mechanics research, with significant applications in aerospace, shipbuilding, and underwater weapons. Accurate identification and measurement of the geometric characteristics of cavitation (such as area, perimeter, and shape) are crucial for studying cross-medium motion dynamics and optimizing the design of cross-medium aircraft.

[0003] However, existing technologies still have certain shortcomings in some key areas. Traditional threshold-based methods for recognizing cavitation contours of objects entering water (such as fixed threshold, Otsu adaptive threshold, and Canny edge detection) suffer from poor robustness (sensitive to changes in lighting and water splashes), low accuracy (large boundary localization errors), and weak generalization ability (threshold parameters need to be adjusted experimentally). Therefore, there is an urgent need for a high-precision, robust, and automated method for recognizing cavitation contours. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a cross-medium water cavitation contour recognition method based on U-Net.

[0005] The technical solution for implementing the present invention is as follows:

[0006] In a first aspect, the present invention provides a method for cross-medium water cavitation contour recognition based on U-Net, the specific process of which is as follows: Step 1: Image preprocessing: Preprocess the image of the object entering the water, and then adjust the format of the preprocessed image to [B, C, H, W], where B is the batch, C is the channel, H is the height, and W is the width. Step 2: U-Net Semantic Segmentation: Construct a semantic segmentation model based on the U-Net architecture. The encoder path uses a convolutional neural network as the backbone network, progressively downsampling to extract multi-scale features; the bottleneck layer extracts the deepest features; the decoder path restores spatial resolution through upsampling, uses skip connections to fuse features from the corresponding layers of the encoder, and introduces the SCSE attention mechanism to enhance the model's feature representation capability through feature recalibration in both spatial and channel dimensions; the output layer uses a 1×1 convolution to output a single-channel probability map. Step 3: Binarization and Morphological Processing: Binarize the single-channel probability map by setting an adaptive Otsu threshold, and refine the boundary regions using gradient-assisted refinement; perform adaptive morphological processing on cavitation features. Step 4: Subpixel-level precision contour extraction: Use a multi-level contour detection algorithm to extract cavitation boundaries and optimize the contours with subpixel precision. Step 5: Calculate the basic geometric parameters of the cavitation bubble: Convert the pixel coordinates to physical coordinates based on the camera calibration parameters, and then calculate the basic geometric parameter set of the cavitation bubble.

[0007] Optionally, the present invention also includes step six: result output and visualization: generating multi-level visualization results, including the original image and the segmentation mask overlay image, the contour line annotation image, and recording geometric parameters and image temporal parameters.

[0008] Optionally, the adaptive binarization process described in this invention specifically involves: calculating the Otsu threshold as a baseline threshold Tbase, restricting the baseline threshold to the interval [0.4, 0.6], performing principal binarization on the probability map, and marking pixels with pixel values ​​P>Tbase as vacuoles; calculating the gradient of the probability map, and using a lower threshold Tlow= 0.8 × Tbase for boundary refinement in the boundary region where the gradient is greater than the set gradient threshold.

[0009] Optionally, the morphological processing described in this invention involves calculating the kernel size based on the average size of the cavitation bubbles.

[0010] in, This represents the average size of the cavitation bubble, calculated as follows. Construct a disk-shaped structuring element for the radius, use the structuring element to perform a closing operation to fill small voids inside the bubble, and use the structuring element to perform an opening operation to remove small noise in the background.

[0011] Optionally, the present invention further includes physical constraint verification in step three: verifying the physical rationality of the detected contours. First, perform a roundness check to filter out contours with abnormal roundness; second, filter out detection results with obviously abnormal sizes based on the cavitation size range predicted by the physical model.

[0012] Optionally, the profile for filtering out abnormal roundness in this invention is a profile with roundness C < 0.3 or roundness C > 0.95.

[0013] Optionally, the preprocessing process of the object entering the water image in step one of the present invention is as follows: standardize the object entering the water image, normalize the RGB image to the [0,1] interval, and perform image enhancement as needed, including contrast enhancement and noise reduction.

[0014] Optionally, step two of this invention uses a combined loss function to train the model:

[0015] in, Processing pixel-level classification, Optimize regional overlap.

[0016] Optionally, step four of the present invention, which optimizes the contour to subpixel precision, specifically involves: using the gradient information of the probability map, searching for the position of the maximum gradient in the direction of the boundary normal vector, obtaining subpixel-level coordinates through quadratic interpolation, and then using Gaussian filtering to smooth the contour, thereby removing jagged edges while maintaining boundary features.

[0017] Optionally, step four of the present invention, calculating the basic geometric parameters of the cavitation bubble, includes: physical geometric parameters, including area A, perimeter P, and geometric center (…). x c , y c ); Calculate shape characteristic parameters, including roundness C; cavitation morphology evolution parameters, including area change rate dA / dt, perimeter change rate dP / dt, and shape change trend.

[0018] Optionally, the present invention records double-precision coordinate data, including a list of pixel coordinates, a list of physical coordinates, and a list of sub-pixel coordinates.

[0019] Beneficial effects: First, high boundary positioning accuracy. Traditional edge detection algorithms (such as the Canny and Sobel operators) suffer from numerous false contours in water cavitation identification scenarios due to the texture response of the gas-liquid interface inside the cavitation bubble and the confusion between the strong gradient of the water surface line and the cavitation bubble boundary. This invention overcomes the problem of numerous false edge interference in the contour extraction results by introducing a U-Net model with the SCSE attention mechanism and training with a combined loss function (BCE+Dice). This enables the model to distinguish between the cavitation bubble boundary and the water surface line, as well as the internal texture, thus achieving semantic understanding. The Dice coefficient reaches 0.9903, and the IoU reaches 0.9808. After sub-pixel precision optimization, the boundary error is further reduced to <0.5 pixels, resulting in improved accuracy compared to the traditional Canny edge detection method.

[0020] Second, the cavitation region has good continuity. Existing technologies that rely on background subtraction cannot distinguish between moving objects and cavitation regions. This results in cavity defects at locations where the moving object occludes the cavitation region, disrupting the continuity of the cavitation area. Figure 3 As shown. This invention introduces an adaptive morphological closing operation after binarization, which adaptively determines the convolution kernel size based on the average size of the cavitation. The closing operation fills the holes, ensuring the continuity of the cavitation region. It can fill the cavity defects caused by the occlusion of moving objects without the need for a background image, thus ensuring the continuity of the cavitation region.

[0021] Third, complete extraction of physical parameters This invention provides a complete physical parameter calculation process, including various geometric parameters such as area, perimeter, geometric center, and circularity, double-precision coordinate storage such as pixel, physical, and sub-pixel, and morphological evolution parameters such as area change rate and shape evolution, to meet the needs of fluid dynamics analysis.

[0022] Fourth, high degree of automation This invention automates the entire process from image input to parameter output. Adaptive threshold selection eliminates the need for manual parameter tuning, and it features automatic contour extraction and quality filtering, automatic physical parameter calculation, and batch processing capabilities capable of handling thousands of images at high speed to meet real-time analysis needs. Furthermore, it can be extended to other cross-media phenomena such as water droplet impaction, bubble rise, and jet injection into water. Attached Figure Description

[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating the overall process of the method of the present invention. Figure 2 This is a layout diagram of the water entry test site; Figure 3 This is a typical shortcoming of traditional edge detection algorithms in identifying cavitation bubbles entering water; Figure 4 A diagram illustrating the annotation of the dataset; Figure 5 For the U-net model training process; Figure 6 Typical reasoning and analysis process for test set images; Figure 7 Contour and coordinate extraction of cavitation bubble images entering water. Detailed Implementation

[0025] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0026] It should be noted that, in the absence of conflict, the following embodiments and features can be combined with each other; and, based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0027] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.

[0028] This application provides an embodiment of a cross-medium water cavitation contour recognition method based on U-Net, the specific process of which is as follows: The experimental hardware and software setup and implementation method are as follows: The hardware environment employed a Thousand-Eyed Wolf high-speed camera, capturing images at a frame rate of 2000 FPS and a resolution of 2560×1600 pixels. LED backlighting was used for illumination. The computer configuration consisted of an Intel i7-9700K processor and a GTX 1650 SUPER graphics card (4GB VRAM). The deep learning framework used was PyTorch 2.5.1. The experimental objects included cylinders with a diameter of 40mm and a length of 300mm, made of resin, which entered the water at a speed of 10-15 m / s. The dataset consisted of 700 high-speed photographs of different water entry scenarios. 514 images were randomly selected as the training set, 91 as the validation set, and 95 as the test set. Labelme was used for annotation.

[0029] The U-Net model is constructed and trained as follows: The U-Net model is constructed using the segmentation_models_pytorch library. The encoder path uses ResNet34 or a deeper convolutional neural network as the backbone network, progressively downsampling to extract multi-scale features; the bottleneck layer performs the deepest feature extraction, with 512-1024 channels; the decoder path restores spatial resolution through upsampling, uses skip connections to fuse features from the corresponding layers of the encoder, and introduces the SCSE (Spatial and Channel Squeeze & Excitation) attention mechanism to enhance the model's feature representation capability through feature recalibration in both spatial and channel dimensions; the output layer uses 1×1 convolutions to output a single-channel probability map.

[0030] The U-Net model has 3 input channels (RGB image), corresponding to the red, green, and blue color channels of an RGB image. The format conversion [H,W,C]→[B,C,H,W] only adjusts the tensor dimension order to conform to the PyTorch framework input specifications; the number of channels C remains unchanged. The output class is 1 (binary classification task), and no activation function is used within the model. The loss function is a combined loss. The binary cross-entropy loss (BCE) is used. and Dice loss Combined with a weighting of 0.5:0.5, Responsible for pixel-level binary classification, To optimize region overlap, we use BCE to ensure pixel-level accuracy while optimizing overall segmentation quality using Dice, achieving a balance between pixel-level accuracy and overall segmentation quality. The training configuration employs the Adam optimizer with an initial learning rate of 3e-4, a cosine annealing learning rate scheduler, a batch size of 2, a gradient accumulation strategy (accumulated steps of 3), an effective batch size of 6, and 100 training epochs.

[0031] Training results show that in Epochs 1-20, the training loss decreased from 0.60 to 0.05, and the validation set Dice increased from 0.75 to 0.98, achieving rapid convergence. In Epochs 21-60, the training loss decreased from 0.05 to 0.02, and the validation set Dice increased from 0.98 to 0.988, completing performance optimization. In Epochs 61-100, the training loss decreased from 0.02 to 0.013, and the validation set Dice increased from 0.988 to 0.990, allowing for fine-tuning. The final model achieved its best performance at Epoch 97, with a Dice coefficient of 0.9903, a training set loss of 0.0133, a validation set loss of 0.0204, and a total training time of 1.49 hours. The training process was stable, and no overfitting was observed.

[0032] The complete reasoning and post-processing workflow includes the following steps: Image reading and preprocessing: The water entry images acquired by high-speed photography are standardized, and the RGB images are normalized to the [0,1] interval; image enhancement is performed as needed, including contrast enhancement and noise reduction; the images are converted to the input format of the deep learning model, and the format of the original image [H, W, C] (height, width, channel) is adjusted to [B, C, H, W] (batch, channel, height, width). In this embodiment, normalization processing is performed (pixel values ​​divided by 255), and the format is adjusted to the model input format [1, 3, 512, 512] (batch 1, RGB 3 channels, 512×512 resolution).

[0033] U-Net model inference: The preprocessed image is input into the trained U-Net model, and the model outputs a single-channel probability map. The value of each pixel represents the probability (range 0-1) that the location belongs to a vacuole. Inference is performed on the GPU, and the inference time for a single image is approximately 0.05 seconds.

[0034] Adaptive Binarization: A dual-threshold adaptive binarization strategy is adopted. The Otsu threshold is calculated as the baseline threshold Tbase, which is limited to a physically reasonable range [0.4, 0.6] to avoid extreme values. The probability map is subjected to master binarization, and pixels with pixel values ​​P > Tbase are marked as cavitation. The gradient of the probability map is calculated, and a lower threshold Tlow = 0.8 × Tbase is used for boundary refinement in boundary regions (where the gradient is greater than the threshold), improving boundary localization accuracy.

[0035] Morphological processing: Adaptive morphological processing is performed on cavitation features, and the convolution kernel size is calculated based on the average cavitation size.

[0036] Calculated A disk-shaped structuring element is constructed for the radius. The closing operation (dilation followed by erosion) is performed using this structuring element to fill the small voids inside the bubble, ensuring the continuity of the bubble region. The opening operation (erosion followed by dilation) is used to remove small noise in the background, improving the cleanliness of the segmentation. Finally, connected component analysis is performed to filter out tiny regions with an area of ​​less than 50 pixels, which are usually noise or water splash interference.

[0037] Morphological operations (closing and opening operations) all require a structuring element as an operation template. The size of the structuring element, i.e. the size of the convolution kernel, directly determines the upper limit of the holes that can be filled and the upper limit of the noise that can be removed.

[0038] Taking an average bubble size of 500 pixels as an example, if the kernel size calculated by the formula is 15 pixels, then: The closing operation uses a 15×15 disk-shaped structural element to fill internal holes with a diameter of less than 15px; the opening operation uses a 15×15 disk-shaped structural element to remove background noise with an area of ​​less than 15×15.

[0039] Existing techniques generally use a structuring element with a fixed radius of 10 pixels. Since the size of cavitation varies significantly at different stages of water entry, the fixed convolution kernel presents the following contradictions: for larger cavitations, the structuring element is too small to fill the internal voids; for smaller cavitations, the structuring element is too large, and the closing operation will connect adjacent noise points to the cavitation, while the opening operation may erode and eliminate the entire effective cavitation region.

[0040] In this invention, the size of the convolution kernel is dynamically calculated according to the actual size of the cavitation using a formula, so that the structural elements match the scale of the cavitation in the current frame, enabling accurate hole filling and noise removal at different water entry stages.

[0041] Physical constraint verification: The detected contours are physically validated. First, a roundness check is performed, calculating the roundness C = 4πA / P², filtering out contours with abnormal roundness (C<0.3 indicates excessive elongation, C>0.95 indicates near-perfect roundness, possibly indicating an air bubble rather than a cavitation). Then, a size check is performed, filtering out detection results with obviously abnormal sizes based on the predicted cavitation size range from a physical model (such as a ballistic model).

[0042] Subpixel precision contour extraction: To further improve boundary localization accuracy, a subpixel optimization algorithm is adopted. `cv2.findContours` is used to extract initial contours with integer pixel precision, where the parameters are set to `cv2.RETR_EXTERNAL` and `cv2.CHAIN_APPROX_NONE`. The gradient of the probability map is calculated: grad = P(x,y). For each point on the initial contour, calculate the boundary normal vector n. Search for the location of the maximum gradient along the normal vector direction and use quadratic interpolation to accurately locate the sub-pixel boundary position, ultimately obtaining sub-pixel contour coordinates with an accuracy of <0.5 pixels. Contour smoothing is performed using Gaussian filtering to smooth the contour, preserving boundary features while removing jagged edges.

[0043] Geometric parameter calculation: Based on the extracted contour, physical geometric parameters are calculated using OpenCV functions to calculate basic parameters per pixel: Area A_pixel = cv2.contourArea(contour), which is the area of ​​the region enclosed by the contour, in cm²; Perimeter P_pixel = cv2.arcLength(contour, closed=True), which is the length of the contour boundary, in cm; Geometric center M = cv2.moments(contour), which is the geometric center of the contour, in cm. These parameters are then converted to physical units using camera calibration parameters.

[0044] The shape feature parameter circularity C = 4πA / P² is calculated, and temporal analysis (for consecutive frames) is performed: the area change rate dA / dt, the perimeter change rate dP / dt, and the change trend of the circularity shape evolution rate over time. Finally, double-precision coordinate data is recorded, including a list of pixel coordinates (integer precision), a list of physical coordinates (floating-point precision, unit cm), and a list of sub-pixel coordinates (floating-point precision).

[0045] Results recording and visualization: Stores coordinate data at three levels of precision, including integer pixel coordinates, physical coordinates, and sub-pixel coordinates. Generates visualization results such as a semi-transparent overlay of the original image and a segmentation mask, and outline annotations.

[0046] Step F: Experimental Results and Analysis A random image was selected from the test set for inference. The pixel length was calibrated to 0.1m = 235.9 pixels. The coordinates and area of ​​the cavitation bubble were calculated. The area was 141125 pixels, which is equivalent to 253.62cm2. The inference time was 0.43s.

[0047] The experimental results above demonstrate that this invention can achieve high-precision and robust cavitation contour recognition, specifically manifested in significantly improved recognition accuracy (Dice coefficient reaches 0.9903, boundary positioning error <0.5 pixels, a significant improvement compared to traditional methods), complete and accurate parameter extraction (calculation errors of geometric parameters are all <5%, geometric center positioning accuracy reaches pixel level, meeting the requirements of fluid dynamics analysis), high processing efficiency (single frame processing time is only 0.43 seconds, complete training requires only 1.49 hours, high deployment efficiency), and stable and efficient training (through SCSE attention mechanism and cosine annealing learning rate scheduling, the model can achieve a Dice coefficient of over 0.98 in the first 20 epochs, and subsequent fine-tuning steadily improves it to over 0.99, exhibiting excellent convergence characteristics). In summary, this invention has achieved its intended objectives and verified the advantages of the method in terms of rationality, effectiveness, and engineering practicality.

[0048] In summary, the above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A U-Net based cross-media in-water cavity profile identification method, characterized in that, The specific process is as follows: Step 1: Image preprocessing: Preprocess the image of the object entering the water; Step 2: U-Net Semantic Segmentation: Construct a semantic segmentation model based on the U-Net architecture. The encoder path uses a convolutional neural network as the backbone network, progressively downsampling to extract multi-scale features; the bottleneck layer extracts the deepest features; the decoder path restores spatial resolution through upsampling, uses skip connections to fuse features from the corresponding layers of the encoder, and introduces the SCSE attention mechanism to enhance the model's feature representation capability through feature recalibration in both spatial and channel dimensions; the output layer uses a 1×1 convolution to output a single-channel probability map. Step 3: Binarization and Morphological Processing: Binarize the single-channel probability map by setting an adaptive Otsu threshold, and refine the boundary regions using gradient-assisted refinement; perform adaptive morphological processing on cavitation features. Step 4: Subpixel-level precision contour extraction: Use a multi-level contour detection algorithm to extract cavitation boundaries and optimize the contours with subpixel precision. Step 5: Calculate the basic geometric parameters of the cavitation bubble: Convert the pixel coordinates to physical coordinates based on the camera calibration parameters, and then calculate the basic geometric parameter set of the cavitation bubble.

2. The U-Net based cross-media water-entry cavity profile identification method of claim 1, wherein, It also includes step six: Result output and visualization: generating multi-level visualization results, including the original image and segmentation mask overlay image, contour line annotation image, and recording geometric parameters and image temporal parameters.

3. The U-Net based cross-media in-water cavity profile identification method of claim 1, wherein, The adaptive binarization process specifically involves: calculating the Otsu threshold as the baseline threshold Tbase, restricting the baseline threshold to the interval [0.4, 0.6], performing principal binarization on the probability map, and marking pixels with pixel values ​​P>Tbase as cavitation; calculating the gradient of the probability map, and using a lower threshold Tlow = 0.8 × Tbase to refine the boundary in the boundary region where the gradient is greater than the set gradient threshold.

4. The U-Net based cross-media in-water cavity profile identification method of claim 1, wherein, The morphological processing involves calculating the kernel size based on the average cavitation size. wherein, represents the average size of the cavitation, calculated as a disc-shaped structuring element with a radius is constructed, which is used to perform a closing operation to fill small cavities inside the cavitation, and which is used to perform an opening operation to remove small noise points in the background.

5. The method for cross-medium water cavitation contour recognition based on U-Net according to claim 1, characterized in that, Step three further includes physical constraint verification: physical rationality verification of the detected contours. First, roundness check is performed to filter out contours with abnormal roundness; second, based on the cavitation size range predicted by the physical model, detection results with obvious size abnormalities are filtered out; the contours with abnormal roundness are filtered out as follows: contours with roundness C < 0.3 or roundness C > 0.95 are filtered out.

6. The method for cross-medium water cavitation contour recognition based on U-Net according to claim 1, characterized in that, The process of preprocessing the object entering the water image in step one is as follows: standardize the object entering the water image, normalize the RGB image to the [0,1] interval, and perform image enhancement as needed, including contrast enhancement and noise reduction.

7. The method for cross-medium water cavitation contour recognition based on U-Net according to claim 1, characterized in that, Step two uses a combined loss function to train the model: in, Processing pixel-level classification, Optimize regional overlap.

8. The method for cross-medium water cavitation contour recognition based on U-Net according to claim 1, characterized in that, The fourth step of optimizing the contour to subpixel precision involves: using the gradient information of the probability map, searching for the position of the maximum gradient in the direction of the boundary normal vector, obtaining subpixel-level coordinates through quadratic interpolation, and then using Gaussian filtering to smooth the contour, removing jagged edges while maintaining boundary features.

9. The method for cross-medium water cavitation contour recognition based on U-Net according to claim 8, characterized in that, Step four, calculating the basic geometric parameters of the cavitation bubble, includes: physical geometric parameters, including area A, perimeter P, and geometric center (…). x c , y c ); Calculate shape characteristic parameters, including roundness C; cavitation morphology evolution parameters, including area change rate dA / dt, perimeter change rate dP / dt, and shape change trend.

10. The method for cross-medium water cavitation contour recognition based on U-Net according to claim 1, characterized in that, Record double-precision coordinate data, including a list of pixel coordinates, a list of physical coordinates, and a list of sub-pixel coordinates.