Flow velocity identification method and device based on improved U-Net network model
By improving the U-Net network model, the river image data is processed, and features are extracted and fused to identify flow velocity, the problem of low speed measurement accuracy in complex scenarios is solved, and higher flow velocity recognition accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202510646043.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-06-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing water flow speed measurement method has low speed measurement accuracy in complex scenarios, especially the problem of decreasing high flow rate recognition accuracy.
Using the improved U-Net network model, the image sequence is input into the improved U-Net network model for flow velocity recognition by sampling, random cropping, and color transformation of river image data. The model includes a fusion portion and a deconstructed portion for extracting and fusing the features of the image sequence, outputting flow velocity prediction values and flow velocity distribution maps.
It improves the accuracy and recognition efficiency of flow velocity, and can more accurately measure the water flow velocity.
Smart Images

Figure CN120182324A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flow velocity measurement, and particularly to a flow velocity identification method and device based on an improved U-Net network model. Background Art
[0002] With the continuous progress of technology, significant advancements have been made in water flow velocity measurement technology. Currently, commonly used water flow velocity measurement methods mainly include the differential pressure method, Doppler velocity measurement method, radar velocity measurement method, etc. These methods are widely used in different water flow velocity measurement scenarios due to their unique advantages and disadvantages. For example, the Doppler velocity measurement method is highly favored for its high precision and real-time performance; the radar velocity measurement method is widely used in difficult-to-access measurement environments due to its remote measurement and non-contact characteristics.
[0003] Traditional water flow velocity measurement methods have limitations in some complex scenarios, which has prompted researchers to explore new technical means. In recent years, deep learning methods have received much attention due to their powerful data processing capabilities. In this context, a velocity measurement method based on the optical flow + Particle Image Velocimetry (PIV) mode has emerged. This method combines the advantages of the optical flow method and PIV technology, and can measure the water flow velocity more accurately, providing a new solution for water flow velocity measurement. However, existing deep learning flow measurement methods still suffer from the problems of a lack of optical flow pre-training models and a decline in high-flow velocity identification accuracy. Summary of the Invention
[0004] In view of this, the present invention provides a flow velocity identification method and device based on an improved U-Net network model to solve the problem of low measurement accuracy of current water flow velocity measurement methods.
[0005] To solve the above technical problems, in a first aspect, the present invention provides a flow velocity identification method based on an improved U-Net network model, the method comprising: Sampling the collected river image data to obtain sampled image data; Randomly cropping the sampled image data according to a preset size to obtain cropped images, and the ratio of the river channel area in each cropped image to the total area of the cropped image is not less than 10%; Performing color transformation on the cropped images according to a preset random probability to obtain an image sequence, and the color transformation includes at least one of brightness transformation, contrast transformation, saturation transformation, and hue transformation; Input the image sequence into the improved U-Net network model for flow velocity identification to obtain the flow velocity prediction result of the river channel. Among them, the improved U-Net network model includes a fusion part and a deconstruction part connected to the fusion part. The fusion part is used to extract and fuse features of the input image sequence to obtain a flow velocity prediction value. The deconstruction part is used to perform channel splicing and feature fusion on the feature map output by the fusion part to obtain a flow velocity distribution map.
[0006] Optionally, the fusion part includes a first convolutional layer, a plurality of fusion layers connected in sequence, and a compression layer. The output of the first convolutional layer is connected to the input of the first fusion layer, and the output of the last fusion layer is connected to the input of the compression layer. The deconstruction part includes a second convolutional layer and a plurality of deconstruction layers connected in sequence. The number of fusion layers is the same as the number of deconstruction layers. The input of the first deconstruction layer is connected to the output of the last fusion layer, and the output of the last deconstruction layer is connected to the input of the second convolutional layer. And the output of the m-th fusion layer is subjected to channel splicing with the output of the corresponding (n - m)-th deconstruction layer, where n is the number of fusion layers, n is a positive integer, m ∈ n, and m ≠ n.
[0007] Optionally, the fusion layer includes a first depth convolutional layer, a first transformation layer, and a first channel fusion layer connected in sequence. The first depth convolutional layer is used to downsample the input feature map. The first transformation layer is used to extract the dimensions of the output feature map of the first depth convolutional layer. The first channel fusion layer is used to fuse the output feature map of the first transformation layer in the time dimension and the channel dimension.
[0008] Optionally, the deconstruction layer includes a second depth convolutional layer, a second transformation layer, and a second channel fusion layer. The second depth convolutional layer is used to upsample the output of the previous deconstruction layer. The second transformation layer is used to perform dimensional transformation on the output of the corresponding fusion layer. After the output of the second depth convolutional layer is subjected to channel splicing with the output of the second transformation layer, it is input to the second channel fusion layer. The second channel fusion layer is used to perform channel fusion on the input feature map.
[0009] Optionally, the first depth convolutional layer adopts a VGG deep convolutional neural network.
[0010] In a second aspect, the present invention also provides a flow velocity identification device based on the improved U-Net network model. The device includes: A sampling module, configured to sample the collected river image data to obtain sampled image data; A cropping module, configured to randomly crop the sampled image data according to a preset size to obtain a cropped image. The ratio of the river channel area in each cropped image to the total area of the cropped image is not less than 10%; A color transformation module for performing color transformation on the cropped image according to a preset random probability to obtain an image sequence, where the color transformation includes at least one of brightness transformation, contrast transformation, saturation transformation, and hue transformation; An identification module for inputting the image sequence into an improved U-Net network model for flow velocity identification to obtain a flow velocity prediction result of the river channel. The improved U-Net network model includes a fusion part and a deconstruction part connected to the fusion part. The fusion part is used for feature extraction and fusion of the input image sequence to obtain a flow velocity prediction value, and the deconstruction part is used for channel splicing and feature fusion of the feature map output by the fusion part to obtain a flow velocity distribution map.
[0011] Optionally, the fusion part includes a first convolutional layer, a plurality of fusion layers connected in sequence, and a compression layer. The output of the first convolutional layer is connected to the input of the first fusion layer, and the output of the last fusion layer is connected to the input of the compression layer; the deconstruction part includes a second convolutional layer and a plurality of deconstruction layers connected in sequence. The number of fusion layers is the same as the number of deconstruction layers. The input of the first deconstruction layer is connected to the output of the last fusion layer, and the output of the last deconstruction layer is connected to the input of the second convolutional layer. And the output of the m-th fusion layer is spliced with the output of the corresponding (n - m)-th deconstruction layer, where n is the number of fusion layers, n is a positive integer, m ∈ n, and m ≠ n.
[0012] Optionally, the fusion layer includes a first depth convolutional layer, a first transformation layer, and a first channel fusion layer connected in sequence. The first depth convolutional layer is used for downsampling the input feature map, the first transformation layer is used for dimension extraction of the output feature map of the first depth convolutional layer, and the first channel fusion layer is used for fusing the output feature map of the first transformation layer in the time dimension and the channel dimension.
[0013] Optionally, the deconstruction layer includes a second depth convolutional layer, a second transformation layer, and a second channel fusion layer. The second depth convolutional layer is used for upsampling the output of the previous deconstruction layer, the second transformation layer is used for dimension transformation of the output of the corresponding fusion layer, and the output of the second depth convolutional layer is spliced with the output of the second transformation layer and then input to the second channel fusion layer. The second channel fusion layer is used for channel fusion of the input feature map.
[0014] Optionally, the first depth convolutional layer adopts a VGG deep convolutional neural network.
[0015] The beneficial effects of the above technical solutions of the present invention are as follows: In the embodiments of the present invention, by improving the U-Net network model, the temporal information and texture information of the river channel video frames are extracted, and then the corresponding flow velocity values are output, which can improve the recognition accuracy and efficiency of the flow velocity. Description of the Drawings
[0016] Figure 1 It is a schematic flow chart of a flow velocity recognition method based on an improved U-Net network model in the first embodiment of the present invention; Figure 2 It is a schematic diagram of the visualization display of the flow velocity in the first embodiment of the present invention; Figure 3 It is a schematic structural diagram of the improved U-Net network model in the first embodiment of the present invention; Figure 4 It is a schematic structural diagram of the fusion layer in the first embodiment of the present invention; Figure 5 It is a schematic structural diagram of the deconstruction layer in the first embodiment of the present invention; Figure 6 It is a schematic structural diagram of a flow velocity recognition device based on an improved U-Net network model in the second embodiment of the present invention. Detailed Embodiments
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the described embodiments of the present invention fall within the scope of protection of the present invention.
[0018] With the continuous progress of technology, significant advancements have been made in water flow velocity measurement technology. Currently, commonly used water flow velocity measurement methods mainly include the differential pressure method, Doppler velocity measurement method, and radar velocity measurement method, etc. These methods are widely used in different water flow velocity measurement scenarios due to their unique advantages and disadvantages. For example, the Doppler velocity measurement method is highly favored for its high accuracy and real-time performance; the radar velocity measurement method is widely used in difficult-to-access measurement environments due to its remote measurement and non-contact characteristics.
[0019] Traditional methods for measuring water flow velocity have limitations in some complex scenarios, which has prompted researchers to explore new technical means. In recent years, deep learning methods have received much attention due to their powerful data processing capabilities. In this context, a velocity measurement method based on the optical flow + Particle Image Velocimetry (PIV) mode has emerged. This method combines the advantages of the optical flow method and PIV technology, and can measure the water flow velocity more accurately, providing a new solution for water flow velocity measurement. However, existing deep learning-based flow measurement methods still suffer from the lack of an optical flow pre-training model and the decline in the recognition accuracy of high flow velocities.
[0020] Therefore, please refer to Figure 1 , Figure 1 which is a schematic flow chart of a flow velocity recognition method based on an improved U-Net network model provided in the first embodiment of the present invention. The method includes the following steps: Step 11: Sample the collected river image data to obtain sampled image data; In this embodiment, monitoring devices such as cameras can be used to complete the data collection required for flow velocity recognition, and then the collected river image data is sampled at a preset time interval to obtain sampled frames, that is, sampled image data. Optionally, the time interval T = 10 seconds, and the length of the sampled frame Fs can be 32 frames.
[0021] Step 12: Randomly crop the sampled image data according to a preset size to obtain cropped images, and the ratio of the river channel area in each cropped image to the total area of the cropped image is not less than 10%.
[0022] In this step, each frame of the sampled image data is randomly cropped (Random Crop) according to a preset size. The preset size is fixed at 480, ensuring that the ratio of the river channel area in the cropped image is not less than 10%, that is, cropped images are obtained.
[0023] Random cropping refers to randomly selecting a region from the original image and cropping out this region as a new training sample. This technique can increase the diversity of the data set, thereby improving the generalization ability of the model. The principle of random cropping is that by randomly selecting the cropping region, it is possible to simulate the situation of the image from different perspectives and positions, so that the model can learn more robust feature representations.
[0024] Step 13: Perform color transformation on the cropped images according to a preset random probability to obtain an image sequence, and the color transformation includes at least one of brightness transformation, contrast transformation, saturation transformation, and hue transformation.
[0025] In this embodiment, the obtained cropped image is further subjected to random color transformation, where the color transformation includes one or more of brightness transformation, contrast transformation, saturation transformation, and hue transformation, so as to perform image fusion and enhancement. Exemplarily, the random probability can be specifically set to 0.2. For example, the brightness transformation is performed with a random probability of 0.2.
[0026] Step 14: Input the image sequence into the improved U-Net network model for flow velocity identification to obtain the flow velocity prediction result of the river channel. The improved U-Net network model includes a fusion part and a deconstruction part connected to the fusion part. The fusion part is used to extract and fuse features of the input image sequence to obtain a flow velocity prediction value, and the deconstruction part is used to perform channel splicing and feature fusion on the feature map output by the fusion part to obtain a flow velocity distribution map.
[0027] In this step, the image sequence obtained after the above steps can be input into the improved U-Net network model, and the improved U-Net network model is used for flow velocity identification to obtain the flow velocity value and flow velocity distribution of the river channel.
[0028] Furthermore, a flow velocity-frame graph showing the change of the flow velocity value over the sampling time can be dynamically generated to visualize the result. As Figure 2 shown, Figure 2 the dots in it represent the predicted flow velocity values corresponding to each sampling interval, and the long solid line represents that the true flow velocity of the river is 2.86.
[0029] The improved U-Net network model in this embodiment includes a fusion part and a deconstruction part, and the fusion part is connected to the deconstruction part. The fusion part is used to extract and fuse features of the input image sequence to obtain a flow velocity prediction value, and the deconstruction part is used to perform channel splicing and feature fusion on the feature map output by the fusion part to obtain a flow velocity distribution map.
[0030] The flow velocity identification method based on the improved U-Net network model provided by the embodiment of the present invention can improve the identification accuracy and efficiency of the flow velocity by extracting the temporal information and texture information of the river channel video frames through the improved U-Net network model and then outputting the corresponding flow velocity value.
[0031] The following is an example to illustrate the above flow velocity identification method based on the improved U-Net network model.
[0032] In one optional specific implementation, the fusion part includes a first convolutional layer, a plurality of fusion layers connected in sequence, and a compression layer. The output of the first convolutional layer is connected to the input of the first fusion layer, and the output of the last fusion layer is connected to the input of the compression layer; the deconstruction part includes a second convolutional layer and a plurality of deconstruction layers connected in sequence. The number of fusion layers is the same as that of the deconstruction layers. The input of the first deconstruction layer is connected to the output of the last fusion layer, and the output of the last deconstruction layer is connected to the input of the second convolutional layer. Moreover, the output of the m-th fusion layer is concatenated with the output of the corresponding (n - m)-th deconstruction layer, where n is the number of fusion layers, n is a positive integer, m ∈ n, and m ≠ n.
[0033] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of the improved U-Net network model in the first embodiment of the present invention. As Figure 3 shown, the fusion part in this embodiment includes two first convolutional layers and five fusion layers. The input of this first convolutional layer is the processed image sequence. The input of the first fusion layer from top to bottom is the output of the first convolutional layer, and the input of each subsequent fusion layer is the output of the previous fusion layer. The output of the last fusion layer serves as the input of the compression layer. Among them, in order to obtain the predicted value of the flow velocity, an average pooling method is designed as the compression layer to compress the width and height of the input feature map into 1, and the final output dimension is (1, 1, 1, 1), which is the flow velocity value output by the improved U-Net network model.
[0034] In this embodiment, the deconstruction part includes a second convolutional layer and five deconstruction layers. The input of the first deconstruction layer from bottom to top is the output of the fifth fusion layer. The input of each subsequent deconstruction layer includes two parts. One input is the output of the previous deconstruction layer, and the other input is the output of the corresponding fusion layer through channel concatenation. The output of the last deconstruction layer serves as the input of the second convolutional layer, and the output of the second convolutional layer is the flow velocity distribution map.
[0035] The number of fusion layers in this embodiment is the same as that of the deconstruction layers, and channel concatenation is performed between the fusion layer and the deconstruction layer. Specifically, the output of the m-th fusion layer from top to bottom is concatenated with the output of the corresponding (n - m)-th deconstruction layer from bottom to top, where n is the number of fusion layers, n is a positive integer, m ∈ n, and m ≠ n. Exemplarily, the output of the first fusion layer from top to bottom is concatenated with the output of the fourth deconstruction layer from bottom to top, so as to realize the adjustment of the dimension of the feature map and the dimension matching.
[0036] In some embodiments, the fusion layer includes a first depth convolutional layer, a first transformation layer, and a first channel fusion layer connected in sequence. The first depth convolutional layer is used to downsample the input feature map. The first transformation layer is used to extract the dimensions of the output feature map of the first depth convolutional layer. The first channel fusion layer is used to fuse the output feature map of the first transformation layer in the time dimension and the channel dimension.
[0037] The fusion layer in this embodiment includes a first depth convolutional layer, a first transformation layer, and a first channel fusion layer. Optionally, the first depth convolutional layer uses a VGG deep convolutional neural network, which can achieve pre-training. The VGG (Visual Geometry Group) pre-trained model is a classic convolutional neural network structure, which is widely used in image classification and object recognition tasks. The characteristics of the VGG model lie in its deep network structure and small convolutional kernels. For example, VGG16 and VGG19 respectively contain 16-layer and 19-layer network structures, and most of the layers are convolutional layers.
[0038] Among them, the first depth convolutional layer halves the width and height of the input feature map, which is used for semantic enhancement and reduction of computational complexity. The first transformation layer halves the time dimension N of the feature map to obtain the fourth dimension k for subsequent fusion, that is, for dimension extraction, and the extraction rate is k. The first channel fusion layer then fuses the time dimension k into the channel dimension C, and at this time, the output has fused time information.
[0039] Please refer to Figure 4 , Figure 4 which is the structural schematic diagram of the fusion layer in the first embodiment of the present invention. As Figure 4 shown, assuming the input feature map is (N, H, W, C), after passing through the first depth convolutional layer, the output feature map is (N, H / 2, W / 2, C). After passing through the first transformation layer, the output feature map is (N, H / 2, W / 2, C, k). Finally, after passing through the first channel fusion layer, the output feature map is (N, H / 2, W / 2, kC).
[0040] In some other embodiments, the deconstruction layer includes a second depth convolutional layer, a second transformation layer, and a second channel fusion layer. The second depth convolutional layer is used to upsample the output of the previous deconstruction layer. The second transformation layer is used to perform dimension transformation on the output of the corresponding fusion layer. The output of the second depth convolutional layer and the output of the second transformation layer are concatenated in channels and then input to the second channel fusion layer. The second channel fusion layer is used to perform channel fusion on the input feature map.
[0041] In this embodiment, the output of the previous deconstruction layer is upsampled by the second depth convolution layer and the number of channels is halved. The second transformation layer changes the dimension of the output of the corresponding fusion layer, and then performs channel splicing with the output of the second depth convolution layer. Then it is input into the second channel fusion layer, and the second channel fusion layer performs fusion in the channel dimension.
[0042] Please refer to Figure 5 , Figure 5 which is the structural schematic diagram of the deconstruction layer in the first embodiment of the present invention. As Figure 5 shown, assuming the input feature map is (1, H, W, C), after upsampling by the second depth convolution layer, the output feature map is (1, 2H, 2W, C / 2); and the output of the corresponding fusion layer is (N / 16, H, W, C). Since "N / 16" does not match "1" in (1, 2H, 2W, C / 2), it is necessary to change its dimension through the second transformation layer, and the output feature map is (1, H, W, C), and then perform channel splicing with (1, 2H, 2W, C / 2), and the output feature map is (1, 2H, 2W, C / 2). After passing through the second channel fusion layer, the output feature map is (1, 2H, 2W, C / ), where k is 2, and p represents the pth deconstruction layer from bottom to top.
[0043] Next, further take Figure 3 to introduce the flow velocity recognition method based on the improved U-Net network model of the present invention.
[0044] First, preprocess the obtained river channel image data to obtain an image sequence. Exemplarily, if the sampling frame is 32, then the image sequence N is 32, and the width and height of the image are W and H. These image sequences are used as the input of the improved U-Net network model. The improved U-Net network model is as described above and will not be elaborated here.
[0045] After the input image sequence passes through two first convolution layers, the output feature map is (N, H / 2, W / 2, 32), that is, the width and height are halved. Then it passes through the first fusion layer, and the output feature map is (N / 2, H / 4, W / 4, 64). And so on, every time it passes through a fusion layer, the width and height of the image are halved. After passing through the last fusion layer, the output feature map is (1, H / 64, W / 64, 1024). Finally, it passes through the compression layer and the output is (1, 1, 1, 1), that is, the width and height are compressed to 1, which is the flow velocity value output by the improved U-Net network model.
[0046] The input of the first deconstruction layer is the output of the last fusion layer, i.e., (1, H / 64, W / 64, 1024). Since this deconstruction layer has no input from the previous deconstruction layer, its output feature map remains (1, H / 64, W / 64, 1024). Then, the fourth deconstruction layer upsamples the feature map (1, H / 64, W / 64, 1024) and halves the number of channels to (1, H / 32, W / 32, 512). Moreover, the output feature map (N / 16, H / 32, W / 32, 512) of the fourth fusion layer will be dimensionally changed to (1, H / 32, W / 32, 512), and then concatenated with the upsampled feature map (1, H / 32, W / 32, 512) in the channel dimension to form a feature map of dimension (1, H / 32, W / 32, 512), which is input to the next deconstruction layer. And so on, after passing through each deconstruction layer, the width and height of the image double. The last deconstruction layer outputs a feature map (1, H / 4, W / 4, 64). After passing through the second depth convolution layer, the flow velocity distribution map (H / 4, W / 4) is output.
[0047] Please refer to Figure 6 , Figure 6 FIG. is a schematic structural diagram of a flow velocity recognition device based on an improved U-Net network model provided in the second embodiment of the present invention. The device 60 includes: A sampling module 61, configured to sample the collected river image data to obtain sampled image data; A cropping module 62, configured to randomly crop the sampled image data according to a preset size to obtain a cropped image, and the ratio of the river channel area in each cropped image to the total area of the cropped image is not less than 10%; A color transformation module 63, configured to perform color transformation on the cropped image according to a preset random probability to obtain an image sequence, and the color transformation includes at least one of brightness transformation, contrast transformation, saturation transformation, and hue transformation; An identification module 64, configured to input the image sequence into the improved U-Net network model for flow velocity identification to obtain a flow velocity prediction result of the river channel. The improved U-Net network model includes a fusion part and a deconstruction part connected to the fusion part. The fusion part is configured to perform feature extraction and fusion on the input image sequence to obtain a flow velocity prediction value, and the deconstruction part is configured to perform channel concatenation and feature fusion on the feature map output by the fusion part to obtain a flow velocity distribution map.
[0048] Optionally, the fusion part includes a first convolutional layer, a plurality of fusion layers connected in sequence, and a compression layer. The output of the first convolutional layer is connected to the input of the first fusion layer, and the output of the last fusion layer is connected to the input of the compression layer. The deconstruction part includes a second convolutional layer and a plurality of deconstruction layers connected in sequence. The number of fusion layers is the same as that of the deconstruction layers. The input of the first deconstruction layer is connected to the output of the last fusion layer, and the output of the last deconstruction layer is connected to the input of the second convolutional layer. The output of the m-th fusion layer is concatenated with the output of the corresponding (n - m)-th deconstruction layer, where n is the number of fusion layers, n is a positive integer, m ∈ n, and m ≠ n.
[0049] Optionally, the fusion layer includes a first depth convolutional layer, a first transformation layer, and a first channel fusion layer connected in sequence. The first depth convolutional layer is used to downsample the input feature map. The first transformation layer is used to extract the dimensions of the output feature map of the first depth convolutional layer. The first channel fusion layer is used to fuse the output feature map of the first transformation layer in the time dimension and the channel dimension.
[0050] Optionally, the deconstruction layer includes a second depth convolutional layer, a second transformation layer, and a second channel fusion layer. The second depth convolutional layer is used to upsample the output of the previous deconstruction layer. The second transformation layer is used to transform the dimensions of the output of the corresponding fusion layer. The output of the second depth convolutional layer is concatenated with the output of the second transformation layer and then input to the second channel fusion layer. The second channel fusion layer is used to fuse the input feature map in the channel dimension.
[0051] Optionally, the first depth convolutional layer uses a VGG deep convolutional neural network.
[0052] In the embodiment of the present invention, by improving the U-Net network model, the temporal information and texture information of the river channel video frames are extracted, and then the corresponding flow velocity value is output, which can improve the recognition accuracy and efficiency of the flow velocity.
[0053] The embodiment of the present invention is a product embodiment corresponding to the first method embodiment above, so it will not be repeated here. For details, please refer to the first embodiment above.
[0054] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A flow velocity identification method based on an improved U-Net network model, characterized in that: The method comprises the following steps: Sampling the collected river image data to obtain sampled image data; Randomly cropping the sampled image data according to a preset size to obtain cropped images, wherein the ratio of the river channel area in each of the cropped images to the total area of the cropped image is not less than 10%; Performing color transformation on the cropped image according to a preset random probability to obtain an image sequence, wherein the color transformation includes at least one of brightness transformation, contrast transformation, saturation transformation, and hue transformation; The image sequence is input into the improved U-Net network model for flow velocity recognition to obtain a flow velocity prediction result of the river, wherein the improved U-Net network model includes a fusion part and a deconstruction part connected to the fusion part, the fusion part is used to extract and fuse features of the input image sequence to obtain a flow velocity prediction value, and the deconstruction part is used to perform channel splicing and feature fusion on the feature map output by the fusion part to obtain a flow velocity distribution map.
2. The method according to claim 1, characterized in that The fusion part includes a first convolutional layer, several fusion layers connected in sequence, and a compression layer, the output of the first convolutional layer is connected to the input of the first fusion layer, and the output of the last fusion layer is connected to the input of the compression layer; the deconstruction part includes a second convolutional layer and several deconstruction layers connected in sequence, the number of the fusion layers is the same as the deconstruction layer, the input of the first deconstruction layer is connected to the output of the last fusion layer, the output of the last deconstruction layer is connected to the input of the second convolutional layer, and the output of the mth fusion layer is channel-joined with the output of the corresponding nmth deconstruction layer, wherein n is the number of the fusion layers, n is a positive integer, m∈n, and m≠n.
3. The method according to claim 2, characterized in that The fusion layer includes a first deep convolution layer, a first transformation layer and a first channel fusion layer connected in sequence, the first deep convolution layer is used to downsample the input feature map, the first transformation layer is used to extract the dimension of the output feature map of the first deep convolution layer, and the first channel fusion layer is used to fuse the output feature map of the first transformation layer in time dimension and channel dimension.
4. The method according to claim 2, characterized in that: The deconstruction layer includes a second deep convolution layer, a second transformation layer and a second channel fusion layer. The second deep convolution layer is used to upsample the output of the previous deconstruction layer. The second transformation layer is used to perform dimension transformation on the output of the corresponding fusion layer. The output of the second deep convolution layer and the output of the second transformation layer are channel-joined and input into the second channel fusion layer. The second channel fusion layer is used to perform channel fusion on the input feature map.
5. The method according to claim 3, characterized in that: The first deep convolutional layer adopts the VGG deep convolutional neural network.
6. A flow velocity identification device based on an improved U-Net network model, characterized in that: The device comprises: A sampling module is used to sample the collected river image data to obtain sampled image data; A cropping module, used for randomly cropping the sampled image data according to a preset size to obtain a cropped image, wherein the ratio of the river channel area in each of the cropped images to the total area of the cropped image is not less than 10%; A color transformation module, configured to perform color transformation on the cropped image according to a preset random probability to obtain an image sequence, wherein the color transformation includes at least one of brightness transformation, contrast transformation, saturation transformation, and hue transformation; The recognition module is used to input the image sequence into the improved U-Net network model for flow velocity recognition to obtain the flow velocity prediction result of the river, wherein the improved U-Net network model includes a fusion part and a deconstruction part connected to the fusion part, the fusion part is used to extract and fuse the features of the input image sequence to obtain the flow velocity prediction value, and the deconstruction part is used to perform channel splicing and feature fusion on the feature map output by the fusion part to obtain the flow velocity distribution map.
7. The device according to claim 6, characterized in that The fusion part includes a first convolutional layer, several fusion layers connected in sequence, and a compression layer, the output of the first convolutional layer is connected to the input of the first fusion layer, and the output of the last fusion layer is connected to the input of the compression layer; the deconstruction part includes a second convolutional layer and several deconstruction layers connected in sequence, the number of the fusion layers is the same as the deconstruction layer, the input of the first deconstruction layer is connected to the output of the last fusion layer, the output of the last deconstruction layer is connected to the input of the second convolutional layer, and the output of the mth fusion layer is channel-joined with the output of the corresponding nmth deconstruction layer, wherein n is the number of the fusion layers, n is a positive integer, m∈n, and m≠n.
8. The device according to claim 7, characterized in that The fusion layer includes a first deep convolution layer, a first transformation layer and a first channel fusion layer connected in sequence, the first deep convolution layer is used to downsample the input feature map, the first transformation layer is used to extract the dimension of the output feature map of the first deep convolution layer, and the first channel fusion layer is used to fuse the output feature map of the first transformation layer in time dimension and channel dimension.
9. The device according to claim 7, characterized in that The deconstruction layer includes a second deep convolution layer, a second transformation layer and a second channel fusion layer. The second deep convolution layer is used to upsample the output of the previous deconstruction layer. The second transformation layer is used to perform dimension transformation on the output of the corresponding fusion layer. The output of the second deep convolution layer and the output of the second transformation layer are channel-joined and input into the second channel fusion layer. The second channel fusion layer is used to perform channel fusion on the input feature map.
10. The device according to claim 8, characterized in that The first deep convolutional layer adopts the VGG deep convolutional neural network.
Citation Information
Patent Citations
Water flow velocity measurement method and device, computer equipment and storage medium
CN111275752A
Multi-model fusion remote sensing image classification method
CN116486275A
Water flow velocity identification method based on image identification and related product
CN117809230A
River surface space-time image validity identification and speed measurement method based on deep learning
CN119445370A
Building change detection method and system based on siamese unet model
WO2025030625A1
Cited By
Flow measurement method and system for intelligent water conservancy monitoring and sensing equipment
CN121354032A
A flow measurement method and system for smart water conservancy monitoring and sensing equipment
CN121354032B