Bubble tracking and velocity measurement method for multiphase flow based on improved YOLO11

By improving the YOLO11 network model and combining it with BiFPN, MobileNetV4-ConvSmall, C2PSA_SEAM and SCDown modules, the accuracy and real-time problems in multiphase flow bubble detection are solved, and automatic recognition, segmentation and velocity measurement of bubbles are realized, which is suitable for rapid measurement in industrial sites.

CN120599447BActive Publication Date: 2025-10-24GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511094002.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-10-24
Estimated Expiration
2045-08-06

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient accuracy and poor real-time performance in multiphase flow bubble detection, making it impossible to track bubble trajectories and obtain dynamic parameters. In addition, the detection method cannot integrate a graphical interface with real-time calculations, making it difficult to meet the needs of rapid measurement and analysis in industrial sites.

Method used

An improved YOLO11 network model is adopted. By replacing PAFPN with BiFPN, replacing the Conv module with MobileNetV4-ConvSmall, replacing C2PSA with C2PSA_SEAM, introducing the SCDown module, and combining it with the BoT-SORT multi-target tracking algorithm, automatic recognition, segmentation and speed measurement of bubbles are achieved.

Benefits of technology

It improves the bubble detection accuracy, reduces manual operations, realizes the automatic detection of multiphase flow bubbles and real-time velocity measurement, and is suitable for rapid measurement and analysis in industrial sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599447B_ABST
    Figure CN120599447B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on improved YOLO11 Multi-phase flow bubble tracking and speed measurement method, belong to multi-phase flow bubble detection and tracking technical field, including: obtaining multi-phase flow bubble image dataset;Multi-phase flow bubble image dataset is divided into training set and verification set;YOLO11 is improved to obtain improved YOLO11 network model, obtains the multi-phase flow bubble segmentation model based on improved YOLO11;Training set is input into model and is trained, obtains optimal segmentation model;The performance of the model is evaluated using the verification set, after meeting the accuracy requirement, it is input into the multi-phase flow bubble recognition and speed measurement system based on graphical user interface, the bubble segmentation, tracking and speed measurement of actual image are carried out.The application can achieve high operation precision, fast bubble segmentation effect with high speed under the condition of greatly reducing model parameter quantity and calculation amount, more convenient for equipment deployment and application.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of multiphase flow bubble detection and tracking, and particularly relates to a multiphase flow bubble tracking and speed calculation method based on improved YOLO11. BACKGROUND

[0002] With the wide application of multiphase flow systems in chemical industry, energy industry, metallurgy and other fields, bubbles as the key interfacial structure in gas-liquid or gas-liquid-solid systems have important influence on the mass and heat transfer efficiency and operation stability of the reactor. The traditional bubble detection method is limited by precision and real-time performance, especially in tracking bubble movement and obtaining its speed parameters.

[0003] The traditional method mainly relies on manual observation combined with basic image processing technology: the operator needs to capture the bubble movement sequence through a high-speed camera device, then label the position frame by frame and manually calculate the size and displacement. The data processing of a single experiment takes several hours and is prone to subjective errors.

[0004] More importantly, the existing technical system is fragmented in function: the detection, tracking and physical parameter calculation modules are independent of each other, the conversion of pixel coordinates to physical quantities relies on manual calibration, and the speed and area data need to be processed twice, which makes it impossible to obtain key parameters such as bubble equivalent diameter distribution and rising velocity spectrum in real time in the experimental field. The above technical bottlenecks restrict the development of gas-liquid reactor optimization, microfluidic chip design and other application scenarios, and there is a lack of an integrated solution that combines high-precision segmentation, stable tracking and real-time physical parameter calculation.

[0005] Therefore, an existing patent (patent number CN119274043A) proposes a bubble detection and counting method based on improved YOLOv8, which realizes a relatively lightweight bubble recognition model by improving the target detection network, and improves the detection accuracy and speed of static images to a certain extent. However, this method still has the following shortcomings: first, it only supports static detection and counting of bubbles, cannot track bubble trajectories, and cannot obtain dynamic parameters such as movement speed; second, it only uses rectangular frames for detection, does not realize accurate mask-level segmentation, and is difficult to deal with complex scenarios such as bubble overlap or edge blur; third, it does not integrate graphical interfaces and real-time calculation functions, making it difficult to directly apply to rapid measurement and analysis requirements in industrial sites.

[0006] In view of the above shortcomings, the present application proposes a multiphase flow bubble tracking and speed calculation method based on improved YOLO11. SUMMARY

[0007] The present application proposes a multiphase flow bubble tracking and speed calculation method based on improved YOLO11 to solve the problems existing in the prior art.

[0008] To achieve the above object, the application provides a multi-phase flow bubble tracking and speed measurement method based on improved YOLO11, comprising the following steps:

[0009] Obtain a multi-phase flow bubble image data set, wherein the multi-phase flow bubble image data set comprises gas-liquid-solid three-phase flow bubble images;

[0010] Divide the multi-phase flow bubble image data set into a training set and a validation set;

[0011] Improve YOLO11 to obtain an improved YOLO11 network model, and obtain a multi-phase flow bubble segmentation model based on the improved YOLO11;

[0012] Input the training set into the multi-phase flow bubble segmentation model for training to obtain an optimal segmentation model;

[0013] Perform performance evaluation on the model by using the validation set, and after meeting the accuracy requirement, perform bubble segmentation, tracking and speed measurement on actual images by using the optimal segmentation model.

[0014] Optionally, the improvement of YOLO11 comprises:

[0015] Replace the PAFPN network of YOLO11 with a bidirectional feature pyramid network, and reconstruct a feature fusion network;

[0016] Replace the standard Conv module in the feature extraction network of YOLO11 with a MobileNetV4-ConvSmall light weight convolution module;

[0017] Replace the C2PSA module in the feature extraction network of YOLO11 with a C2PSA_SEAM fusion attention module, and integrate a spatial and channel dual attention mechanism;

[0018] Introduce an SCDown spatial compression downsampling module in the feature pyramid downsampling path to replace the standard convolution downsampling operation.

[0019] Optionally, the working method of the MobileNetV4-ConvSmall module comprises: performing a normal convolution and a downsampling operation with a step of 2 on the input image information, extracting preliminary features, applying a Depthwise convolution of MobileNetV4-ConvSmall to strengthen feature extraction, concatenating the original downsampling result and the deep convolution enhanced result in the channel dimension, and performing a Channel Shuffle operation on the concatenated features.

[0020] Optionally, the working method of the C2PSA_SEAM module includes: performing channel segmentation on the input high-dimensional feature map to divide it into multiple branch paths; in each branch, different scale convolution operations are used to extract multi-scale semantic information; in some branches, a separable attention module is introduced to jointly model the spatial region and the channel weight; the processing results of the multiple paths are concatenated to fuse into an enhanced feature map; finally, the channel dimension is adjusted through point-by-point convolution to output a feature map containing global perception ability and fine-grained response.

[0021] Optionally, the working method of the SCDown module includes: first, adjusting the channel dimension of the input feature map using point-by-point convolution to decouple the spatial and channel information; performing deep convolution on the adjusted feature map to realize spatial dimension downsampling operation; combining point-by-point convolution and deep convolution to decouple the spatial and channel while downsampling.

[0022] Optionally, the method for obtaining the multi-phase flow bubble image dataset includes:

[0023] Use the IPE-multiphase flow measuring instrument to shoot the gas-liquid-solid three-phase flow bubble image;

[0024] Use the polygon tool to depict the edge of the bubble in the three-phase flow bubble image, and label the category name of the bubble, and convert the labeled picture corresponding to the label file into a txt file in YOLO format.

[0025] Optionally, the method is realized through a graphical user interface system, which includes a model loading module, an image import module, a parameter configuration module, a result visualization module, and a data export module; the optimal model is loaded through the model loading module; the image sequence to be processed is imported through the image import module; the conversion ratio of pixels and physical size, the inter-frame time step, the detection confidence, the edge threshold, and the track length parameters are set through the parameter configuration module; the bubble segmentation and tracking progress are viewed through the result visualization module; and the recognition result export path is set through the data export module.

[0026] Optionally, the result visualization module includes: target detection and instance segmentation are performed on each image to output detection results containing masks, bounding boxes, numbers, and confidence; multi-target tracking algorithm is used to associate bubbles between frames to generate bubble tracks with unique numbers; the instantaneous speed and average speed of the bubbles are calculated according to the position change of the bubbles in consecutive frames, the set proportion coefficient, and the time interval; the area and equivalent diameter of each bubble are calculated according to the mask region; the image sequence with detection information is exported as a visualized video result, and the frame-level analysis parameters of each bubble are exported as a CSV format data file.

[0027] The application also provides a computer device comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.

[0028] The application also provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the method.

[0029] Compared with the prior art, the application has the following advantages and technical effects:

[0030] The application provides a multi-phase flow bubble tracking and speed calculation method based on an improved YOLO11. In the improved network model, a lightweight backbone network module MobileNetV4-ConvSmall is used to reduce the calculation complexity and parameter quantity of the model; a weighted bidirectional feature fusion module BiFPN is introduced to realize efficient information interaction and enhancement between feature maps of different scales, thereby improving the detection capability of the model for bubbles of different sizes; a C2PSA_SEAM module is introduced to fuse cross-path convolution and coordinate attention mechanism in high-order semantic features, thereby further strengthening the perception capability of the model for bubble boundaries and morphology; and a spatial-channel decoupled down-sampling module SCDown is used to replace the traditional standard convolution down-sampling, thereby reducing FLOPs and memory access overhead while maintaining key spatial information.

[0031] The improved YOLO11 network model is input into a multi-phase flow bubble image data set containing mask annotation for training, and the trained segmentation model is used to perform frame-by-frame identification and mask extraction on the image sequence. The BoT-SORT multi-target tracking algorithm embedded in the improved YOLO11 network model is used to perform consistent numbering on the bubbles, and the bubble movement speed is calculated based on the displacement between consecutive frames; finally, the number, position, speed, area and equivalent diameter of the bubbles are output, thereby realizing automatic identification, segmentation and speed calculation of the multi-phase flow bubbles.

[0032] Compared with the prior art, the improved model has high bubble detection accuracy, is more lightweight and convenient to apply, realizes automatic detection of the multi-phase flow bubbles, and reduces the need for manual operation. BRIEF DESCRIPTION OF DRAWINGS

[0033] The accompanying drawings, which form a part of this application, are included to provide a further understanding of the application and are incorporated in and constitute a part of this application. The embodiments of this application and their

[0034] Figure 1 FIG. 1 is a schematic diagram of an optimal bubble segmentation model structure according to an embodiment of the application;

[0035] Figure 2A structural schematic diagram of a PAFPN network of an embodiment of the present application;

[0036] Figure 3 A structural schematic diagram of a BiFPN network of an embodiment of the present application;

[0037] Figure 4 A structural schematic diagram of a SEAM fusion attention module of an embodiment of the present application;

[0038] Figure 5 A structural schematic diagram of a SCDown spatial compression down-sampling module of an embodiment of the present application;

[0039] Figure 6 A core workflow diagram of a multiphase flow bubble identification and velocity measurement system based on a graphical user interface of an embodiment of the present application. DETAILED DESCRIPTION

[0040] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.

[0041] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a group of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0042] As shown in Figure 1 The present embodiment provides a multiphase flow bubble tracking and velocity measurement method based on improved YOLO11, which includes the following steps:

[0043] Obtain a multiphase flow bubble image dataset, which includes gas-liquid-solid three-phase flow bubble images;

[0044] Divide the multiphase flow bubble image dataset into a training set and a validation set;

[0045] Improve YOLO11 to obtain an improved YOLO11 network model, and obtain a multiphase flow bubble segmentation model based on the improved YOLO11;

[0046] Input the training set into the multiphase flow bubble segmentation model for training to obtain an optimal segmentation model;

[0047] Evaluate the performance of the model using the validation set, and after meeting the accuracy requirements, perform bubble segmentation, tracking and velocity measurement on actual images using the optimal segmentation model.

[0048] The specific implementation method is as follows:

[0049] S1, acquire a multiphase flow bubble image dataset.

[0050] Specifically, step S1 includes S11-S12:

[0051] S11, in this embodiment, an IPE-multiphase flow measuring instrument is used to collect gas-liquid-solid three-phase flow bubble images to form a multiphase flow bubble image dataset; the gas-liquid-solid three-phase flow bubble images have 5000 images, and the resolution of the images is 632x508.

[0052] S12, in this embodiment, an X-AnyLabeling open source tool is used to label each bubble image, the edges of the bubbles in the bubble image are drawn with a polygon tool, and then the category name of the bubble is labeled, and the annotation file corresponding to the generated picture after labeling is converted into a YOLO format txt file.

[0053] S2, the multiphase flow bubble image dataset obtained in step S1 is randomly divided into a training set and a validation set according to a proportion.

[0054] In this embodiment, the dataset in S1 is randomly divided into a training set and a validation set according to a proportion of 7:3, the training set is used to train the model, the validation set is used to evaluate the performance of the model to adjust the hyperparameters, and the test set is used to finally evaluate the performance of the model.

[0055] Optionally, the training set data is subjected to data enhancement through a Mosaic data enhancement strategy to increase the diversity of the data and enhance the generalization ability of the model.

[0056] S3, an improved YOLO11 network model is obtained by improving the YOLO11 network, specifically as follows:

[0057] The improved scheme reduces the model volume, parameter quantity and calculation amount while maintaining real-time through the collaborative improvement of lightweight Backbone (MobileNetV4-ConvSmall) + enhanced feature pyramid (BiFPN+SCDown) + multi-scale attention (C2PSA_SEAM), and the specific structure of the improved YOLO11 network model is as shown in Figure 1 The PAFPN network of the original YOLO11 is replaced by a bidirectional feature pyramid network (BiFPN) to reconstruct the feature fusion network; the standard Conv module in the feature extraction network of the original YOLO11 is replaced by a MobileNetV4-ConvSmall lightweight convolution module; the C2PSA module in the original feature fusion network is replaced by a C2PSA_SEAM fusion attention module to integrate spatial and channel dual attention mechanisms; an SCDown spatial compression downsampling module is introduced in the feature pyramid downsampling path to replace the standard convolution downsampling operation.

[0058] In this embodiment, the feature extraction module extracts the deep and shallow semantic information in the input image. The efficiency and expression ability of feature extraction directly affect the accuracy and speed of downstream detection and segmentation. The standard convolution (Standard Conv) module in the original YOLO11 feature extraction network is replaced by a lightweight MobileNetV4-ConvSmall module. This module uses an Inverted Bottleneck structure with a depthwise separable convolution (DWConv) stacked layer by layer. Through the width compression coefficient, the model parameter compression is realized, and the expression ability of the intermediate features is enhanced with the help of lightweight channel attention. Compared with the ordinary convolution structure in the original YOLO11, this module significantly reduces the computational complexity and memory access frequency while ensuring the representation ability. Then, the C2PSA module in the original YOLO11 for high-order semantic enhancement is replaced by the C2PSA_SEAM module. C2PSA_SEAM introduces a joint modeling mechanism of spatial attention and channel attention based on the original cross-path fusion structure, which can more accurately enhance the bubble edge and weak feature target. The feature fusion module integrates and enhances the feature maps of different scales, enabling the model to detect both small and large targets. The PAFPN structure used in the original YOLO11 is replaced by the weighted bidirectional feature pyramid structure BiFPN. BiFPN fuses the up-sampling and down-sampling paths, optimizes the information transmission between multiple scales, reduces feature redundancy, and enables more efficient high-level semantic aggregation with lower parameter consumption, which helps to extract the fine boundary of complex bubble regions in the segmentation task. The down-sampling operation in the feature pyramid structure is originally implemented by standard convolution, which is computationally intensive and prone to losing edge information. In this embodiment, the standard down-sampling structure in the original YOLO11 is replaced by the SCDown module. The SCDown module first uses point-wise convolution to compress the channel dimension, and then uses depth convolution for spatial dimension down-sampling. This reduces FLOPs while preserving position information to the maximum extent and enhances the model's ability to adapt to spatial structure changes.

[0059] Specifically, step S3 includes S31-S34:

[0060] S31, the working method of the MobileNetV4-ConvSmall module includes: performing a normal convolution (Conv) and a down-sampling operation with a step of 2 on the input image information, extracting preliminary features, and applying a MobileNetV4-ConvSmall specific Depthwise convolution (DWConv) to strengthen feature extraction; concatenating the original down-sampling result and the depth convolution enhanced result in the channel dimension; and performing a Channel Shuffle operation on the concatenated features.

[0061] S32, when the original input node and the output node are in the same layer, an additional edge directly from the original input node to the output node is added; at the same time, the shallow feature extraction graph is fused, and a node N3 is added right of the P3 node and connected with the B2 node directly.

[0062] In this embodiment, as shown in Figure 2 、 Figure 3 The improved BiFPN network fuses the B4 and N4 nodes in the original YOLOv11 network model respectively, fuses the B3 and N3 nodes, and fuses the bottom layer B2 feature graph at the same time, so as to realize high-level feature fusion and model lightweight.

[0063] S33, the working method of the C2PSA_SEAM module includes: channel segmentation is performed on the input high-dimensional feature graph, and the high-dimensional feature graph is divided into multiple branch paths; in each branch, different scale convolution operations are used to extract multi-scale semantic information; in part of the branches, SEAM (separable attention module) is introduced to jointly model the spatial region and the channel weight; the multiple path processing results are concatenated and fused into an enhanced feature graph; finally, the channel dimension is adjusted through point-by-point convolution, and a feature graph containing global perception ability and fine-grained response is output.

[0064] As shown in Figure 4 , the left side is the overall architecture of SEAM, which includes three CSMM (channel and spatial mixing) modules of different sizes (patch-6, patch-7, patch-8). The outputs of these modules are average-pooled, then expanded in the channel (Channel exp) and finally multiplied to provide enhanced feature representations. The right side is the detailed structure of the CSMM module, which utilizes multi-scale features through patches of different sizes and uses depthwise separable convolutions to learn the correlation between spatial dimensions and channels. The module includes the following elements:

[0065] (a) Patch Embedding: embedding the input patch; (b) GELU: Gaussian Error Linear Unit, an activation function; (c) BatchNorm: batch normalization, used to speed up the training process and improve performance; (d) Depthwise Convolution: depthwise separable convolution, which performs convolution operation on each input channel separately; (e) Pointwise Convolution: pointwise convolution, which uses a 1x1 convolution kernel to fuse the features of the depthwise separable convolution.

[0066] This module design aims to enhance the network's attention and capture ability of occluded facial features by meticulous processing of spatial dimensions and channels. By comprehensively utilizing multi-scale features and depth separable convolution, CSMM improves the accuracy of feature extraction while maintaining computational efficiency.

[0067] S34, the working method of the SCDown module includes: for the input feature map, first use pointwise convolution (Pointwise Conv) to adjust the channel dimension, thereby decoupling spatial and channel information; Depthwise Convolution is performed on the adjusted feature map to realize spatial dimension downsampling operation; The above operations are combined to complete spatial-channel decoupled downsampling.

[0068] As shown in Figure 5 As shown in

[0069] Compared with standard convolution downsampling, the SCDown module effectively reduces the computational load through the two-step operation of "pointwise convolution + depthwise convolution", and the parameter quantity is:

[0070] ;

[0071] ;

[0072] Total parameter quantity: ;

[0073] Computational load:

[0074] ;

[0075] ;

[0076] Total computational load: .

[0077] S4, input the training set described in step S1 into the improved YOLO11-based multiphase bubble segmentation model for training to obtain a trained optimal weight file, thereby obtaining an optimal bubble segmentation model, specifically as follows:

[0078] In this embodiment, the experiment is performed under a software and hardware environment in which the CPU is Intel(R) Core(TM) i7-13700K CPU @3.40 GHz, the GPU is NVIDIA GeForce RTX 4090 (24GB), the RAM size is 32GB, CUDA12.1, python 3.10.14, and the operating system is Windows11. The training set is input into the multiphase bubble segmentation model in step S12 for forward propagation, and the loss between the predicted result and the true label is calculated. Based on the back propagation algorithm, the gradient calculation and weight update of the model parameters are performed, and the cross entropy loss function is used as the optimization objective. The stochastic gradient descent (SGD) optimizer is used to perform multiple rounds of iterative training on the model. When the training error of the model converges or reaches the preset performance indicator, the optimal bubble segmentation model is determined.

[0079] All the improved methods based on step S2 can be applied to any model size of YOLO11. In the embodiment of the present application, YOLO11s is used as the training model, the initial learning rate is set to 0.01, the Batch size is set to 16, and the number of iterations is 150. Through multiple rounds of iterative training, the optimal network model weight file is obtained, thereby obtaining the optimal bubble segmentation model.

[0080] S5, input the validation set described in step S1 into the optimal bubble segmentation model trained in step S4 to evaluate the performance of the model.

[0081] Specifically, step S5 includes:

[0082] The validation set is input into the trained improved network model, and the performance of the model is evaluated according to the trained optimal weight file to obtain the accuracy of the model in bubble recognition, the amount of calculation and the size of the parameter amount of the model, and other indicators.

[0083] In this embodiment, the performance evaluation indicators include performance evaluation of the target network model after testing according to the preset performance evaluation indicators, wherein the performance evaluation indicators include accuracy P (Precision), recall R (Recall), average accuracy AP (Average Precision), model parameter amount (Parameters), model calculation amount (FLOPs), and model size (Model size).

[0084] The accuracy (Precision) is defined as: ;

[0085] Recall is defined as: ;

[0086] The average accuracy is defined as: ;

[0087] The model parameter amount is defined as: ;

[0088] The model calculation amount is defined as: ;

[0089] The model inference speed is defined as the number of picture frames processed by the model in one second.

[0090] In the above formula, TP is true positive, that is, the positive sample is correctly identified as a positive sample; FN is false negative, that is, the positive sample is incorrectly identified as a negative sample; TN is true negative, that is, the negative sample is correctly identified as a negative sample; and FP is false positive, that is, the negative sample is incorrectly identified as a positive sample. in represents the number of channels of each convolution kernel, which is also the number of channels of the input feature map; out represents the number of channels of the output feature map; K is the size of the convolution kernel; W, H are the width and height of the output feature map.

[0091] In order to test the performance improvement of the method of the embodiment of the application on the segmentation of the gas bubbles of the multiphase flow, the relevant indicators of the existing detection model and the improved network model of the embodiment of the application are calculated respectively, and the comparison results of the relevant indicators of the prior art and the method of the embodiment of the application are shown in Table 1.

[0092] Table 1

[0093] Method AP@0.5 Parameters(M) FLOPs(G) Weight size(MB) Faster-RCNN 0.855 41.348 79.4 316 YOLOv8s 0.970 11.79 42.7 22.7 YOLO11s 0.974 10.01 35.6 19.5 Improved YOLO11 model 0.970 6.26 27.5 12.4

[0094] As can be seen from Table 1, the improved YOLO11 model has higher bubble recognition accuracy than the Faster-RCNN algorithm, and has similar accuracy compared with other YOLO algorithms, and can more accurately detect and locate bubbles; the parameter amount, calculation amount and model size of the improved YOLO11 model are the least, and are more convenient for device deployment and application. The method of the embodiment of the application has more feasibility and superiority compared with the prior art.

[0095] S6, the improved YOLO11-based multiphase flow bubble segmentation model trained in step S5 is used for multiphase flow bubble segmentation, tracking and speed calculation.

[0096] In this embodiment, a system for implementing a multiphase flow bubble recognition and speed calculation method based on a graphical user interface is provided, and the workflow is as follows: Figure 6As shown, the improved YOLO11 model trained in combination is used to realize automatic recognition, instance segmentation, tracking and motion parameter calculation of bubbles in the image sequence. The system includes a model and image input module, a parameter configuration module, a segmentation detection and tracking module, a bubble activation and exit determination mechanism, a bubble speed calculation module, a mask area and equivalent diameter calculation module, a visualization and export module.

[0097] Specifically, step S6 includes S61-S67:

[0098] S61, the working method of the model and image input module includes: the user imports the optimized optimal bubble segmentation model through the model loading module in the GUI system, and the model is an instance segmentation model trained based on the improved YOLO11 network; a set of image frame sequences named in time sequence are imported through the image input module, and the images should be frame-by-frame image data collected by multiphase flow experiment or industrial visualization system.

[0099] S62, the working method of the parameter configuration module includes: the user sets the following key parameters through the interface: pixel and physical size scale (scale), unit: millimeter / pixel, used for conversion from pixel coordinates to actual physical displacement; time step (Δt), representing the sampling interval between image frames, unit: seconds; detection confidence threshold (confidence), used to filter low-confidence detection results; maximum track length (max_len), used to limit the tracking path cache; edge exit delay frame number (exit_delay), used to control the buffer determination when the target leaves the picture.

[0100] S63, the working method of the segmentation detection and tracking module includes: based on the Ultralytics YOLO framework, the model.track() method is called to perform segmentation detection on each frame of image, and the BoT-SORT tracking algorithm is used to associate the cross-frame bubble target. The output results include: instance mask (mask); bounding box (bbox); target ID (track_id); class and confidence. The mask area is used for subsequent area and diameter calculation; the target ID is used for tracking path management.

[0101] S64, the working method of the bubble activation and exit determination mechanism includes: the system determines whether the bubble enters the center area of the field of view by setting a safe boundary of the image edge: if the center of the bubble enters the safe area, it is activated as an "effective target" and starts recording the track; if the center of the bubble is located in the edge buffer area for a plurality of consecutive frames, and the exit delay frame number is exceeded, the system considers that the bubble has exited the picture and no longer records the speed and position.

[0102] S65, the working method of the bubble speed calculation module includes: the system calculates the physical displacement between the current frame and the previous frame in the trajectory updating process of each target bubble, and calculates the speed based on the time step. The specific formula is as follows:

[0103] Space displacement calculation:

[0104] Let the bubble center coordinates of the t-th frame and the t-1-th frame be (x t ,y t ) and (x t-1 ,y t-1 ), and the pixel-millimeter conversion coefficient be s (mm / pixel), then the displacement is:

[0105] ;

[0106] Instantaneous speed calculation:

[0107] Let the time interval be Δt, then the instantaneous speed is:

[0108] (unit: mm / s).

[0109] The system saves the speed value within a certain window length, and calculates the sliding average speed.

[0110] S66, the working method of the mask area and equivalent diameter calculation module includes: using the segmentation mask output by the model, the system can calculate the pixel area of each bubble in the image, then convert it to physical area, and estimate the equivalent diameter. The specific formula is as follows:

[0111] Area calculation formula:

[0112] Let the number of pixel points in the mask be , and the pixel area corresponding ratio be s 2 (mm² / px²), then:

[0113] (unit: mm²).

[0114] Equivalent diameter estimation:

[0115] Regarding the bubble as an approximate circle, the equivalent diameter is:

[0116] (unit: mm).

[0117] S67, the working method of the visualization and export module includes:

[0118] When processing each frame of image, the system will detect the bounding box, mask contour, target number, speed value and trajectory line, and superimpose and draw them on the original image, and display them in real time through GUI.

[0119] At the same time, the system writes all frame image processing results into a video file (.mp4) and exports structured data as a.csv table, which includes: frame number; bubble ID; center coordinates (x, y); area (mm2); equivalent diameter (mm); instantaneous velocity (mm / s); and average velocity (mm / s).

[0120] As can be seen from the above embodiments, the improved YOLO11-based multiphase flow bubble recognition, segmentation and velocity measurement method disclosed by the application comprises: acquiring a multiphase flow bubble image dataset and dividing it into a training set, a validation set and a prediction set; replacing the PAFPN structure in the original YOLO11 with a weighted bidirectional feature pyramid network (BiFPN) to realize efficient multi-scale feature fusion, replacing the original Conv module with a lightweight convolution module MobileNetV4-ConvSmall to reduce the model calculation amount, replacing the original C2PSA module with a C2PSA_SEAM module that fuses spatial and channel attention mechanisms to enhance feature representation capability, and replacing the standard down-sampling convolution with an SCDown module to improve the spatial information retention efficiency; training the improved YOLO11 network, using a cross-entropy loss function and an SGD optimizer to back-propagate and optimize the model parameters, and training an optimal bubble segmentation model; at the system level, the application loads the trained.pt model to the GUI system in combination with a graphical user interface platform, integrates model calling, image input, parameter configuration, real-time visualization, video output and data export modules; the system has a multi-target tracking mechanism built in based on the bubble mask detection, tracks the position changes of the bubbles between frames, automatically calculates the instantaneous velocity and average velocity of the bubbles based on the pixel-physical scale and time step, and estimates the equivalent diameter based on the mask area; finally, the recognition results are output in the form of visualized images and structured CSV tables, realizing automatic recognition, continuous tracking, accurate segmentation and motion measurement of multiphase flow bubbles.

[0121] The application significantly reduces the model parameter amount and calculation complexity while maintaining high detection accuracy, achieving the purposes of real-time performance, high measurement accuracy and wide adaptability.

[0122] The above is only a preferred specific embodiment of the application, but the protection scope of the application is not limited thereto, and any changes or replacements easily thought of by those skilled in the art within the technical scope disclosed by the application should be covered within the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.

Claims

1. A method for multi-phase flow bubble tracking and velocity measurement based on improved YOLO11, characterized in that, The method comprises the following steps: obtaining a multiphase flow bubble image dataset, which is a gas-liquid-solid three-phase flow bubble image; dividing the multiphase flow bubble image dataset into a training set and a validation set; improving YOLO11 to obtain an improved YOLO11 network model, and obtaining a multiphase flow bubble segmentation model based on the improved YOLO11; inputting the training set into the multiphase flow bubble segmentation model for training to obtain an optimal segmentation model; performing performance evaluation on the model by using the validation set, and performing bubble segmentation, tracking and speed calculation on actual images by using the optimal segmentation model after the accuracy requirement is met; the method is realized through a graphical user interface system, the graphical user interface system comprises a model loading module, an image import module, a parameter configuration module, a result visualization module and a data export module; the optimal segmentation model is loaded through the model loading module; the image sequence to be processed is imported through the image import module; the conversion ratio of pixels and physical size, the interframe time step, the detection confidence, the edge threshold and the track length parameters are set through the parameter configuration module; the bubble segmentation and tracking progress is viewed through the result visualization module; the identification result export path is set through the data export module; the result visualization module comprises: target detection and instance segmentation are performed on each frame of image, and detection results containing a mask, a bounding box, a number and a confidence are output; interframe association of bubbles is performed through a multi-target tracking algorithm, and a bubble track with a unique number is generated; the instantaneous speed and the average speed of the bubble are calculated according to the position change of the bubble in continuous frames and the set proportion coefficient and time interval; the area and the equivalent diameter of each bubble are calculated according to the mask area; the image sequence with detection information is exported as a visualized video result, and the frame-level analysis parameters of each bubble are exported as a CSV format data file.

2. The multiphase flow bubble tracking and speed calculation method based on the improved YOLO11 according to claim 1, wherein the improvement of YOLO11 comprises: replacing the PAFPN network of YOLO11 with a bidirectional feature pyramid network to reconstruct a feature fusion network; replacing the standard Conv module in the feature extraction network of YOLO11 with a MobileNetV4-ConvSmall lightweight convolution module; replacing the C2PSA module in the feature extraction network of YOLO11 with a C2PSA_SEAM fusion attention module to integrate a spatial and channel dual attention mechanism; introducing an SCDown spatial compression downsampling module in the feature pyramid downsampling path to replace the standard convolution downsampling operation.

3. The multiphase flow bubble tracking and speed calculation method based on the improved YOLO11 according to claim 2, wherein The working method of the MobileNetV4-ConvSmall light weight convolution module includes: performing a normal convolution and a step-down sampling operation on input image information, extracting preliminary features, and applying a MobileNetV4-ConvSmall depthwise convolution to strengthen feature extraction; concatenating the original down-sampling result and the depthwise convolution enhanced result in the channel dimension; and performing a channel shuffle operation on the concatenated features.

4. The improved YOLO11-based multiphase flow bubble tracking and velocity calculation method according to claim 2, wherein, The working method of the C2PSA_SEAM fusion attention module includes: splitting the input high-dimensional feature map into multiple branch paths; in each branch, different scale convolution operations are used to extract multi-scale semantic information; in some branches, a separable attention module is introduced to jointly model the spatial region and the channel weight; the multiple path processing results are concatenated to fuse into an enhanced feature map; and finally, the channel dimension is adjusted through point-by-point convolution to output a feature map containing global perception ability and fine-grained response.

5. The improved YOLO11-based multiphase flow bubble tracking and velocity calculation method according to claim 2, wherein, The working method of the SCDown spatial compression down-sampling module includes: adjusting the channel dimension of the input feature map using point-by-point convolution to decouple the spatial and channel information; performing depthwise convolution on the adjusted feature map to realize spatial dimension down-sampling operation; and combining point-by-point convolution and depthwise convolution to decouple the spatial and channel information while down-sampling.

6. The improved YOLO11-based multiphase flow bubble tracking and velocity calculation method according to claim 1, wherein, The method for obtaining the multiphase flow bubble image dataset includes: Taking a gas-liquid-solid three-phase flow bubble image using an IPE-multiphase flow measuring instrument; Using a polygon tool to depict the edge of the bubble in the three-phase flow bubble image, and labeling the category name of the bubble, and converting the labeled picture into a YOLO format txt file.

7. A computer apparatus comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, causes the processor to perform the method of any one of claims 1 to 6. The processor executes the computer program to implement the steps of the method of any one of claims 1-6.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Water surface target detection algorithm based on improved YOLO V5

    CN116912694A

  • Method for identifying and counting multiphase flow bubbles based on improved YOLOv8

    CN119274043A