A deep neural network-based ship propeller cavitation recognition segmentation method
By using a cavitation identification and segmentation method based on deep neural networks, the problems of multiple dependent conditions and poor robustness in the identification and quantitative analysis of propeller cavitation regions are solved. This method enables efficient and accurate automatic identification and segmentation under complex working conditions, thereby improving the automation and intelligence level of propeller cavitation research.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2026-05-06
- Publication Date
- 2026-06-05
Smart Images

Figure CN122156647A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the application of computer vision and deep learning technologies in the field of hydrodynamics, and particularly to an automatic identification and segmentation method for the cavitation region of a propeller blade under cavitation conditions based on a deep neural network. Background Technology
[0002] Currently, existing technologies for identifying and segmenting cavitation in ship propellers mainly rely on two categories: traditional image processing methods and numerical simulation techniques.
[0003] Traditional image processing methods are mostly based on the principle of threshold segmentation. Pereira et al. performed cross-correlation convolution on images of a propeller before and after cavitation to remove background information from the blades. They then combined threshold detection and morphological operations to extract the cavitation region and mapped it onto a pre-drawn grid of blades to achieve quantitative measurement of the cavitation area. Chang et al. used a non-cavitation image as a reference, obtained the cavitation image by image subtraction, and performed binarization segmentation using a fixed threshold. To improve the results, they further removed noise and filled holes and discontinuities through filtering and morphological repair to extract the complete cavitation region and conduct quantitative analysis.
[0004] However, the aforementioned methods generally rely on non-cavitation images from the same viewpoint as a reference, which is often difficult to obtain in practical applications. Furthermore, variations in lighting, pose deviations, and brightness under different experimental conditions can significantly affect segmentation accuracy. In addition, thresholding methods are extremely sensitive to ambient lighting and background noise, resulting in unstable recognition performance under complex conditions, with frequent missed detections or missegments of cavitation regions. To address this, some studies have used manual reference lines to assist in hand-drawing annotations of cavitation regions. While this method can adapt to complex scenes, its annotation efficiency is extremely low and it is easily affected by subjective factors, making it difficult to guarantee consistency and objectivity.
[0005] Numerical simulation is an important tool for studying propeller cavitation, with the advantage of directly calculating the area or volume of the cavitation region. Currently, the mainstream method is flow field solving based on the RANS equations combined with the Schnerr-Sauer cavitation model. Chow et al. used this method to study the impact of different cavitation models on propeller cavitation prediction results and verified its feasibility through experiments; Yilmaz et al. significantly improved the accuracy and efficiency of tip vortex cavitation capture by using adaptive mesh refinement technology. However, such methods also have significant shortcomings: First, the RANS model relies on empirical parameters, making it difficult to accurately characterize complex cavitation flow features; second, numerical calculations require extremely high hardware resources and computation time, especially at high resolutions, where computational costs are enormous; third, the model has poor adaptability to complex non-uniform flow fields and variable boundary conditions, resulting in limited prediction accuracy and making it difficult to fully meet the needs of practical engineering applications.
[0006] In summary, existing technologies for identifying and quantitatively analyzing propeller cavitation regions still suffer from problems such as numerous dependencies, poor robustness, low efficiency, and high computational costs. There is an urgent need for a new technical solution that can efficiently and accurately identify propeller cavitation regions under complex operating conditions. Summary of the Invention
[0007] To address the shortcomings of existing propeller cavitation identification technologies, such as the reliance on non-cavitation reference images in traditional image processing methods, high sensitivity to image quality and lighting conditions, and the need for manual intervention in threshold selection, this invention proposes a propeller cavitation identification and segmentation method based on deep neural networks.
[0008] The technical solution adopted in this invention is:
[0009] The cavitation identification and segmentation method for aft propellers provided by this invention includes the following steps:
[0010] Step S1: Obtain videos of the cavitation evolution process of at least one propeller model under different operating conditions, and construct a dataset.
[0011] The dataset includes labeled and unlabeled data. The labeled data consists of images of the stern propeller and corresponding cavitation mask images; the unlabeled data only includes images of the stern propeller.
[0012] The cavitation mask image is a pixel-level annotation of the propeller image at the stern of the ship. The annotation types include background, normal area of the propeller surface, and cavitation area; in the cavitation area, different cavitation types correspond to different annotations.
[0013] Optionally, the cavitation type includes one or more of sheet cavitation, tip vortex cavitation, bubble cavitation, and cloud cavitation.
[0014] Preferably, the cavitation type includes sheet cavitation and tip vortex cavitation.
[0015] Preferably, the operating conditions include the propeller model speed, water flow rate, and pressure in the cavitation water tank.
[0016] In the dataset, the ratio of labeled data to unlabeled data is 20~100:2700~2800.
[0017] Step S2: Construct a cavitation recognition and segmentation model.
[0018] Specifically, the cavitation recognition and segmentation model includes a cavitation segmentation network and a label encoding network. The cavitation segmentation network adopts a multi-level U-Net framework; the label encoding network adopts a multi-level encoder framework. The cavitation segmentation network and the label encoding network have the same depth and their levels are aligned. Each U-Net and encoder feature extraction module uses a small U-Net structure.
[0019] In the cavitation segmentation network, the first-level U-Net includes a first convolutional layer, two feature extraction modules, and a second convolutional layer connected in series; the last-level U-Net includes a pooling layer, a feature extraction module, and an upsampling layer connected in series; all other levels of U-Net include a pooling layer, two feature extraction modules, and an upsampling layer connected in series. The image of the ship's stern propeller is input to the first convolutional layer of the first-level U-Net for processing. The first feature extraction module receives the output of the convolutional layer. The output of the first feature extraction module and the output of the upsampling layer of the second-level U-Net are concatenated, and then processed by the second feature extraction module. The output of the second feature extraction module is processed by the second convolutional layer to obtain the recognition and segmentation result. For other levels of U-Net besides the first-level and last-level U-Net, the pooling layer of each level of U-Net receives the input from the previous level of U-Net. The first feature extraction module receives the output of the pooling layer and processes it. The output of the first feature extraction module is then concatenated with the output of the upsampling layer in the next-level U-Net. This concatenation is then processed by the second feature extraction module and the upsampling layer sequentially. The output of the upsampling layer is used for concatenation with the output of the first feature extraction module in the previous-level U-Net. The output of the second feature extraction module is used to calculate the KL divergence with the peer encoder in the label coding network. In the final U-Net, the pooling layer receives the output of the first feature extraction module in the previous-level U-Net and processes it. The output of the pooling layer is then processed by the feature extraction module and the upsampling layer sequentially. The output of the upsampling layer is used for concatenation with the output of the first feature extraction module in the previous-level U-Net. The output of the feature extraction module is used to calculate the KL divergence with the peer encoder in the label coding network.
[0020] In the label encoding network, the first-level encoder consists of a convolutional layer and a feature extraction module, while each of the other encoder levels consists of a pooling layer and a feature extraction module. The convolutional layer of the first-level encoder receives the label cavitation mask image. In each encoder level, the output of the feature extraction module is compared with the output of the feature extraction module on the output side of the U-Net of the same level of the cavitation segmentation network (i.e., the feature extraction module in the last U-Net and the second feature extraction module in other U-Net levels) to calculate the KL divergence. The weighted calculation result of the KL divergence of each level is used as the KL loss of the cavitation recognition and segmentation model.
[0021] Preferably, both the cavitation segmentation network and the label encoding network include six levels, and the U-Net and encoder at the same level adopt the same feature extraction module (in order to adapt to the feature splicing operation, the U-Net blocks at the same level have slight differences in the number of input and output feature dimensions).
[0022] Preferably, in the coding layers of each feature extraction module, from the first to the sixth level, the number of convolutional layer blocks is 7, 6, 5, 4, 4, 4 respectively; the coding layers of the fourth and fifth level feature extraction modules adopt dilated convolution.
[0023] Specifically, the encoding layers of the fourth and fifth level feature extraction modules do not have pooling layers, thus enabling the use of dilated convolution.
[0024] Step S3: Train the cavitation recognition and segmentation model using the dataset to obtain the trained cavitation recognition and segmentation model; in each round of training, supervised learning is performed using labeled data and cross-entropy loss and KL loss are calculated, and unsupervised learning is performed using unlabeled data and entropy loss is calculated; the total loss is obtained by combining cross-entropy loss, KL loss and entropy loss.
[0025] The unsupervised learning includes: during each training round, predicting unlabeled data and calculating the entropy loss of the prediction results; in at least one pre-selected designated round, selecting the unlabeled data with the highest entropy loss according to a preset ratio, labeling it, and updating the dataset. Updating the dataset means that after labeling the unlabeled data, it is treated as labeled data for supervised learning in subsequent rounds.
[0026] Preferably, in step S3, the comprehensive processing is a weighted calculation.
[0027] Step S4: Input the image of the propeller at the rear of the ship into the trained cavitation recognition and segmentation model to obtain a predicted cavitation mask image as the recognition and segmentation result.
[0028] In summary, this invention enables automated cavitation region identification and precise segmentation directly based on experimentally captured propeller cavitation images, without requiring reference to images of non-cavitary states, thus significantly improving the algorithm's applicability and automation level. Furthermore, this invention incorporates cavitation type information during the training phase, enabling the model to distinguish and intelligently identify different cavitation morphologies (such as sheet cavitation and tip vortex cavitation), allowing the model not only to segment cavitation regions but also to classify and identify multiple types of cavitation. Combined with the area calculation post-processing algorithm of this invention, key parameters such as cavitation percentage can be automatically calculated, providing researchers with efficient and reliable technical support in cavitation experimental analysis, performance evaluation, and fluid dynamics characteristic research, thereby significantly improving the automation and intelligence level of propeller cavitation research.
[0029] The beneficial effects of this invention are:
[0030] 1. This invention directly identifies and segments regions based on experimentally acquired propeller cavitation images, which better reflects real cavitation characteristics compared to numerical simulation methods. Compared to traditional threshold-based image processing methods, this technology is less dependent on image quality. The deep neural network model used can automatically adapt to images captured in various complex environments, eliminating the need for manual adjustment of the segmentation threshold and achieving a high degree of automation. Compared to manual drawing methods, this technology significantly improves processing efficiency while avoiding human subjective errors, thus enhancing the objectivity and consistency of the results.
[0031] 2. Compared with the traditional U-Net network, the cavitation segmentation network proposed in this technology can simultaneously take into account fine-grained information (such as target edges and textures) and global context features in terms of structure. It is more sensitive to small targets and edge regions, and exhibits higher robustness in weak contrast regions, thereby achieving high-precision segmentation of cavitation regions.
[0032] 3. The label encoding network generates a high-dimensional feature representation by encoding the features of the real labels (masks) and combines KL divergence as the training loss function, enabling the model to learn the class probability distribution during training, rather than relying solely on binary "yes / no" judgments. This significantly improves the model's generalization ability and overall performance under different propeller types and multiple operating conditions. Attached Figure Description
[0033] Figure 1 This is a flowchart of the method of the present invention.
[0034] Figure 2 This is a flowchart of the model training (semi-supervised learning + active learning) process of the method of this invention.
[0035] Figure 3 This is a schematic diagram of the overall structure of the neural network model of the present invention.
[0036] Figure 4 This is a schematic diagram of the feature extraction block in the neural network model of the present invention.
[0037] Figure 5 This is a schematic diagram of the structure of the convolutional layer block in the neural network model of this invention.
[0038] Figure 6 The image shows the cavitation segmentation model of the present invention for the recognition and segmentation result of a momentary frame, where (a) is the image to be processed, (b) is the real mask image, (c) is the segmentation result of the cavitation segmentation model, and (d) is the image to be processed + cavitation segmentation.
[0039] Figure 7 This is the confusion matrix of the cavitation segmentation model of the present invention for the identification and segmentation results of the above instantaneous frame.
[0040] Figure 8 The diagram shows the cavitation ratio calculation results of the cavitation segmentation model of the present invention for four randomly selected instantaneous frames. (a1) is the original image of the first instantaneous frame, (a2) is the segmentation result of the cavitation segmentation model of the first instantaneous frame; (b1) is the original image of the second instantaneous frame, (b2) is the segmentation result of the cavitation segmentation model of the second instantaneous frame; (c1) is the original image of the third instantaneous frame, (c2) is the segmentation result of the cavitation segmentation model of the third instantaneous frame; (d1) is the original image of the fourth instantaneous frame, (d2) is the segmentation result of the cavitation segmentation model of the fourth instantaneous frame. Detailed Implementation
[0041] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] This invention provides a method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network.
[0043] like Figure 1 As shown, the cavitation identification and segmentation method for aft propellers provided by the present invention includes the following steps:
[0044] Step S1: Obtain videos of the cavitation evolution process of at least one propeller model under different operating conditions, and construct a dataset. The dataset includes labeled and unlabeled data.
[0045] The labeled data consists of an image of the stern propeller and a corresponding cavitation mask image. The unlabeled data only includes an image of the stern propeller.
[0046] In a preferred embodiment of the present invention, the operating conditions include the propeller model speed, the water flow rate, and the pressure in the cavitation water tank.
[0047] In a preferred embodiment of the present invention, the ratio of labeled data to unlabeled data in the dataset is 20~100:2700~2800.
[0048] In a preferred embodiment of the present invention, step S1 includes:
[0049] Step S1.1: Conduct a cavitation experiment on the propeller at the stern in a cavitation tank. During the experiment, a color CCD camera combined with a stroboscope is used to synchronously capture the temporal changes in cavitation of the propeller model, in order to obtain video data of the cavitation evolution process of the propeller model under different operating conditions. The acquired propeller cavitation experiment video is decomposed frame by frame to extract continuous image frame sequences.
[0050] Step S1.2: For the extracted original frame images, firstly, image cropping and size unification methods are used to remove irrelevant background areas and standardize image sizes; then, image enhancement techniques such as histogram equalization are used to improve image contrast and clarity, resulting in a high-quality image dataset that is more suitable for subsequent cavitation region recognition and segmentation processing.
[0051] Step S1.3: After obtaining the preprocessed propeller cavitation image, label and classify some image samples to construct the training dataset for the cavitation recognition model.
[0052] Specifically, a semi-automatic annotation method is used to annotate the non-cavitation and cavitation areas on the propeller surface at the pixel level, forming corresponding label masks.
[0053] Furthermore, to enhance the diversity of the dataset and the generalization ability of the model, data augmentation processing can be performed on the labeled samples, including operations such as rotation, flipping, scaling, brightness adjustment, and noise perturbation.
[0054] Step S2: Construct a cavitation recognition and segmentation model. For example... Figure 4 As shown, the cavitation recognition and segmentation model includes a cavitation segmentation network and a label encoding network. The cavitation segmentation network adopts a multi-level U-Net framework, and the label encoding network adopts a multi-level encoder framework. The cavitation segmentation network and the label encoding network have the same depth and their levels are aligned. The feature extraction module of each level of U-Net and encoder contains a small U-Net structure (i.e., a U-Net structure with a depth of one level).
[0055] In the cavitation segmentation network, the first-level U-Net consists of a first convolutional layer, two feature extraction modules, and a second convolutional layer connected in series; the last-level U-Net consists of a pooling layer, a feature extraction module, and an upsampling layer connected in series; and all other levels of U-Net consist of a pooling layer, two feature extraction modules, and an upsampling layer connected in series.
[0056] The image of the propeller at the rear of the ship is input into the first convolutional layer of the first-level U-Net for processing. The first feature extraction module receives the output of the convolutional layer. The output of the first feature extraction module and the output of the upsampling layer of the second-level U-Net are concatenated by feature concatenation and then processed by the second feature extraction module. The output of the second feature extraction module is processed by the second convolutional layer to obtain the recognition and segmentation result.
[0057] For all U-Net levels except the first and last U-Net levels, the pooling layer of each U-Net receives and processes the output of the first feature extraction module in the previous U-Net level. The first feature extraction module receives the output of the pooling layer. The output of the first feature extraction module and the output of the upsampling layer of the next U-Net level are concatenated. Then, the output is processed by the second feature extraction module and the upsampling layer in sequence. The output of the upsampling layer is used to perform feature concatenation with the output of the first feature extraction module in the previous U-Net level. The output of the second feature extraction module is used to calculate the KL divergence with the encoder of the same level in the label coding network.
[0058] In the final U-Net stage, the pooling layer receives and processes the output of the first feature extraction module in the previous U-Net stage. The output of the pooling layer is then processed by the feature extraction module and the upsampling layer in sequence. The output of the upsampling layer is used to perform feature concatenation with the output of the first feature extraction module in the previous U-Net stage. The output of the feature extraction module is used to calculate the KL divergence with the encoder at the same level in the label coding network.
[0059] In the label encoding network, the first-level encoder consists of a convolutional layer and a feature extraction module, while the other encoders each consist of a pooling layer and a feature extraction module.
[0060] In the label encoding network, the convolutional layer of the first-level encoder receives the label cavitation mask image. In each level of the encoder, the output of the feature extraction module is compared with the output of the feature extraction module on the output side of the U-Net of the same level of the cavitation segmentation network (i.e. the feature extraction module in the last level of the U-Net and the second feature extraction module in other levels of the U-Net) to calculate the KL divergence. The weighted calculation result of the KL divergence of each level is the KL loss of the cavitation recognition and segmentation model.
[0061] In a preferred embodiment of the present invention, both the cavitation segmentation network and the label encoding network comprise six levels, with the U-Net and encoder at the same level employing feature extraction modules of the same structure. In the encoding layers of each feature extraction module, from the first to the sixth level, the number of convolutional layers is 7, 6, 5, 4, 4, 4 respectively; the encoding layers of the fourth and fifth level feature extraction modules employ dilated convolutions.
[0062] Each convolutional block consists of a concatenated convolutional layer, a normalization layer, and an activation layer, such as... Figure 5 As shown.
[0063] In the above preferred embodiment, the encoding layers of the fourth and fifth level feature extraction modules preferably do not have pooling layers.
[0064] Step S3: Train the cavitation recognition and segmentation model using the dataset to obtain the trained cavitation recognition and segmentation model. For example... Figure 2 As shown, in each round of training, supervised learning is performed using labeled data and cross-entropy loss and KL loss are calculated, while unlabeled data is used for unsupervised learning and entropy loss is calculated. The total loss is obtained by combining the cross-entropy loss, KL loss and entropy loss.
[0065] Unsupervised learning includes: in each training round, predicting unlabeled data and calculating the entropy loss of the prediction results; in at least one pre-selected designated round, selecting the unlabeled data with the highest entropy loss according to a preset ratio, labeling it, and updating the dataset. Updating the dataset means that after labeling the unlabeled data, it is used as labeled data for supervised learning in subsequent rounds.
[0066] In a preferred embodiment of the present invention, comprehensive processing refers to weighted calculation, that is, the total loss is the weighted result of cross-entropy loss, KL loss and entropy loss.
[0067] Step S4: Input the image of the propeller at the rear of the ship into the trained cavitation recognition and segmentation model to obtain the predicted cavitation mask image as the recognition and segmentation result.
[0068] For the cavitation mask image in step S1 and the cavitation mask image in step S4, the cavitation mask image is a pixel-level annotation of the propeller image at the stern of the ship. The annotation types include background, normal area of propeller surface and cavitation area; in the cavitation area, different cavitation types correspond to different annotations.
[0069] Optionally, the cavitation type includes one or more of sheet cavitation, tip vortex cavitation, bubble cavitation, and cloud cavitation.
[0070] In a preferred embodiment of the present invention, the cavitation types include sheet cavitation and tip vortex cavitation.
[0071] Furthermore, the cavitation identification and segmentation method for aft propellers provided by the present invention may further include the following steps:
[0072] Step S5: Based on the predicted cavitation mask image, the proportion of cavitation regions on the propeller surface is quantitatively calculated using the following formula:
[0073]
[0074] in, This represents the percentage of cavitation relative to the blade. This represents the area of the cavitation region (the number of pixels corresponding to the cavitation region). This represents the area of the blade where cavitation occurs (the number of pixels corresponding to the blade region).
[0075] Specific embodiments of the present invention are as follows:
[0076] Example 1
[0077] The overall flow of the technical solution in this embodiment is as follows: Figure 1 As shown, the specific steps include:
[0078] 1. Video capture of propeller cavitation experiment
[0079] The cavitation experiment of the propeller at the stern was conducted in a large cavitation tank at the China Shipbuilding Scientific Research Center. During the experiment, a color CCD camera combined with a stroboscope was used to synchronously capture the temporal changes in cavitation of the propeller model, in order to obtain video data of the cavitation evolution process of the propeller under different operating conditions. The acquired video data covers three propeller models and their cavitation state information under various operating conditions.
[0080] The three propeller models used in this embodiment are TM2308, TM2420, and TM24261.
[0081] 2. Video decomposition and image preprocessing
[0082] The acquired propeller cavitation experiment video was decomposed frame by frame to extract continuous image frame sequences. For the extracted original frame images, firstly, image cropping and resizing methods were used to remove irrelevant background areas and standardize image sizes; then, image enhancement techniques such as histogram equalization were used to improve image contrast and clarity, resulting in a high-quality image dataset more suitable for subsequent cavitation region identification and segmentation processing.
[0083] 3. Training dataset creation and updating
[0084] After obtaining preprocessed propeller cavitation images, the image samples are labeled and classified to construct the training dataset for the cavitation recognition model. Specifically, a semi-automatic labeling method is used to perform pixel-level annotation on the propeller surface and cavitation regions, forming corresponding label masks. The semi-automatic labeling tool used is PaddleSeg software developed by the Baidu PaddlePaddle team. To improve the diversity of the dataset and the generalization ability of the model, the labeled samples are further subjected to data augmentation processing, including operations such as rotation, flipping, scaling, brightness adjustment, and noise perturbation.
[0085] In this embodiment, the cavitation types include sheet cavitation and tip vortex cavitation. Four different pixel values are used to label the background, the normal area of the propeller surface, the cavitation area where sheet cavitation occurs, and the cavitation area where tip vortex cavitation occurs, respectively.
[0086] 4. Training and Optimization of Cavitation Segmentation Model
[0087] Based on the established dataset, a deep learning framework is used to train and optimize the propeller cavitation segmentation model. Traditional supervised learning training strategies rely on a large number of ground truth labels as learning targets, requiring significant time for image annotation in the early stages; if the prediction performance on new data is unsatisfactory later, large-scale re-annotation is necessary, which is highly detrimental to practical applications. Therefore, this invention proposes a model training strategy combining semi-supervised learning and active learning, such as... Figure 2 As shown.
[0088] Specifically, the training dataset consists of a small amount of labeled data and a large amount of unlabeled data. The small amount of labeled data follows... Figure 2 The path indicated by the yellow dashed line in the middle participates in training, using cross-entropy loss and KL divergence loss (…). , () as the optimization objective.
[0089] For a large amount of unlabeled data, due to the lack of real labels, along Figure 2 The blue solid line path is used for training, and the entropy of the predicted value for each pixel is calculated. Using cross-entropy loss and KL divergence loss as the loss function, unsupervised learning is achieved. After training reaches a specified number of epochs, the predicted entropy values of all unlabeled images are sorted, and the images with the highest entropy values (which can be set proportionally, such as 1%) are selected for semi-automatic labeling; this process is active learning. The labeled images are then trained again, using cross-entropy loss and KL divergence loss. , This training strategy fully leverages the efficient use of limited labeled data in semi-supervised learning, combined with active learning to maximize model performance while significantly reducing labeling costs, thereby achieving high-precision segmentation of the propeller cavitation region. The relevant loss function formula is as follows:
[0090]
[0091]
[0092]
[0093] in, , , These represent the cross-entropy loss, KL divergence loss, and entropy loss, respectively. Total number of pixels For the number of categories, For real labels (one-hot encoded). This represents the class probabilities predicted by the model.
[0094] In this embodiment, the total loss of backpropagation is the weighted sum of entropy loss, cross-entropy loss, and KL divergence loss during supervised learning.
[0095] In this embodiment, the weights of entropy loss, cross-entropy loss, and KL divergence loss are all set to 1. Entropy loss and cross-entropy loss are calculated based on the logits value of the final model output, while KL divergence loss is calculated based on the output of different levels (e.g., ...). Figure 3 (As shown). KL divergence loss was calculated at 6 points. The final KL divergence loss of the model is obtained by weighted summation of these 6 KL losses, with the weights from top to bottom being [0.8, 0.08, 0.06, 0.04, 0.01, 0.01].
[0096] The overall structure of the deep neural network model proposed in this technology is as follows: Figure 3 As shown, it mainly consists of two network modules: a cavitation segmentation network (left) and a label encoding network (right). The cavitation segmentation network is V-shaped and inspired by the encoder-decoder structure of the U-Net network. Its design can simultaneously capture fine-grained features of the image and global contextual information. The label encoding network contains only an encoder structure, which is consistent with the structure on the left side of the V-shaped cavitation segmentation network.
[0097] Figure 4 The internal structure of feature extraction block ④ in the cavitation segmentation network and label encoding network is shown. Each feature extraction block adopts a small U-Net structure. The number of convolutional layers in the encoding and decoding blocks of other feature extraction blocks varies slightly, and the specific number of convolutional layers is given in Table 1. Each convolutional block consists of a concatenated convolutional layer, a normalization layer, and an activation layer, as shown in Table 1. Figure 5 As shown.
[0098] Table 1 Number of convolutional layer blocks within each feature extraction block
[0099]
[0100] 5. Application of cavitation segmentation model
[0101] The preprocessed video frame or image to be predicted is input into the cavitation segmentation model. In the cavitation segmentation network of the model, the output of the upsampling layer of the first-level U-Net is processed by a convolutional layer. The convolutional layer outputs the cavitation probability distribution of each pixel. After taking the maximum value of the cavitation probability distribution of each pixel, the predicted cavitation mask image corresponding to the video frame or image to be predicted is generated to identify the cavitation region.
[0102] Regarding the segmentation results:
[0103] If the segmentation accuracy fully meets expectations, the segmentation mask data can be directly exported and saved.
[0104] If the segmentation results differ in some image details, the edge regions can be fine-tuned using the designed interactive correction program before exporting and saving the final results.
[0105] If the segmentation results contain a large number of obvious errors, improvements and retraining can be carried out by updating the training dataset or optimizing the model structure to ensure that the segmentation accuracy meets the application requirements.
[0106] 6. Calculation of cavitation ratio
[0107] Based on the cavitation mask output by the cavitation segmentation model, the proportion of cavitation region on the propeller surface is quantitatively calculated using the following formula.
[0108]
[0109] in, This represents the percentage of cavitation relative to the blade. This represents the area of the cavitation region (the number of pixels corresponding to the cavitation region). This represents the area of the blade where cavitation occurs (the number of pixels corresponding to the blade region).
[0110] Example 2
[0111] This embodiment uses the TM2308 model propeller as an example, conducting a propeller cavitation experiment and collecting experimental videos in a large cavitation water tank at the China Ship Scientific Research Center. The data processing method and the deep neural network model trained in Example 1 are used to automatically identify and segment the propeller cavitation region.
[0112] In this embodiment, the acquired propeller cavitation video is first decomposed into consecutive frame images, and preprocessing operations such as normalization and contrast enhancement are performed to convert them into a format that meets the model's input requirements. Subsequently, the trained cavitation segmentation model is used to perform inference calculations on the image to be processed, outputting a cavitation probability distribution map and generating a mask to achieve automatic segmentation of the propeller cavitation region.
[0113] Figure 6 The cavitation segmentation results corresponding to the instantaneous frame to be predicted are shown. (Comparison) Figure 6 The real mask in (b) and Figure 6 The model prediction results in (c) show that the model output is generally consistent with the actual annotations, with only slight differences at edge details. Further observation... Figure 6As shown in the overlay of the original image and the segmented mask in (d), it can be seen that the cavitation regions segmented by the model closely match the actual cavitation morphology in the original image. Especially in the red vortex cavitation region, the model's prediction results are even more accurate than manual annotation (i.e., the semi-automatic annotation in Example 1). This is mainly because manual annotation often sacrifices some accuracy to improve efficiency. However, this invention introduces a label encoding network, enabling the model to learn the category probability distribution of each pixel during the training phase. Compared to binary judgments based solely on the true label ("yes / no"), this achieves higher accuracy and adaptability, thus making this invention significantly superior to traditional supervised learning methods.
[0114] To quantitatively evaluate the segmentation performance of the model, Figure 7 Given Figure 6 The confusion matrix corresponding to the results is shown. The horizontal axis of the confusion matrix represents the predicted class, and the vertical axis represents the true class. The value of each cell represents the proportion of samples belonging to a certain true class that are predicted to belong to that class. This example includes four classes: background (BG, black), blade (Blade, blue), tip vortex cavitation (TVC, red), and sheet cavitation (SC, green).
[0115] Depend on Figure 7 As can be seen, the matching degree between the segmentation results of each category and the actual results exceeds 90%, with the accuracy of the background and propeller categories reaching over 99%. The matching degree of the TVC category is 92.2%, which is relatively low. The reason for this is that there are a small number of pixel errors in the manual annotation, causing some real TVC areas to be mislabeled as background or SC areas (accounting for 4.37% and 3.44% respectively). Figure 6 The observations and analysis are consistent. Therefore, the model's segmentation accuracy in the true physical sense is actually higher than 92.2%. Similarly, thanks to the model's adaptive optimization mechanism, the actual accuracy of the SC category is also better than the labeled 97.81%.
[0116] Figure 8 The calculation results of cavitation ratio for four instantaneous frames of the TM2308 propeller are shown, with the blade cavitation ratio displayed in the upper left corner of the image. Considering that some blade root areas may be obscured by other blades during the experimental shooting perspective, this embodiment selects the area outside the 0.5R radius line of the propeller blades as the cavitation ratio to improve calculation accuracy. Statistical scope (see) Figure 8 (Green-framed area). From Figure 8 The comparison shows that the cavitation region obtained by the model segmentation is highly consistent with the cavitation morphology of the original image, and the calculated cavitation ratio is in good agreement with the actual observation, which fully verifies the stability and high accuracy of the method of the present invention in complex flow environments.
[0117] The above specific embodiments are used to explain and illustrate the present invention, but not to limit the present invention. Any modifications and changes made to the present invention within the spirit and scope of the claims shall fall within the protection scope of the present invention.
[0118] The above description is only a preferred embodiment of the present invention. Therefore, all equivalent changes or modifications made to the structure, features and principles described in the claims of this patent application are included in the scope of this patent application.
Claims
1. A method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network, characterized in that, Includes the following steps: Step S1: Obtain videos of the cavitation evolution process of at least one propeller model under different operating conditions, and construct a dataset; the dataset includes labeled data and unlabeled data; Step S2: Construct a cavitation recognition and segmentation model; the cavitation recognition and segmentation model includes a cavitation segmentation network and a label encoding network; the cavitation segmentation network adopts a multi-level U-Net framework; the label encoding network adopts a multi-level encoder framework, the cavitation segmentation network and the label encoding network have the same depth, and the feature extraction module of each level of U-Net and encoder adopts a U-Net structure; Step S3: Train the cavitation recognition and segmentation model using the dataset to obtain the trained cavitation recognition and segmentation model; in each training round, supervised learning is performed using labeled data and cross-entropy loss and KL loss are calculated, and unsupervised learning is performed using unlabeled data and entropy loss is calculated; the total loss is obtained by combining cross-entropy loss, KL loss and entropy loss. Step S4: Input the image of the propeller at the rear of the ship into the trained cavitation recognition and segmentation model to obtain a predicted cavitation mask image as the recognition and segmentation result.
2. The method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network according to claim 1, characterized in that: The unsupervised learning includes: predicting unlabeled data during each training round and calculating the entropy loss of the prediction results; in at least one pre-selected specified round, selecting the unlabeled data with the highest entropy loss according to a preset ratio, labeling it, and updating the dataset.
3. The method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network according to claim 1, characterized in that: In the cavitation segmentation network, the first-level U-Net includes a first convolutional layer, two feature extraction modules, and a second convolutional layer connected in series; the last-level U-Net includes a pooling layer, a feature extraction module, and an upsampling layer connected in series; and all other levels of U-Net include a pooling layer, two feature extraction modules, and an upsampling layer connected in series. The image of the propeller at the rear of the ship is input into the first convolutional layer of the first-level U-Net for processing. The first feature extraction module receives the output of the convolutional layer. The output of the first feature extraction module and the output of the upsampling layer of the second-level U-Net are concatenated by feature concatenation and then processed by the second feature extraction module. The output of the second feature extraction module is processed by the second convolutional layer to obtain the recognition and segmentation result. For all U-Net levels except the first and last U-Net levels, the pooling layer of each U-Net receives and processes the output of the first feature extraction module in the previous U-Net level. The first feature extraction module receives the output of the pooling layer. The output of the first feature extraction module and the output of the upsampling layer of the next U-Net level are concatenated, and then processed by the second feature extraction module and the upsampling layer. The output of the upsampling layer is used to perform feature concatenation with the output of the first feature extraction module in the previous U-Net level. The output of the second feature extraction module is used to calculate the KL divergence with the encoder of the same level in the label coding network. In the final U-Net stage, the pooling layer receives and processes the output of the first feature extraction module in the previous U-Net stage. The output of the pooling layer is processed by the feature extraction module and the upsampling layer. The output of the upsampling layer is used to perform feature concatenation with the output of the first feature extraction module in the previous U-Net stage. The output of the feature extraction module is used to calculate the KL divergence with the encoder at the same level in the label coding network.
4. The method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network according to claim 3, characterized in that: In the label coding network, the first-level encoder consists of a convolutional layer and a feature extraction module, while the other encoders at each level consist of a pooling layer and a feature extraction module. The convolutional layer of the first-level encoder receives the label cavitation mask image. In each level of the encoder, the output of the feature extraction module and the U-Net of the same level of the cavitation segmentation network calculate the KL divergence. The weighted calculation result of the KL divergence of each level is used as the KL loss of the cavitation recognition and segmentation model.
5. The method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network according to claim 4, characterized in that: Both the cavitation segmentation network and the label encoding network consist of six levels. The U-Net and encoder at the same level use feature extraction modules with the same structure. In the encoding layers of each feature extraction module, the number of convolutional blocks is 7, 6, 5, 4, 4, and 4, respectively. The encoding layers of the fourth and fifth level feature extraction modules use dilated convolution.
6. The method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network according to claim 1, characterized in that: The cavitation mask image is a pixel-level annotation of the propeller image at the stern of the ship. The annotation types include background, normal area of the propeller surface, and cavitation area; in the cavitation area, different cavitation types correspond to different annotations.
7. The method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network according to claim 1, characterized in that: The cavitation types include one or more of sheet cavitation, tip vortex cavitation, bubble cavitation, and cloud cavitation.
8. The method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network according to claim 1, characterized in that: The operating conditions mentioned include rotational speed, flow rate, and pressure.
9. The method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network according to claim 1, characterized in that: In the dataset, the ratio of labeled data to unlabeled data is 20~100:2700~2800.
10. The method for identifying and segmenting cavitation in a ship's stern propeller based on a deep neural network according to claim 1, characterized in that: In step S3, the comprehensive processing is a weighted calculation.