A tracking particle image velocimetry method using a pwc-net with cascaded attention mechanism

By using the PWC-Net optical flow neural network with a cascaded attention mechanism, combined with deep learning and PIV technology, the problems of insufficient accuracy and efficiency in velocity field analysis of tracer particle images are solved, and high-precision and high-efficiency velocity field extraction is achieved.

CN115496781BActive Publication Date: 2026-02-24NANJING UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211268651.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-17
Publication Date
2026-02-24
Estimated Expiration
2042-10-17

AI Technical Summary

Technical Problem

Existing cross-correlation analysis and optical flow methods suffer from insufficient spatial resolution and robustness in velocity field analysis of tracer particle images, especially in complex flow scenarios where they struggle to meet the requirements of high precision and high efficiency.

Method used

The PWC-Net optical flow neural network, which employs a cascaded attention mechanism, combines deep learning and PIV technology. By training on a tracer particle image dataset, the optical flow neural network is constructed. Gaussian filtering and normalization are used to process the images, and the velocity field is calculated to improve the accuracy and efficiency of the analysis.

Benefits of technology

It achieves high-precision analysis of tracer particle images in complex flow scenarios, while significantly improving computational efficiency and accurately extracting dense velocity fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115496781B_ABST
    Figure CN115496781B_ABST
Patent Text Reader

Abstract

The application discloses a kind of tracking particle image velocity field analysis methods of cascading attention mechanism PWC-Net, using the way of supervised learning to solve the problem of extracting velocity field from 2-D tracking particle image;The method comprises the following steps: preparing tracking particle image dataset, building optical flow neural network model, reading tracking particle image, preprocessing, network operation;Network model is mainly with PWC-Net as framework, combined with the optical flow neural network of attention mechanism, the optical flow neural network model is obtained by training, the input is two frames of tracking particle image, and the output is the velocity vector field of each pixel point on tracking particle image.Application of the present application can obtain high-resolution, high-precision velocity field from tracking particle image, while improving the operation efficiency of tracking particle image velocity field analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for extracting the velocity field of tracer particle images using deep learning technology, and more particularly to a method for analyzing the velocity field of tracer particle images using a PWC-Net with a cascaded attention mechanism. Background Technology

[0002] For extracting the velocity field from tracer particle images, particle image velocimetry (PIV) is currently the primary technique. This is a non-contact, instantaneous, full-field flow measurement technique that overcomes the limitations of single-point velocimetry by simultaneously recording the velocity distribution across the entire field, providing rich information on the spatial structure and flow characteristics of the flow field. During the flow field measurement, tracer particles are dispersed into the flow field to be measured, the area is illuminated by a laser light source, and an image acquisition system simultaneously acquires images of the area. The resulting tracer particle images are then processed to obtain the velocity distribution of the flow field. Throughout the entire measurement process, the PIV system does not contact the flow field and therefore does not interfere with it.

[0003] Cross-correlation analysis (CCI) and optical flow are currently the mainstream algorithms for analyzing the velocity field of tracer particle images. CCI extracts a window (query window) from image pairs and performs correlation calculations, then finds the direction with the highest correlation as the displacement vector for that window. Optical flow calculates the actual displacement of particles by extracting information such as grayscale, object structure, and physical motion from the image sequence. Both CCI and optical flow can meet the measurement requirements of most simple flow scenarios; however, for complex flow phenomena, these algorithms still have room for improvement in terms of spatial resolution, application scenarios, and robustness.

[0004] The analysis of velocity fields in tracer particle images can be considered a computer vision problem involving motion estimation from images. With the successful application of deep learning in computer vision tasks, using deep learning to estimate motion has become a very important research direction. However, since traditional methods have been developed for decades, deep learning methods have not outperformed mature traditional methods in every aspect. Therefore, in the field of tracer particle image velocity field analysis, deep learning methods still have significant room for improvement in both accuracy and execution efficiency. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of cross-correlation analysis and optical flow methods in PIV by providing a cascaded attention mechanism-based PWC-Net method for velocity field analysis of tracer particle images. This method combines deep learning with PIV technology, ensuring high analysis accuracy for tracer particle images with complex flow while improving computational efficiency.

[0006] The technical solution to achieve the objective of this invention is as follows: Firstly, this invention provides a method for analyzing the velocity field of tracer particle images using a cascaded attention mechanism PWC-Net, comprising the following steps:

[0007] Step 1: Prepare the tracer particle image dataset;

[0008] Step 2: Build and train the optical flow neural network;

[0009] Step 3: Read the tracer particle image;

[0010] Step 4: Preprocess the read tracer particle images;

[0011] Step 5: Calculate the velocity field using the trained network model.

[0012] Further, step 1 specifically involves training an optical flow neural network using the public dataset PIV_dataset, which includes tracer particle images and their corresponding velocity field labels. Each data item used for training contains two consecutive frames of tracer particle images I1 and I2 and their corresponding velocity vector field ω. The data item is generated in one of the following two ways: A. The tracer particle image is generated from the existing velocity field ω; B. The velocity field ω is generated from the existing tracer particle image.

[0013] Furthermore, the process of generating tracer particle images from the existing velocity field ω is as follows: first, a tracer particle image I is randomly generated; then, the existing velocity vector field ω is applied to the generated tracer particle image I to obtain tracer particle image pairs I1 and I2; the tracer particle image I is generated by a tracer particle image simulator, and the shape of each particle in the tracer particle image satisfies the following Gaussian distribution:

[0014]

[0015] Where (x,y) are the 2-D coordinates in the tracer particle image, (x0,y0) are the center position of the tracer particle, I is the gray level of a single particle, I0 is the gray level of the particle center, and d p The particle diameter is ρ; the number of particles in the tracer particle image is determined by the particle density ρ. After selecting ρ to determine the number of particles in the tracer particle image, I0 and d are specified for each particle. p The values ​​of (x0, y0) can be used to determine a tracer particle image; the velocity vector field ω includes various fluid motion scenarios, including uniform flow field, reverse stepped flow field, cylinder flow field, free turbulent flow field, ocean surface current field, and isotropic turbulent flow field.

[0016] Furthermore, the process of generating the velocity field ω from the existing tracer particle images is as follows: based on the particle distribution of the two existing tracer particle images I1 and I2, the velocity field ω is calculated using the optical flow method.

[0017] Furthermore, step 2 includes the following steps:

[0018] (1) Obtain the network model ω=F(I1,I2), where I1 and I2 are the two frames of tracer particle images input, ω is the velocity vector field between the two frames of tracer particle images output, and F is the mapping function relationship of the optical flow neural network;

[0019] (2) Set the objective function of the network: The objective function is set as the error between the output velocity field and the label velocity field, and is determined by the following formula:

[0020]

[0021] Where k represents different levels, L k Let λ be the error between the output velocity field of the k-th layer and the label velocity field. k The weights of the error at the k-th layer are:

[0022] (3) Train the network with the tracer particle image dataset generated in step 1 to obtain an optical flow neural network model that can be used for velocity field analysis of tracer particle images.

[0023] Furthermore, in step 3, reading the tracer particle image refers to acquiring two frames of original tracer particle images I within a time interval of Δt. 11 I 12 .

[0024] Furthermore, in step 4, a Gaussian filter function of size 5×5 and variance 1 is first applied to the two acquired original tracer particle images I. 11 I 12 The image is then filtered, and the filtered tracer particle image is then converted to grayscale and normalized.

[0025] Furthermore, in step 5, the network model trained in step 2 is used to calculate and obtain the velocity vector field ω generated by the optical flow neural network analysis.

[0026] In a second aspect, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described in the first aspect.

[0027] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0028] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention uses an optical flow neural network for velocity field analysis of tracer particle images, which improves computational efficiency while ensuring high accuracy; the optical flow neural network is trained using a tracer particle image dataset, which can accurately extract dense velocity fields from two frames of tracer particle images, that is, it can provide the velocity vector corresponding to each pixel in the tracer particle image; compared with the traditional tracer particle image velocity field analysis method based on cross-correlation, the present invention can effectively analyze the velocity field of tracer particle images and reduce computation time. Attached Figure Description

[0029] Figure 1 This is a flowchart illustrating the implementation steps of the present invention.

[0030] Figure 2 The diagram illustrates the data generation process described in the embodiment, where (a) is the existing velocity vector field ω, (b) is a randomly generated tracer particle image, (c) the first frame of tracer particle image is generated by moving particles backward by 0.5ω, and (d) the second frame of tracer particle image is generated by moving particles forward by 0.5ω.

[0031] Figure 3 The diagram below illustrates the data generation process described in the embodiment, where (a) is an existing first frame tracer particle image, (b) is an existing second frame tracer particle image, and (c) is the velocity vector field ω calculated using the optical flow method.

[0032] Figure 4 This is a schematic diagram illustrating the acquisition of tracer particle images for the experiment described in the embodiment.

[0033] Figure 5 This is a schematic diagram of the optical flow neural network described in the embodiment.

[0034] Figure 6(a) is a schematic diagram of the attention mechanism block described in the embodiment, Figure 6(b) is a schematic diagram of the channel attention structure in Figure 6(a), and Figure 6(c) is a schematic diagram of the spatial attention structure in Figure 6(a).

[0035] Figure 7 The diagram shows the input and output results of the optical flow neural network described in the embodiment. Detailed Implementation

[0036] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] This invention provides a method for velocity field analysis of tracer particle images using a cascaded attention mechanism optical flow neural network. It employs a supervised learning optical flow neural network to extract the velocity field from 2-D tracer particle images.

[0038] like Figure 1As shown, this method uses the PWC-Net optical flow neural network as the main framework to extract and analyze the velocity field from 2-D tracer particle images, including the following steps:

[0039] Step 1: Prepare the tracer particle image dataset;

[0040] The public dataset PIV_dataset used is a large number of artificially generated tracer particle images and corresponding velocity field labels, which are used to train the optical flow neural network. Each data item used for training contains two consecutive frames of tracer particle images I1 and I2 and the corresponding velocity vector field ω.

[0041] In this embodiment of the invention, the data item is generated in one of the following two ways: A. Generate a tracer particle image from an existing velocity field ω; B. Generate a velocity field ω from an existing tracer particle image.

[0042] The process of A is as follows: Figure 2 As shown, specifically: first, a tracer particle image I is randomly generated; then, the existing velocity vector field ω is applied to the generated tracer particle image I to obtain tracer particle image pairs I1 and I2. In this embodiment, the first frame tracer particle image I1 is generated by moving the particle backward by 0.5ω, and the second frame tracer particle image I2 is generated by moving the particle forward by 0.5ω.

[0043] In this embodiment of the invention, the tracer particle image I is generated by a tracer particle image simulator, and the morphology of each particle in the tracer particle image satisfies the following Gaussian distribution:

[0044]

[0045] Where (x,y) are the 2-D coordinates in the tracer particle image, (x0,y0) are the center position of the tracer particle, I is the gray level of a single particle, I0 is the gray level of the particle center, and d p Let I be the particle diameter. The parameters for each particle are I0 and d. p (x0, y0) can be different. Furthermore, the number of particles in the tracer particle image is determined by the particle density ρ. After selecting ρ to determine the number of particles in the tracer particle image, I0 and d are specified for each particle. p By combining the values ​​of (x0, y0), a tracer particle image can be determined. The velocity vector field ω encompasses various fluid motion scenarios, including uniform flow fields, reverse stepped flow fields, flow around a cylinder, free turbulent flow fields, ocean surface current fields, and isotropic turbulent flow fields. This embodiment... Figure 2 The diagram shows the process of generating tracer particle image pairs.

[0046] The process of B is as follows: Figure 3 As shown, specifically: using as Figure 4 The method shown acquires two frames of tracer particle images I1 and I2. By scattering tracer particles into the measured flow field (the motion of the tracer particles in the flow field reflects the global velocity field), illuminating the measured flow field region with a laser light source, and simultaneously acquiring two consecutive frames of tracer particle images within a time interval Δt using a camera. The experimentally acquired tracer particle images require preprocessing. This invention uses a Gaussian filter function to filter the tracer particle images to suppress image noise. In this embodiment, the variational optical flow method is used to calculate the velocity field of the tracer particle images, and the optical flow method is achieved by optimizing and solving the following objective function:

[0047]

[0048] in, For gradient operators, λ is an adjustable parameter. The velocity field ω(x,y)=(u,v) can be obtained by solving the above equation using gradient descent. T .

[0049] In this embodiment of the invention, more than 13,000 pairs of tracer particle images I1, I2 and velocity vector field ω are generated according to the two methods A and B.

[0050] Step 2: Build and train the optical flow neural network;

[0051] In this embodiment of the invention, the network model described in step 2 can be represented as ω = F(I1, I2), where I1 and I2 are the two input frames of tracer particle images, ω is the velocity vector field between the two output frames of tracer particle images, and F is the mapping function relationship of the optical flow neural network. Specifically, building the network structure and training the network using the dataset from step 1 includes:

[0052] (1) Building the network structure model. The original PWC-Net optical flow network consists of five parts: a feature pyramid extractor, a warp transform layer, a cost volume layer, an optical flow encoder, and a context network. In this embodiment, the network model is an improvement on the original PWC-Net optical flow network, such as... Figure 5 As shown in Figure 6(a), an attention mechanism block is cascaded after the cost volume layer and in the optical flow decoder at each level. Figures 6(b) and 6(c) show the channel attention mechanism block and spatial attention mechanism block of this attention mechanism block, respectively. This step can further enhance the feature extraction capability of the network. A velocity extraction operation is added before the original context network layer, and the interpolation module of the original network structure is changed to a deconvolution layer. This step can further extract the small-scale structure of the optical flow field. The network is a fully convolutional neural network. The input is two frames of tracer particle images, and the output is a velocity vector field of the same size.

[0053] (2) Set the objective function and total loss function of the network: The objective function is set as the error between the output velocity field and the label velocity field, and is calculated according to the following formula:

[0054]

[0055] Where k represents different levels, L k Let λ be the error between the output velocity field of the k-th layer and the label velocity field. k Let be the weight of the error at the k-th layer. The weight of the output at the last layer is much greater than the weight of the outputs at other scales.

[0056] (3) Training the network. The optical flow neural network is trained using the public dataset PIV_dataset. In this embodiment of the invention, an adaptive momentum optimization algorithm is used to train the network, thereby obtaining an optical flow neural network model that can be used for velocity field analysis of tracer particle images.

[0057] Step 3: Read the tracer particle image;

[0058] In this embodiment of the invention, reading the tracer particle images refers to reading two frames of original tracer particle images I obtained from a real experiment. 11 I 12 The experimental method for obtaining images of tracer particles is as follows: Figure 4 As shown, two frames of original tracer particle images are acquired within a time interval of Δt.

[0059] Step 4: Preprocess the read tracer particle images;

[0060] In this embodiment, the preprocessing of the read tracer particle images refers to performing noise suppression and data transformation on the original tracer particle images to adapt them to network requirements before substituting them into the trained optical flow neural network. In this embodiment, a Gaussian filter function of size 5×5 and variance 1 is first used to process the two frames of the acquired original tracer particle images I. 11 I 12 Image noise is suppressed by filtering, and then the filtered tracer particle image is grayscaled and normalized.

[0061] Step 5: Calculate the velocity field using the trained network model;

[0062] like Figure 7 As shown, calculating the velocity field using the trained network model refers to processing the pre-processed tracer particle image I... 11 I 12 As input, the network model trained in step 2 is used to calculate the velocity vector field ω.

Claims

1. A method for analyzing the velocity field of tracer particle images using an optical flow neural network with a cascaded attention mechanism, characterized in that, Includes the following steps: Step 1: Prepare the tracer particle image dataset; specifically: train the optical flow neural network using the public dataset PIV_dataset, which contains tracer particle images and their corresponding velocity field labels; each data item used for training contains two consecutive tracer particle images I1 and I2 and the corresponding velocity vector field ω. The data item is generated in one of the following two ways: A. Generate tracer particle images from existing velocity fields ω; B. Generate velocity fields ω from existing tracer particle images; the process of generating tracer particle images from existing velocity fields ω is as follows: first, randomly generate a tracer particle image I, and then apply the existing velocity vector field ω to the generated tracer particle image I to obtain the tracer particle image pair I1 and I2; the tracer particle image I is generated by a tracer particle image simulator, and the morphology of each particle in the tracer particle image satisfies the following Gaussian distribution: Where (x,y) are the 2-D coordinates in the tracer particle image, (x0,y0) are the center position of the tracer particle, I is the gray level of a single particle, I0 is the gray level of the particle center, and d p The particle diameter is ρ; the number of particles in the tracer particle image is determined by the particle density ρ. After selecting ρ to determine the number of particles in the tracer particle image, I0 and d are specified for each particle. p The values ​​of (x0, y0) can be used to determine a tracer particle image; the velocity vector field ω includes various fluid motion scenarios, including uniform flow field, reverse stepped flow field, flow around a cylinder, free turbulent flow field, ocean surface current field, and isotropic turbulent flow field; Step 2: Build and train the optical flow neural network, including the following steps: (1) Obtain the network model ω=F(I1,I2), where I1 and I2 are the two frames of tracer particle images input, ω is the velocity vector field between the two frames of tracer particle images output, and F is the mapping function relationship of the optical flow neural network; (2) Set the objective function of the network: The objective function is set as the error between the output velocity field and the label velocity field, and is determined by the following formula: Where k represents different levels, L k Let λ be the error between the output velocity field of the k-th layer and the label velocity field. k The weights of the error at the k-th layer are used. (3) Train the network with the tracer particle image dataset generated in step 1 to obtain an optical flow neural network model that can be used for velocity field analysis of tracer particle images; Step 3: Read the tracer particle image; Step 4: Preprocess the read tracer particle images; Step 5: Calculate the velocity field using the trained network model.

2. The method for analyzing the velocity field of tracer particle images using an optical flow neural network with a cascaded attention mechanism according to claim 1, characterized in that, The process of generating the velocity field ω from the existing tracer particle images is as follows: based on the particle distribution of the two existing tracer particle images I1 and I2, the velocity field ω is calculated using the optical flow method.

3. The method for analyzing the velocity field of tracer particle images using an optical flow neural network with a cascaded attention mechanism according to claim 1, characterized in that, In step 3, reading the tracer particle image refers to acquiring two frames of original tracer particle image I within a time interval Δt. 11 I 12 .

4. The method for analyzing the velocity field of tracer particle images using an optical flow neural network with a cascaded attention mechanism according to claim 3, characterized in that, In step 4, a Gaussian filter function of size 5×5 and variance 1 is first applied to the two original tracer particle images I obtained. 11 I 12 The image is then filtered, and the filtered tracer particle image is then converted to grayscale and normalized.

5. The method for analyzing the velocity field of tracer particle images using an optical flow neural network with a cascaded attention mechanism according to claim 4, characterized in that, In step 5, the network model trained in step 2 is used to calculate and obtain the velocity vector field ω generated by the optical flow neural network analysis.

6. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method described in any one of claims 1-5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any of claims 1-5.

Citation Information

Patent Citations

  • Particle image speed measuring method based on convolutional neural network

    CN109669049A