Cavitation flow synchrotron radiation particle image velocity measurement method based on deep learning
Through a deep learning-based method, synchronous radiation X-ray imaging technology and the improved YOLOv5 object detection model are used to solve the problem of traditional technology being unable to accurately measure the flow field in the cavitation core area and particle detection under complex backgrounds, and efficient and accurate measurement of the cavitation flow field is achieved.
Patent Information
- Application Number
- CN202510178035.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-18
AI Technical Summary
Traditional laser PIV technology cannot accurately measure flow field information in opaque cavitation core areas, and it is difficult to accurately identify and detect overlapping small-scale circular tracers in complex contexts.
A deep learning-based method is adopted to capture cavitation X-ray images using synchronous radiation pulse X-ray rapid imaging technology, and an improved YOLOv5 object detection model is built, combining the small object detection module and the CBAM attention mechanism module, super-resolution preprocessing is used to use the diffusion model, and a cross-correlation analysis algorithm is used to calculate the cavitation flow field instantaneous velocity vector field.
It realizes accurate identification and detection of traced particles in complex backgrounds, overcomes the problem of traditional technology being blocked in cavitation areas, improves analysis efficiency, and accurately generates cavitation velocity field data.
Smart Images

Figure CN120014245A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of gas-liquid two-phase flow measurement, and in particular relates to a cavitation flow synchronous radiation particle image velocimetry method based on deep learning. Background Art
[0002] Particle image velocimetry (PIV) is the main method for measuring the velocity field of single-phase flow by recording and analyzing the movement of tracer particles in the fluid to derive the velocity information of the fluid. However, in cavitation flow, the strong scattering and reflection of the laser by the vapor-liquid mixture will mask the relatively weak scattered light of the surrounding tracer particles, thereby affecting the quality of particle imaging. The influence of this overexposure of cavitation structure on the PIV measurement accuracy can be avoided by using fluorescent particles. However, in the cavitation core area, there are a large number of cavitation bubbles between the laser sheet and the camera, and the light emitted by the fluorescent particles will be completely blocked. Therefore, traditional laser PIV technology cannot accurately measure the flow field information in the opaque cavitation core area.
[0003] Compared with traditional laser technology, synchrotron radiation X-rays have promoted the development of fast X-ray phase contrast imaging technology with their high frequency, extremely short pulses, high brightness, high collimation and good coherence. This technology successfully solves the problem that ordinary optical PIV methods are difficult to visualize tracer particles in the core area of cavitation. However, due to the imaging principle of synchrotron radiation X-rays, the signal-to-noise ratio between tracer particles and liquid background is low, and the presence of cavitation bubbles poses challenges to the matching process of particle images. The traditional PIV cross-correlation algorithm cannot be directly applied to the calculation of velocity fields. In order to obtain the velocity field in X-ray particle images, the first task is to accurately detect and extract tracer particles in the image. However, due to the limitation of the imaging method in the line of sight direction, there are usually a large number of tracer particles overlapping with bubbles and themselves in cavitation X-ray images, which significantly increases the complexity of particle detection. Traditional target detection algorithms rely on artificially designed features, have poor adaptability, low efficiency, limited accuracy, and are difficult to cope with complex scenes and real-time requirements. How to accurately identify and detect overlapping small-scale circular tracer particles in complex backgrounds has become a problem that needs to be solved urgently. Summary of the invention
[0004] In view of the shortcomings in the prior art, the present invention provides a cavitation flow synchrotron radiation particle image velocimetry method based on deep learning.
[0005] The present invention achieves the above technical objectives through the following technical means.
[0006] A synchrotron radiation particle image velocimetry method for cavitation flow based on deep learning, comprising:
[0007] Using synchrotron radiation pulsed X-ray rapid imaging technology, high temporal and spatial resolution cavitation X-ray images containing tracer particles are captured;
[0008] Build the neural network structure of the YOLOv5 target detection model, add a small target detection module and a CBAM attention mechanism module, and obtain an improved YOLOv5 target detection model;
[0009] The cavitation X-ray image is preprocessed with super-resolution using a diffusion model, and the image after super-resolution preprocessing is divided into four equal parts;
[0010] Use the dataset to train the improved YOLOv5 target detection model;
[0011] Use the trained YOLOv5 target detection model to predict the tracer particles in the segmented cavitation X-ray image, extract the grayscale value inside the particles, and generate the cavitation tracer particle image;
[0012] The cross-correlation analysis algorithm is applied to the generated cavitation tracer particle image pairs to calculate the instantaneous velocity vector field of the cavitation flow field.
[0013] Furthermore, the tracer particles have a size of 10 μm.
[0014] Furthermore, the YOLOv5 target detection model includes a backbone network, a multi-scale feature fusion module and a detection head; the backbone network is composed of convolutional layers to extract high-level semantic features from the input image; the multi-scale feature fusion module performs upsampling, downsampling and feature fusion operations on feature maps of different levels in the backbone network; and the detection head processes the fused feature maps.
[0015] Furthermore, the formation process of the small target detection module is: by upsampling the feature maps of each level in the backbone network, expanding the size of the feature maps, and fusing the enlarged feature maps with the feature maps of the corresponding levels, and then connecting them with the YOLOv5 target detection model network through downsampling.
[0016] Furthermore, the CBAM attention mechanism module converts the channel attention map M in the YOLOv5 target detection model c and the spatial attention map M s Attention map obtained by element-wise multiplication.
[0017] Furthermore, the diffusion model learns the deep features of the cavitation X-ray image, distinguishes the background from the target object, removes noise and enhances the target contour, and increases the image resolution.
[0018] Furthermore, the data set is an artificially generated simulated cavitation particle image data set having similar features to the cavitation X-ray image.
[0019] Furthermore, the training process of the improved YOLOv5 target detection model is:
[0020] First, define the value range of hyperparameters, including learning rate, batch size, and anchor box aspect ratio;
[0021] Secondly, select the evaluation index and use the intersection-over-union (IOU) of the predicted box and the actual box to judge the detection result. Under a given IOU threshold, calculate the precision p and recall r.
[0022] Finally, Bayesian optimization was used to obtain the optimal hyperparameter combination, and the model parameters were trained with the dataset to obtain a model for tracer particle prediction.
[0023] Furthermore, the cavitation tracer particle image pair is two frames of continuous cavitation tracer particle images.
[0024] Further, the cross-correlation analysis algorithm is a 4-channel diagnosis algorithm with window offset, and the size of the diagnosis window is gradually reduced in each channel.
[0025] The beneficial effects of the present invention are:
[0026] (1) The method of the present invention utilizes high-energy synchrotron radiation X-rays for imaging, which can overcome the limitation of conventional laser PIV technology that the tracer particles are blocked in the cavitation region.
[0027] (2) The method of the present invention uses artificially generated simulated cavitation particle images with particle position parameter labels as the data set for model training, which can reduce the cost required for manual annotation of experimental images.
[0028] (3) The target detection algorithm based on deep learning in the method of the present invention solves the detection problems such as a large number of tracer particles, small size, a large amount of overlap between particles, and some particles being blocked by bubbles. The trained tracer particle target detection model can accurately identify the particle position, calculate the displacement and generate cavitation velocity field data, thereby greatly improving the analysis efficiency. It is particularly suitable for experimental environments that need to process large amounts of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flowchart of the implementation steps of the present invention;
[0030] FIG2( a ) is the first frame of the X-ray image of the cavitation flow field taken by the synchrotron radiation experiment described in the embodiment;
[0031] FIG2( b ) is the second frame of the X-ray image pair of the cavitation flow field taken by the synchrotron radiation experiment described in the embodiment;
[0032] Figure 3 Schematic diagram of the network structure of the target detection model used in the embodiment;
[0033] Figure 4An example of an image that generates a data set in an embodiment;
[0034] FIG5( a ) is a result of particle position detection in an embodiment;
[0035] FIG5( b ) is a cavitation tracer particle image generated according to particle position detection in an embodiment;
[0036] Figure 6 is the cavitation instantaneous velocity vector field calculated in the embodiment. DETAILED DESCRIPTION
[0037] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments, but the protection scope of the present invention is not limited thereto.
[0038] Embodiment: The present invention provides a cavitation flow synchrotron radiation particle image velocimetry method based on deep learning. Figure 1 It is a flow chart for realizing the present invention, which comprises the following steps:
[0039] Step 1: Add 10μm-scale tracer particles into the cavitation water tunnel, stir evenly, adjust the water tunnel flow rate and pressure and other parameters, so that typical cavitation occurs in the throat area of the Venturi-type experimental section of the water tunnel. The cavitation flow is imaged and measured using the third-generation high-energy synchrotron radiation pulsed X-rays, and high-speed cameras are used to capture high-temporal and spatial resolution cavitation X-ray images containing tracer particles. Figure 2(a) and Figure 2(b) are two consecutive frames of cavitation X-ray images captured by the synchrotron radiation experiment, with a time interval Δt=3.68μs between the two images. The resolution of the cavitation X-ray image is 704×688 pixels, where 1 pixel corresponds to 2μm.
[0040] In the cavitation X-ray image, the tracer particles appear as regular circles with a diameter between 4 and 13 pixels, while the circular or irregular outlines with size deviations are judged as cavitation bubbles. The characteristics of the tracer particles in the cavitation X-ray image are: a large number of particles with small sizes, a large amount of overlap between particles, and some particles are blocked by cavitation bubbles.
[0041] Step 2: Build the YOLOv5 target detection model network structure under the PyTorch deep learning framework. The YOLOv5 target detection model consists of a backbone network (Backbone), a multi-scale feature fusion module (Neck) and a detection head (Head). The backbone network consists of a series of convolutional layers, which are used to extract high-level semantic features from the input image. The multi-scale feature fusion module performs upsampling, downsampling and feature fusion operations on the feature maps of different levels in the backbone network to obtain multi-scale feature information. The detection head processes the fused feature map and predicts the category, location information and confidence score of the target.
[0042] In this embodiment, the YOLOv5 target detection model is improved according to the characteristics of the tracer particles in the cavitation X-ray image described in step 1. Specifically, a small target detection module and a CBAM attention mechanism module are added to the original model. The network structure of the improved model is as follows: Figure 3 shown.
[0043] The small target detection module is a module specifically designed for small target detection, which is formed by upsampling the feature maps of each level in the backbone network, expanding the size of the feature maps, fusing the enlarged feature maps with the feature maps of the corresponding levels, and then connecting them with the YOLOv5 target detection model network through downsampling. This module can further improve the detection accuracy of small targets.
[0044] The CBAM attention mechanism module is implemented by converting the channel attention map M in the YOLOv5 target detection model c and the spatial attention map M s The attention map obtained by element-by-element multiplication. After the CBAM attention mechanism module is introduced into the downsampling of the feature extraction stage, it can effectively suppress the interference of background noise and objects unrelated to the target, helping the model to focus on key features more accurately. The CBAM attention mechanism module is also added before each layer of detection head to enhance the expression ability of target-related features and reduce the complexity of subsequent calculations.
[0045] Step 3: Use the diffusion model to perform super-resolution preprocessing on the cavitation X-ray image. The diffusion model does not simply interpolate and amplify the cavitation X-ray image, but effectively distinguishes the background from the target object by learning the deep features of the image, removes noise, enhances the target contour, and increases the image resolution. This step can improve the recognition of the target and thus improve the accuracy of target detection. In this embodiment, the resolution of the cavitation X-ray image is increased by two times, that is, 1408×1376 pixels, and the image after super-resolution preprocessing is divided into four equal parts to reduce the number of targets that need to be detected in a single image.
[0046] Step 4: Artificially generate a simulated cavitation particle image dataset and corresponding particle position parameter labels with similar features to the cavitation X-ray image for neural network training. The generation process of each data item in the dataset is as follows: manually select some tracer particle samples from the experimental image after super-resolution preprocessing in step 3 to build a benchmark particle library; use the CV2 library to generate a complex background image similar to the experimental image, randomly select particle samples from the benchmark particle library, copy them to random positions in the background image, and record the position parameters as labels; scale the particle samples before copying the particles to ensure that the particle size is normally distributed within a predetermined range; the final simulated cavitation particle image is as follows: Figure 4In this embodiment, the constructed data set includes 5000 images and corresponding labels, which are divided into a training set, a validation set and a test set in a ratio of 5:3:2.
[0047] Step 5: Use the data set generated in step 4 to train the parameters of the improved YOLOv5 target detection model. The specific steps are:
[0048] (5.1) Define the value ranges of hyperparameters such as learning rate, batch size, and anchor box aspect ratio;
[0049] (5.2) Select the evaluation index and use the intersection-over-union (IOU) of the predicted box and the actual box to determine whether the detection result is correct or not. The calculation formula is:
[0050] IOU=(Intersection Area) / (Union Area)
[0051] Wherein, Intersection Area represents the area of the overlapped part of the predicted box and the true box, and Union Area represents the total area covered by the predicted box and the true box. In this embodiment, the intersection-union ratio threshold is set to 0.5, and the precision (p) and recall (r) are calculated using the following calculation formulas:
[0052]
[0053] Among them, T P Indicates the number of positive samples detected correctly, F N Indicates the number of positive samples predicted as negative samples by mistake, F P Indicates the number of negative samples that are incorrectly predicted as positive samples;
[0054] (5.3) Bayesian optimization is used to obtain the optimal hyperparameter combination, and the simulated cavitation particle image dataset generated in step 4 is used to train the model to obtain the parameters, thereby obtaining a model that can be used for tracer particle prediction.
[0055] Step 6: Use the YOLOv5 target detection model trained in step 5 to predict the tracer particles in the cavitation X-ray image segmented in step 3, as shown in Figure 5(a). Save the internal grayscale value of the tracer particles in the prediction box in the cavitation X-ray image, remove the background, and merge the four equally divided images to obtain a complete cavitation tracer particle image with a pure black background, as shown in Figure 5(b).
[0056] Step 7: Apply the cross-correlation analysis algorithm to the two consecutive frames of cavitation tracer particle images obtained in step 6 to calculate the transient velocity vector field of the cavitation flow field; in this embodiment, the cross-correlation analysis algorithm is a 4-channel diagnosis algorithm with window offset, and the size of the diagnosis window is gradually reduced in each channel; during the diagnosis process, the maximum window size is set to 80×70 pixels to limit the number of particles lost in the window; the minimum window size is 50×40 pixels to ensure that the number of matching particle pairs in the window is greater than 4; the calculated cavitation transient velocity vector field is as follows Figure 6 shown.
[0057] The embodiments are preferred implementations of the present invention, but the present invention is not limited to the above-mentioned implementations. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essential content of the present invention belong to the protection scope of the present invention.
Claims
1. A cavitation flow synchrotron radiation particle image velocimetry method based on deep learning, characterized by: Using synchrotron radiation pulsed X-ray rapid imaging technology, high temporal and spatial resolution cavitation X-ray images containing tracer particles are captured; Build the neural network structure of the YOLOv5 target detection model, add a small target detection module and a CBAM attention mechanism module, and obtain an improved YOLOv5 target detection model; The cavitation X-ray image is preprocessed with super-resolution using a diffusion model, and the image after super-resolution preprocessing is divided into four equal parts; Use the dataset to train the improved YOLOv5 target detection model; Use the trained YOLOv5 target detection model to predict the tracer particles in the segmented cavitation X-ray image, extract the grayscale value inside the particles, and generate the cavitation tracer particle image; The cross-correlation analysis algorithm is applied to the generated cavitation tracer particle image pairs to calculate the instantaneous velocity vector field of the cavitation flow field.
2. The method for cavitation flow synchrotron radiation particle image velocimetry based on deep learning according to claim 1, characterized in that: The tracer particles are on the order of 10 μm.
3. The method for cavitation flow synchrotron radiation particle image velocimetry based on deep learning according to claim 1, characterized in that: The YOLOv5 target detection model includes a backbone network, a multi-scale feature fusion module and a detection head; the backbone network is composed of convolutional layers to extract high-level semantic features from the input image; the multi-scale feature fusion module performs upsampling, downsampling and feature fusion operations on feature maps of different levels in the backbone network; the detection head processes the fused feature maps.
4. The method for cavitation flow synchrotron radiation particle image velocimetry based on deep learning according to claim 3 is characterized in that: The formation process of the small target detection module is as follows: upsampling the feature maps of each level in the backbone network, expanding the size of the feature maps, fusing the enlarged feature maps with the feature maps of the corresponding levels, and then connecting them with the YOLOv5 target detection model network through downsampling.
5. The method for cavitation flow synchrotron radiation particle image velocimetry based on deep learning according to claim 3, characterized in that: The CBAM attention mechanism module is to convert the channel attention map M in the YOLOv5 target detection model c and the spatial attention map M s Attention map obtained by element-wise multiplication.
6. The method for cavitation flow synchrotron radiation particle image velocimetry based on deep learning according to claim 1, characterized in that: The diffusion model learns the deep features of cavitation X-ray images, distinguishes background from target objects, removes noise and enhances target contours, and increases image resolution.
7. The method for cavitation flow synchrotron radiation particle image velocimetry based on deep learning according to claim 1, characterized in that: The data set is an artificially generated simulated cavitation particle image data set having similar features to a cavitation X-ray image.
8. The method for cavitation flow synchrotron radiation particle image velocimetry based on deep learning according to claim 7, characterized in that: The training process of the improved YOLOv5 target detection model is: First, define the value range of hyperparameters, including learning rate, batch size, and anchor box aspect ratio; Secondly, select the evaluation index and use the intersection-over-union (IOU) of the predicted box and the actual box to judge the detection result. Under a given IOU threshold, calculate the precision p and recall r. Finally, Bayesian optimization was used to obtain the optimal hyperparameter combination, and the model parameters were trained with the dataset to obtain a model for tracer particle prediction.
9. The method for cavitation flow synchrotron radiation particle image velocimetry based on deep learning according to claim 1, characterized in that: The cavitation tracer particle image pair is two frames of continuous cavitation tracer particle images.
10. The method for cavitation flow synchrotron radiation particle image velocimetry based on deep learning according to claim 1, characterized in that: The cross-correlation analysis algorithm is a 4-channel diagnostic algorithm with window offset and gradually reduces the size of the diagnostic window in each channel.
Citation Information
Patent Citations
Particle image velocity measurement method and device based on deep learning
CN113139989A
Infrared weak and small target detection method based on infrared small sample amplification and YOLOv5
CN115861599A
Multi-target fault detection method based on improved YOLOv5s
CN117994500A
Velocity measurement method, system, device and apparatus and storage medium, as well as velocity field measurement method and system
US20240221184A1