Pool type water washing bubble group two-phase flow parameter detection method and system based on instance segmentation

CN122961985APending Publication Date: 2026-10-23XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611174527.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0021]本发明所要解决的技术问题在于针对上述现有技术中的不足,提供一种基于实例分割的池式水洗气泡群两相流参数检测方法及系统,用于解决现有介入式测量会扰动流场、传统图像处理方法在密集气泡条件下容易出现欠分割和误检、人工逐帧分析效率低、二维图像结果难以直接转换为三维气液界面参数,以及现有方法缺少跨帧运动分析、聚并与破裂事件检测和多工况统计表征的技术问题

Benefits of technology

一种基于实例分割的池式水洗气泡群两相流参数检测方法,通过深度学习实例分割(deep-learning-based instance segmentation)对池式水洗气泡群视频进行逐帧处理,能够同时完成气泡目标定位、实例区分和像素级掩膜预测。与阈值分割、边缘检测和分水岭方法相比,在气泡边界模糊、形态不规则、相互粘连及局部遮挡条件下,能够降低欠分割和误识别的发生概率;掩膜mAP50可达0.92以上,精确率和召回率均可达到0.89以上。通过依次执行尺度标定、实例轮廓提取、跨帧跟踪、运动参数计算、三维几何重构、水物性更新、无量纲参数计算、聚并与破裂事件检测以及群体统计,建立了从原始视频到气泡几何参数、运动参数、力学参数、事件参数和群体统计参数的完整自动化处理链路,实现“图像—数据—参数—关联”的一体化处理。在采用单阶段预测框架的实施方式中,实例分割模型具有较高的推理效率,能够适应每秒数千帧高速图像的大批量离线处理需求。所获得的索特平均直径、气含率、比表面积和上升速度等参数可直接作为核电厂严重事故条件下气态碘池式水洗传质模型的两相流输入,减少探针扰动及人工逐帧判读造成的误差,为极低浓度碘物种传质与化学反应耦合计算提供稳定数据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122961985A_ABST
    Figure CN122961985A_ABST
Patent Text Reader

Abstract

The application discloses a kind of pool type water washing bubble group two-phase flow parameter detection method and system based on instance segmentation, belong to nuclear safety engineering and computer vision cross technical field, collection bubble group video and complete scale calibration;Using instance segmentation model extraction bubble mask and contour parameter, combined with Kalman filter, data association and median filter construct cross-frame trajectory and calculate motion parameter;Using flat rotation ellipsoid approximation calculation three-dimensional surface area and volume, according to liquid phase temperature and system absolute pressure calculation water property and seven dimensionless parameters;Based on adjacent frame volume change rate identification coalescence and breakage event, obtain Sauter mean diameter and three-dimensional volume gas holdup by volume weighted statistics.The application can provide two-phase flow input parameter for gaseous iodine pool type water washing mass transfer model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary fields of nuclear safety engineering, gas-liquid two-phase flow measurement and computer vision, and specifically relates to a method and system for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation. Background Technology

[0002] Nuclear energy, as a clean and efficient energy source, plays a vital role in addressing global climate change and achieving the "dual carbon" goal. However, nuclear safety remains the lifeline of nuclear energy development. The Three Mile Island accident in 1979, the Chernobyl accident in 1986, and the Fukushima nuclear accident in 2011 demonstrated the potential risk of severe accidents at nuclear power plants under extreme conditions. In the event of core meltdown and fuel cladding rupture, large amounts of radioactive fission products could be released into the containment vessel. Among the various fission products… 131 I is characterized by high volatility, complex chemical forms, and easy accumulation in the human thyroid gland. It is one of the important nuclides that affect the environment and public health in the early and middle stages of an accident.

[0003] To reduce the risk of radioactive material release into the environment after an accident, modern nuclear power plants typically employ filtration and emission systems. Pool scrubbing is a crucial process for retaining radioactive materials. Pool scrubbing weakens the migration ability of radioactive materials through processes such as gas injection, bubble generation and flotation, gas-liquid interface renewal, and liquid-phase absorption. For gaseous iodine, its retention efficiency is not only affected by the liquid-phase chemical absorption process but also significantly depends on gas-liquid two-phase flow parameters such as bubble size distribution, gas holdup, gas-liquid interface area, bubble rise velocity, and bubble residence time.

[0004] Especially in 10 -8 Up to 10 -3 In the coupled calculation of mass transfer and chemical reaction of gaseous iodine species across a wide concentration range, minute errors in the front-end gas-liquid contact area, bubble residence time, and interface renewal rate can accumulate and be amplified in the coupled calculation of mass transfer coefficients and chemical reactions. Therefore, it is necessary to obtain highly accurate, repeatable, and traceable bubble geometric and kinetic parameters to improve the reliability of the input data for the gaseous iodine mass transfer model.

[0005] Currently, the measurement and characterization of two-phase flow parameters in bubble swarms mainly face the following problems.

[0006] (1) Interventional measurement will disturb the original flow field.

[0007] Traditional methods for measuring bubble parameters include interventional methods such as conductivity probes and fiber optic probes. While these methods are technically mature, in high-flow-rate or chemically corrosive environments, the probe's entry into the liquid phase can physically disturb the local flow field, altering the original bubble trajectory, morphological distribution, and coalescence or collapse processes. This, in turn, affects the measurement results for bubble size, interfacial area, and residence time. When these measurements are used to calculate the distribution of low-concentration iodine species, the measurement disturbance can further affect the estimation of mass transfer area and residence time.

[0008] (2) Traditional image processing methods are difficult to adapt to large batches of high-speed images.

[0009] With the development of high-speed camera technology, non-invasive measurement based on high temporal resolution images has gradually become an important technical solution for bubble swarm research. However, the amount of data generated by high-speed cameras usually reaches thousands of frames per second. Relying on manual frame-by-frame interpretation or offline processing using threshold segmentation, Hough transform, edge detection, and watershed algorithms is not only inefficient but also easily affected by changes in lighting, reflections, boundary blurring, and background noise.

[0010] (3) Under dense bubble conditions, undersegmentation and misidentification are likely to occur.

[0011] In severe accident-related conditions, bubbles in the liquid phase exhibit irregular shapes, and localized areas are prone to phenomena such as bubble adhesion, mutual occlusion, bubble cluster formation, reflection, and blurred boundaries. Traditional threshold segmentation and watershed methods often struggle to distinguish multiple contacting bubbles, easily misidentifying multiple bubbles as a single target or incorrectly segmenting an irregular bubble into multiple targets, failing to meet the requirements for instance-level contour extraction and bubble-by-bubble statistics.

[0012] (4) Existing studies lack synchronous observation of the bubble swarm evolution process.

[0013] Existing studies on gaseous iodine tank washing typically use overall removal rate, retention rate, or overall decontamination factor as the main evaluation indicators, but lack simultaneous observation of the processes of bubble generation, rise, coalescence, collapse, and morphological changes within the liquid tank. Due to differences in inlet structure, gas-liquid contact mode, and flow organization among different experimental devices, it is difficult to reveal how nozzle diameter, incident pressure difference, liquid phase temperature, and system pressure further affect the mass transfer process by changing bubble size, gas holdup, and interfacial area, based solely on outlet concentration or overall decontamination factor.

[0014] (5) Traditional models oversimplify complex bubble morphology and population evolution.

[0015] Existing pool-type washing models and empirical correlations typically approximate bubbles as regular spheres or use lumped parameters to characterize bubble swarms. These methods fail to adequately reflect the nonlinear behaviors exhibited under conditions of high pressure differential, large nozzles, and high gas holdup, such as bubble deformation, bubble collapse, bubble coalescence, bubble cluster formation, and dramatic gas-liquid interface renewal. Directly substituting the three-dimensional interface area with the two-dimensional projected area also reduces the physical accuracy of the calculated gas-liquid mass transfer area and gas holdup.

[0016] (6) There is a lack of a complete processing link that connects image recognition, physical parameter calculation and statistical analysis.

[0017] Existing methods often only perform bubble image detection or single-item size parameter measurement, and have not yet established a complete automated processing chain from raw high-speed video, instance-level contours, cross-frame trajectories, 3D geometric parameters, motion parameters, water property parameters, dimensionless parameters, aggregation and bursting events, to bubble-by-bubble, trajectory-by-trajectory, frame-by-frame and global statistical results.

[0018] (7) There is a lack of a unified quantitative characterization method for multiple working conditions.

[0019] Regarding the influence of nozzle diameter, incident pressure difference, liquid phase temperature, and system pressure on bubble swarm size, gas holdup, specific surface area, rising velocity, and dimensionless parameters, existing studies lack a unified data organization method, batch processing method, and empirical correlation formula, making it difficult to make consistent comparisons of the two-phase flow behavior of bubble swarms under different operating conditions.

[0020] Therefore, there is a need for an automated detection method that can perform instance-level recognition, pixel-level contour extraction, cross-frame trajectory tracking, multi-dimensional two-phase flow parameter calculation, and population statistical analysis on images of dense bubble swarms under complex pool washing conditions. Summary of the Invention

[0021] The technical problem to be solved by this invention is to address the shortcomings of the prior art by providing a method and system for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation. This method addresses the technical problems of existing interventional measurements disturbing the flow field, traditional image processing methods being prone to undersegmentation and false detection under dense bubble conditions, low efficiency of manual frame-by-frame analysis, difficulty in directly converting two-dimensional image results into three-dimensional gas-liquid interface parameters, and the lack of cross-frame motion analysis, aggregation and rupture event detection, and multi-condition statistical characterization in existing methods.

[0022] The present invention adopts the following technical solution: A method for detecting two-phase flow parameters of bubble swarms in pool-type water washing based on instance segmentation includes the following steps: Video of bubble clusters during the pool washing process was collected, the pixel scale coefficient was determined based on the scale image, and the volume of the control volume was determined based on the inner diameter of the experimental device and the field of view height. The trained deep learning instance segmentation model is used to infer the bubble group video frame by frame to obtain bubble instance masks. The bubble instance masks are then binarized, their outer contours are extracted, and ellipse fitting is performed to obtain the centroid coordinates, major and minor axes, tilt angle, projected area, and perimeter of the bubbles, which are then converted into physical scale parameters. Kalman filtering and data association algorithms are used to associate the same bubble in consecutive frames. Median filtering is applied to the bubble centroid coordinate sequence, and the axial velocity, radial velocity, composite velocity and acceleration of the bubble are calculated. The equivalent diameter of the bubble is calculated based on the projected area, the deformation ratio is calculated based on the major and minor axes, the roundness is calculated based on the projected area and perimeter, and the three-dimensional surface area and volume of the bubble are approximated using a flattened rotating ellipsoid. The density, dynamic viscosity, and surface tension of water are calculated based on the liquid phase temperature and the absolute pressure of the system. The Reynolds number, Weber number, Etworth number, Froude number, Euler number, capillary number, and drag coefficient are calculated in combination with the equivalent diameter, axial velocity, and combined velocity. Clustering and bursting events are identified based on the rate of change of volume of adjacent frames of the same bubble trajectory. The bubble group parameters are calculated frame by frame using a volume-weighted average method. The Sotter average diameter is calculated, and the three-dimensional volumetric gas holdup is calculated based on the three-dimensional volume of the bubble and the volume of the control volume.

[0023] Furthermore, the training process of the deep learning instance segmentation model includes: The bubble group video is frame-sampling at set time intervals. The bubble instances in the frame-sampling images are labeled with polygonal outlines. The coordinates of the polygon vertices are normalized according to the image width and height and converted into an instance segmentation labeling format. The image samples are divided into training set, validation set and test set. Deep learning instance segmentation models of different specifications are trained under the same dataset partitioning and hyperparameter conditions. The base model is determined based on bounding box loss, mask segmentation loss, mAP50 and mAP50-95, and the number of training rounds is determined based on mAP50, mAP50-95, precision and recall corresponding to different training rounds.

[0024] Furthermore, it also includes iteratively expanding the training set: The trained deep learning instance segmentation model is used to perform batch inference on the newly added bubble images. The newly added bubble images with the highest confidence level not lower than the preset confidence threshold and their predicted labels are stored in the training set expansion pool, and the newly added bubble images with the highest confidence level lower than the preset confidence threshold are stored in the manual review directory. The predicted labels and the manually corrected labels are incorporated into the training set, and the deep learning instance segmentation model is retrained.

[0025] Furthermore, the pixel scale factor is:

[0026] The axial physical coordinates of the bubble's center of mass are:

[0027] The volume of the control body is:

[0028] in, This represents the actual physical distance between two calibration points on a scaled image. The pixel distance between two calibration points. Image height, The vertical pixel coordinates of the bubble's centroid. The inner diameter of the experimental setup The physical height of the field of view.

[0029] Further processing of the bubble instance mask includes: The bubble instance is converted into a binary image according to a preset mask threshold. The outer contour of the binary image is extracted, and the outer contour with the largest area is determined as the effective contour. When the number of contour points of the effective contour is less than 5, the corresponding bubble instance is removed; when the ellipse fitting fails, the length and width of the outer rectangle of the effective contour are used to replace the major and minor axes; when the major axis exceeds the preset maximum diameter threshold, the centroid coordinates are missing, or the area of ​​the fitted ellipse exceeds a preset multiple of the bubble projection area, the equivalent circle diameter is calculated based on the bubble projection area.

[0030] Furthermore, the centroid coordinates of the same bubble in consecutive frames are associated using trajectory numbers, and the centroid coordinates are subjected to median filtering with a preset window length; the axial velocity and radial velocity of the bubble are respectively:

[0031]

[0032] The rate of bubble formation is:

[0033] in, and The first The horizontal and vertical pixel coordinates of the bubble centroid in the frame. The time interval between adjacent frames is defined as follows: the axial velocity and radial velocity are subjected to moving average processing, and the axial acceleration and radial acceleration are calculated based on the processed velocity sequence.

[0034] Furthermore, the equivalent diameter, deformation ratio, and roundness are respectively:

[0035]

[0036]

[0037] in, Let be the pixel projection area of ​​the bubble. Let be the pixel perimeter of the bubble. To fit the major axis diameter of the ellipse, To fit the minor axis diameter of the ellipse, and ; make , ,and ,when At that time, the three-dimensional surface area of ​​the bubble is:

[0038] when At that time, the three-dimensional surface area of ​​the bubble is:

[0039] in:

[0040] The three-dimensional volume of the bubble is:

[0041] The average diameter of the Sott is:

[0042] Furthermore, using the IAPWS-97 water and steam property formulas, the density of water was calculated based on the liquid phase temperature and the system absolute pressure. Dynamic viscosity and surface tension The Reynolds number, Weber number, Etworth number, Froude number, Euler number, and capillary number are respectively:

[0043]

[0044]

[0045]

[0046]

[0047]

[0048] in, It is the acceleration due to gravity. The incident pressure difference; when At that time, the drag coefficient is:

[0049] when At that time, the drag coefficient is:

[0050] Furthermore, the volume change rate of adjacent frames within the same bubble trajectory is:

[0051] When the volume change rate is greater than a first preset volume change rate threshold, the corresponding bubble is marked as a coalescence event; when the volume change rate is less than a second preset volume change rate threshold, the corresponding bubble is marked as a rupture event. The volume-weighted average of the bubble swarm parameters frame by frame is:

[0052] The three-dimensional volumetric gas holdup is:

[0053] in, For the first The three-dimensional volume of a bubble. For the first The parameters to be statistically analyzed for each bubble are organized into bubble-by-bubble and frame-by-frame data, trajectory statistics data, frame-by-frame summary data, and global statistics data.

[0054] Secondly, embodiments of the present invention provide a pool-type water washing bubble swarm two-phase flow parameter detection system based on instance segmentation, comprising: The image acquisition and calibration module is used to acquire video of bubble groups during the pool washing process, determine the pixel scale coefficient based on the scale image, and determine the volume of the control body based on the inner diameter of the experimental device and the field of view height. The instance segmentation and contour extraction module is used to infer the frame-by-frame images of the bubble group video using a trained deep learning instance segmentation model, obtain bubble instance masks, binarize the bubble instance masks, extract the external contours and fit ellipses to obtain the centroid coordinates, major and minor axes, tilt angle, projected area and perimeter of the bubbles, and convert them into physical scale parameters. The trajectory tracking and motion parameter calculation module is used to associate the same bubble in consecutive frames using Kalman filtering and data association algorithms, perform median filtering on the bubble centroid coordinate sequence, and calculate the bubble's axial velocity, radial velocity, composite velocity, and acceleration. The geometric parameter calculation module is used to calculate the equivalent diameter of the bubble based on the projected area, calculate the deformation ratio based on the major and minor axes, calculate the roundness based on the projected area and perimeter, and use a flattened rotating ellipsoid to approximate the three-dimensional surface area and volume of the bubble. The physical properties and dimensionless parameter calculation module is used to calculate the density, dynamic viscosity and surface tension of water based on the liquid phase temperature and the absolute pressure of the system, and to calculate the Reynolds number, Weber number, Etworth number, Froude number, Euler number, capillary number and drag coefficient in combination with the equivalent diameter, axial velocity and the combined velocity. The event detection and group statistics module is used to identify merging and bursting events based on the volume change rate of adjacent frames of the same bubble trajectory, calculate the bubble group parameters frame by frame using the volume weighted average method, calculate the Sotter average diameter, and calculate the three-dimensional volumetric gas holdup based on the three-dimensional volume of the bubble and the volume of the control volume.

[0055] Thirdly, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the above-described method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation.

[0056] Fourthly, embodiments of the present invention provide a computer-readable storage medium including a computer program, which, when executed by a processor, implements the steps of the above-described method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation.

[0057] Fifthly, a chip includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the above-described method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation.

[0058] In a sixth aspect, embodiments of the present invention provide an electronic device, including a computer program, which, when executed by the electronic device, implements the steps of the above-described method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation.

[0059] Compared with the prior art, the present invention has at least the following beneficial effects: A two-phase flow parameter detection method for bubble swarms in pool-type washing equipment is proposed. This method utilizes deep-learning-based instance segmentation to process pool-type washing equipment bubble swarm videos frame-by-frame, simultaneously achieving bubble target localization, instance differentiation, and pixel-level mask prediction. Compared to threshold segmentation, edge detection, and watershed methods, it reduces the probability of under-segmentation and misidentification under conditions of blurred bubble boundaries, irregular shapes, mutual adhesion, and local occlusion. The mask mAP50 can reach above 0.92, and both precision and recall can reach above 0.89. By sequentially executing scale calibration, instance contour extraction, cross-frame tracking, motion parameter calculation, 3D geometric reconstruction, water property updating, dimensionless parameter calculation, aggregation and burst event detection, and swarm statistics, a complete automated processing chain is established from the original video to bubble geometric parameters, motion parameters, mechanical parameters, event parameters, and swarm statistical parameters, achieving integrated processing of "image—data—parameter—correlation". In the implementation using a single-stage prediction framework, the instance segmentation model exhibits high inference efficiency, enabling it to meet the demands of large-scale offline processing of thousands of high-speed images per second. The obtained parameters, such as the Sauter mean diameter, gas holdup, specific surface area, and rise velocity, can be directly used as the two-phase flow input for a gaseous iodine pool-type water-washing mass transfer model under severe nuclear power plant accident conditions. This reduces errors caused by probe disturbances and manual frame-by-frame interpretation, providing stable data for the coupled calculation of mass transfer and chemical reactions of extremely low-concentration iodine species.

[0060] Furthermore, by performing interval frame extraction on the video, the temporal redundancy between adjacent images is reduced while preserving the morphological characteristics of bubbles under different working conditions. Boundary-level labels for bubble instances are obtained through polygon contour annotation, and the label coordinates are normalized to a unified instance segmentation training format, ensuring that data from different image sizes and experimental conditions can participate in model training according to a consistent data structure. Using a fixed random seed to divide the training, validation, and test sets maintains the consistency of the data foundation and the reproducibility of experimental results when comparing different models. Furthermore, parallel training of models of different specifications is conducted under the same dataset and hyperparameter conditions, and the selection is based on bounding box loss, mask segmentation loss, mAP50, and mAP50-95, avoiding model selection based on a single metric. Ablation analysis of the number of training epochs comprehensively examines precision, recall, and marginal returns, reducing undertraining or ineffective overtraining, ensuring that the determined model balances segmentation accuracy, convergence stability, and training cost.

[0061] Furthermore, a semi-automatic annotation and dataset iterative expansion mechanism based on prediction confidence is established. High-confidence images and their predicted labels are automatically stored in the training set expansion pool, allowing the trained model to replace repetitive manual contour annotation and reducing the workload of data preparation for large batches of bubble images. Low-confidence images are transferred to a manual review catalog, ensuring that difficult samples such as bubble adhesion, blurred boundaries, and abnormal shapes are manually reviewed, preventing incorrect labels from directly entering the training set. Automatically labeled data and manually corrected data are then re-integrated into the training set, continuously adding bubble samples under different nozzle diameters, incident pressure differences, liquid phase temperatures, and system pressures. This allows the training data to gradually cover more complex working conditions, achieving iterative expansion of the dataset and continuous improvement of model accuracy, as well as enhancing the model's adaptability to new working conditions and complex bubble morphologies.

[0062] Furthermore, by determining the pixel scale factor through the ratio of the known actual distance to the pixel distance, the centroid position, major and minor axes, perimeter, and projected area in the image can be converted from pixel quantity to actual physical quantities, avoiding the incomparability of data under different shooting magnification, resolution, and field of view conditions caused by directly using pixel parameters. By converting the image's vertical coordinates to axial physical coordinates with the bottom of the experimental device as the origin and vertically upward as the positive direction, a unified physical reference can be provided for the bubble's rising direction, birth position, and axial distribution. Establishing a cylindrical control volume based on the inner diameter of the experimental device and the physical height of the field of view provides a clear spatial volume benchmark for calculating the three-dimensional volumetric gas holdup of the bubble, enabling the image recognition results to be further converted into two-phase flow parameters with actual dimensions.

[0063] Furthermore, binarizing the continuous value mask output by the model and extracting the outer contour with the largest area as the effective boundary of the bubble can reduce the interference of internal holes, discrete noise, and local pseudo-contours on the calculation of geometric parameters. Instances with insufficient contour points are discarded to prevent invalid contours from participating in ellipse fitting. By performing ellipse fitting on the effective contours, the major and minor axes, tilt angle, and morphological parameters of the bubble can be obtained; when ellipse fitting fails, the length and width of the circumscribed rectangle are used to replace the major and minor axes to maintain the continuity of subsequent calculations for abnormal samples. Further setting the maximum diameter, coordinate integrity, and fitting ellipse area verification conditions, and back-deriving the equivalent circle diameter from the pixel projection area in abnormal cases, can form a geometric parameter error prevention and fallback mechanism, improving the stability of contour parameter extraction and the robustness of batch processing under complex bubble boundary conditions.

[0064] Furthermore, Kalman filtering is used to predict the bubble motion state, and stable trajectory numbers are assigned to the same bubble in consecutive frames through data association. This connects the independently identified results frame by frame into a time-continuous bubble trajectory, providing a data foundation for analyzing bubble lifetime, ascent path, velocity, acceleration, and volume changes in adjacent frames. Median filtering is applied to the bubble centroid coordinates to eliminate instantaneous coordinate jumps lasting 1-2 frames without weakening the true high-frequency turbulent fluctuations. Moving average is further applied to the velocity sequence to suppress the amplification of small centroid identification deviations in differential calculations. The resulting axial velocity, radial velocity, composite velocity, and acceleration can stably reflect the bubble motion state and provide kinematic inputs for calculating parameters such as Reynolds number, Weber number, Froude number, and Euler number.

[0065] Furthermore, by calculating the equivalent diameter based on the projected area, the deformation ratio based on the major and minor axes, and the roundness based on the projected area and perimeter, the two-dimensional morphology of the bubble can be characterized from the perspectives of scale, degree of deformation, and regularity of the contour, avoiding the use of only a single diameter parameter to describe irregular bubbles. By approximating the bubble as an oblate spheroid and calculating the three-dimensional surface area and volume based on the major and minor axes and the eccentricity of the ellipsoid, the two-dimensional image contour can be converted into three-dimensional geometric parameters of the bubble. Compared with directly approximating all bubbles as regular spheres, this processing can reflect the influence of bubble flattening deformation on the interface area and volume, making the three-dimensional surface area usable for characterizing the gas-liquid mass transfer interface area, and the three-dimensional volume usable for calculating the volumetric gas holdup. (Sotter mean diameter) The relationship between bubble volume and surface area characterizes the scale of bubble clusters, which can be used to describe the gas-liquid interface area corresponding to a unit bubble volume. This provides a physically meaningful scale parameter for calculating the mass transfer area in the gaseous iodine pool washing process, thereby improving the physical accuracy of gas holdup and mass transfer interface characterization.

[0066] Furthermore, using the IAPWS-97 water and steam property formulas, the density, dynamic viscosity, and surface tension of water are automatically calculated based on the liquid phase temperature and system absolute pressure. This eliminates the need for manual table lookups or repeated input of property parameters for each operating condition, maintaining consistency in the calculation methods for property parameters across multiple operating conditions and automatically updating water properties with changes in temperature and pressure. Based on this, seven dimensionless parameters are calculated: the Reynolds number to characterize the relative magnitude of inertial and viscous forces; the Weber number to characterize the relative magnitude of inertial and surface tension forces; the Etworth number to characterize the relative interaction between buoyancy and surface tension; the Froude number to characterize the relationship between the rising inertia of bubbles and the gravitational effect; the Euler number to characterize the relative relationship between pressure differential drive and dynamic pressure; the capillary number to characterize the relative magnitude of viscous forces and surface tension; and the drag coefficient to characterize the flow resistance characteristics during bubble movement. This allows for the characterization of bubble swarm dynamics from multiple dimensions, including inertial force, viscous force, surface tension, buoyancy, gravity, pressure differential, and flow resistance, providing a unified parameter system for comparing the effects of nozzle diameter, incident pressure differential, liquid phase temperature, and system pressure on bubble swarm motion and deformation behavior.

[0067] Furthermore, by identifying merging and bursting events based on the three-dimensional volume change rate of adjacent frames within the same bubble trajectory, a volume surge is identified using a first preset volume change rate threshold, and a volume decrease is identified using a second preset volume change rate threshold. This transforms bubble merging and bursting from manual observation and judgment into calculable and statistically significant event parameters, enabling the tracking of key physical events in the bubble swarm evolution process and the analysis of the impact of merging and bursting on bubble scale distribution and interface updates. A volume-weighted average method is used to summarize equivalent diameter, surface area, velocity, acceleration, and various dimensionless parameters. Statistical weights are determined according to the contribution of different bubbles to the total swarm volume, avoiding overweighting of numerous small bubbles and making the frame-by-frame statistical results closer to the actual volume distribution characteristics of the bubble swarm. The three-dimensional volumetric gas holdup is calculated by the ratio of the sum of the three-dimensional volumes of each bubble to the volume of the cylindrical control volume, which distinguishes it from the gas holdup surrogate value based solely on the two-dimensional projected area, improving the physical accuracy of the gas holdup characterization. By organizing the parameters into bubble-by-bubble and frame-by-frame data, trajectory statistics, frame-by-frame summary data, and global statistics, a multi-scale data analysis system can be formed, ranging from the instantaneous state of a single bubble, the evolution of a single trajectory, the temporal changes of a bubble group to the overall comparison of different working conditions. It also provides a unified data foundation for axial distribution, radial distribution, and 28 types of visualization charts recorded in the technical disclosure documents.

[0068] It is understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.

[0069] In summary, this invention achieves automatic extraction and hierarchical statistical analysis of the geometric, motion, mechanical, and coalescence / breakdown parameters of bubble swarms through instance segmentation, cross-frame tracking, three-dimensional geometric reconstruction, water property updating, and dimensionless analysis. This improves detection accuracy, processing efficiency, and data traceability under complex working conditions, and provides a stable and reliable two-phase flow input for the gaseous iodine pool-type water washing mass transfer model.

[0070] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0071] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is an image data acquisition diagram of the method of the present invention; Figure 3 Flowchart for constructing the dataset for the method of this invention; Figure 4 This is a flowchart of the semi-automatic annotation method of the present invention; Figure 5 This is a schematic diagram of the post-mask processing method of the present invention; Figure 6 This is a schematic diagram of cross-frame tracking using the method of the present invention; Figure 7 This is a flowchart of the parameter calculation and statistical output process of the method of the present invention; Figure 8 A schematic diagram of a computer device provided in an embodiment of the present invention; Figure 9 This is a block diagram of a chip provided according to an embodiment of the present invention.

[0072] Among them, 60. Computer equipment; 61. Processor; 62. Memory; 63. Computer program; 600. Electronic device; 610. Processing unit; 620. Storage unit; 6201. Random access memory unit; 6202. Cache memory unit; 6203. Read-only memory unit; 6204. Program / utility; 6205. Program module; 630. Bus; 640. Display unit; 650. Input / output interface; 660. Network adapter; 700. External device. Detailed Implementation

[0073] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0074] In the description of this invention, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0075] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0076] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this invention generally indicates that the preceding and following objects have an "or" relationship.

[0077] It should be understood that although terms such as first, second, third, etc., may be used in the embodiments of the present invention to describe the preset range, these preset ranges should not be limited to these terms. These terms are only used to distinguish the preset ranges from one another. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.

[0078] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0079] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.

[0080] This invention provides a method for detecting two-phase flow parameters of bubble swarms in pool-type water washing based on instance segmentation. It achieves instance-level bubble recognition and pixel-level contour extraction through deep learning instance segmentation, establishes cross-frame bubble trajectories through Kalman filtering and data association, and calculates the three-dimensional surface area and volume of bubbles through ellipse fitting and rotating ellipsoid approximation. It automatically obtains water property parameters under different temperatures and system pressures through a water property calculation model, and further calculates bubble motion parameters, seven dimensionless parameters, aggregation and bursting events, and bubble swarm statistical parameters. This establishes an automated processing link from raw high-speed video to bubble geometric parameters, motion parameters, mechanical parameters, event parameters, swarm statistical parameters, and empirical correlations, providing stable and repeatable two-phase flow input parameters for coupled calculation of mass transfer and chemical reaction in gaseous iodine pool-type water washing.

[0081] Please see Figure 1 The present invention discloses a method for detecting two-phase flow parameters of bubble swarms in pool-type water washing based on instance segmentation, comprising the following steps: S1. Experimental Image Acquisition and Preprocessing S101. Using a high-speed camera, the process of bubble generation, breakage, coalescence and rise in the liquid phase is continuously recorded under different nozzle diameters, incident pressure differences, liquid phase temperatures and system pressures to obtain raw video data. S102. Frames are extracted from the original video at set time intervals to convert the continuous video into a discrete image sequence, reducing temporal redundancy and controlling sample correlation. The extracted images are uniformly saved in high-quality JPG format and the naming rule of "operating condition identifier_serial number" is adopted to maintain the traceable association between the sample and the experimental operating condition. S103. Use a polygonal contour annotation tool to perform frame-by-frame fine annotation on the extracted images, and use polygonal contours to perform boundary-level annotation on bubble instances to generate an annotation file containing image size and vertex coordinate information. S104. Normalize the polygon vertex coordinates in the annotation file according to the image width and height, and convert them into a general instance segmentation training format to ensure that the image and the annotation file have strict one-to-one correspondence. S105. Using a fixed random seed, the samples are randomly divided into training set, validation set and test set according to a preset ratio, and the images and labels are simultaneously organized into a standard directory structure (train, val, and test subsets of images / labels).

[0082] S2. Construction and Training of Deep Learning Instance Segmentation Model S201. A deep learning instance segmentation framework is selected as the basic network. The overall model adopts the Backbone-Neck-Head paradigm. The backbone network extracts hierarchical semantic features, and the neck network achieves cross-scale information interaction through feature pyramid fusion. The prediction head outputs target confidence, category and geometric parameters at different scales. S202. Under the same dataset partitioning and hyperparameter conditions, compare the convergence performance and upper limit of accuracy of deep learning instance segmentation models of different specifications in parallel. Use the validation set bounding box loss, mask segmentation loss, mAP50 and mAP50-95 as evaluation criteria to comprehensively examine the convergence characteristics, segmentation accuracy and training stability of different networks. S203. Determine the optimal base model through model comparison and selection, and set up multiple training rounds schemes for ablation analysis. Determine the optimal number of training rounds by comprehensively considering the best segmentation accuracy, precision, recall, and marginal revenue, and complete the model training.

[0083] S3, Semi-automatic annotation and iterative expansion of datasets S301. Use the trained deep learning instance segmentation model to perform batch inference prediction on the newly acquired bubble images. S302. Using the confidence threshold as the diversion standard, the prediction results are automatically divided into a high confidence group and a low confidence group: For images with the highest confidence not lower than the set threshold (default 0.9), the original image along with the instance segmentation format labels automatically generated by the model (including category ID and normalized polygon vertex coordinates) is automatically included in the training set expansion pool, while saving the visual verification image with mask and bounding box overlay for manual sampling. S303. For images with the highest confidence level below the set threshold, they are classified into the pool to be manually reviewed. The masks predicted by the model are then manually confirmed or corrected before being included in the training set. S304. Merge the automatically labeled and manually corrected data into the existing training set, retrain the model, and achieve iterative expansion of the dataset and continuous improvement of model accuracy.

[0084] S4. Image scaling and coordinate system transformation S401. Before the experiment, use an interactive calibration tool to select two calibration points with known physical distance on the standard scale image using the mouse, calculate the pixel distance between the two points, and then obtain the pixel scale coefficient k (mm / pixel): k = actual physical length / pixel distance; S402. Convert the image pixel coordinate system to a physical coordinate system corresponding to the experimental setup: with the bottom of the experimental setup as the reference origin, vertically upward as the positive axial direction, and the axial height of the bubble's centroid as... H img The total height of the image (in pixels), y pThis represents the vertical pixel position in the image coordinate system; S403. Establish a three-dimensional control volume model: Calculate the volume of the control volume of the measurement section based on the inner diameter of the experimental setup and the physical height of the field of view. This is used for subsequent calculations of three-dimensional volumetric gas holdup.

[0085] S5. Bubble Image Post-processing and Instance-level Contour Extraction S501. The trained deep learning instance segmentation model is used to identify bubbles in the frame-by-frame image and obtain the mask output of each bubble instance. The mask output by the model is converted into a binary image according to a preset threshold, the outer contour is extracted, and the outer contour with the largest area is selected as the effective boundary of the bubble. S502. Calculate the pixel area, pixel perimeter, and centroid coordinates of the contour; when an instance cannot extract a valid contour, or the number of contour points is less than 5, discard the instance. S503. Perform ellipse fitting on the effective contour to obtain the major and minor axis diameters d1 and d2 and the inclination angle angle; when the fitting fails, use the length and width of the circumscribed rectangle to replace the major and minor axes. S504. Set the maximum diameter threshold for error prevention verification: When the major axis exceeds the threshold, the coordinates are missing, or the area of ​​the fitted ellipse exceeds 3 times the actual pixel area, the equivalent circle diameter is forcibly calculated by back-calculating the pixel area. S505. Establish the correspondence between pixel scale and actual physical scale. Convert the size in pixel space into actual physical length mm through the image scale calibration coefficient k, and realize the dimensional conversion of parameters such as area, perimeter, and speed.

[0086] S6, Bubble Cross-Frame Tracking and Trajectory Construction S601. A multi-target tracking algorithm based on Kalman filtering and data association is used to assign stable trajectory numbers to the same bubble target in consecutive frames, and to establish the relationship between the position and shape changes of the bubble in the time series. The tracking parameters are set to preset confidence threshold and IoU threshold, and high-resolution mask output is enabled to obtain high-resolution mask. S602. Construct the bubble motion trajectory by associating the pixel centroid coordinate sequence of the same bubble in consecutive frames with the trajectory number; S603. Adaptive noise reduction and smoothing (rollingmedian, center=True, min_periods=1) is applied to the centroid coordinate sequence using median filtering with a window size of 3 to eliminate instantaneous shift distortion coordinates in 1-2 frames without weakening the real high-frequency turbulence fluctuations.

[0087] S7. Calculation of bubble motion characteristic parameters S701. Based on a smooth centroid coordinate sequence under the same trajectory number, the axial rising velocity and radial velocity of the bubble are calculated using the adjacent frame centroid displacement method:

[0088]

[0089] Where, x p,i and y p,i , respectively, are the pixel coordinates of the centroid of the same bubble in adjacent frames, and Δt is the time interval between adjacent frames. The negative sign is introduced because the vertical coordinates in the original image coordinate system increase in the vertical downward direction. S702. The velocity sequence is smoothed using a three-point moving average method to suppress high-frequency fluctuations; the synthesized velocity is calculated. ; S703. Calculation of acceleration based on smoothed velocity sequence: Axial acceleration radial acceleration Similarly, a three-point moving average is used for smoothing.

[0090] S8. Automatic calculation of water physical properties. S801. Using the IAPWS-97 water and steam property formula, the physical property parameters of pure water under the current operating conditions are automatically calculated based on the liquid phase temperature and system absolute pressure: density ρ, dynamic viscosity μ and surface tension σ. S802. The sensitivity of temperature and pressure is checked using the IAPWS-97 formula, and the physical rationality of the calculation results is automatically verified: when the calculated density is lower than 200 kg / m³, the user is prompted to check whether the pressure difference was mistakenly filled in as absolute pressure in the input parameter. S803, based on the obtained physical property parameters, provides real-time physical property input for subsequent dimensionless parameter calculations, and realizes automatic updating of water physical properties under different temperature and pressure conditions.

[0091] S9. Calculation of Bubble Geometric Characteristic Parameters S901. For each bubble outline in each frame, calculate the projected area A by contour integral. p The equivalent diameter is defined by the projected area, along with the perimeter P:

[0092] Among them, A p d is the projected area in pixel space, k is the pixel scale factor (mm / pixel), and d is the pixel area in pixel space. ep Equivalent diameter (mm); S902. Perform ellipse fitting on the bubble profile to obtain the major and minor axis diameters d1 and d2, and calculate: Deformation ratio: This is used to characterize the degree to which a bubble deviates from a spherical shape; Roundness: , used to characterize the regularity of the bubble profile; S903. Based on the ellipse fitting results, the flattened rotating ellipsoid approximation is used to estimate the three-dimensional surface area S of the bubble. b and volume V b : When the major semi-axis a ≤ the minor semi-axis c, we approximate it as a sphere: ; When a > c, the surface area is: ,in The eccentricity of the ellipsoid; Bubble volume: ; S904. Within each axial interval, count all bubble samples falling into that interval and calculate the Souter mean diameter D. 32 :

[0093] S10. Calculation of bubble motion characteristic parameters and dimensionless parameters S1001. Based on the bubble trajectory data, calculate the following motion parameters: Axial upward velocity v y (mm / s), radial velocity v x (mm / s), synthesis velocity v total (mm / s); Axial acceleration a y (mm / s²) and radial acceleration a x (mm / s²); S1002. Based on the water physical property parameters automatically obtained by IAPWS-97, calculate the following dimensionless parameters: Reynolds number: It represents the relative magnitude of inertial force and viscous force; Weber number: It characterizes the relative magnitude of inertial force and surface tension; Etwash number: This characterizes the relative interaction between buoyancy and surface tension (where the gas phase density is much smaller than the liquid phase density, approximately Δρ ≈ ρ). l ); Froude number: This describes the relationship between the rising inertia of a bubble and the effect of gravity. Euler number: It characterizes the relative relationship between differential pressure drive and dynamic pressure (a lower speed limit criterion is set when the speed is too low to avoid numerical divergence). Number of capillaries: It characterizes the relative magnitude of viscous force and surface tension; Drag coefficient: When Re > 0.1, When Re > 1000, .

[0094] S11, Detection of bubble coalescence and rupture events S1101. Calculate the volume change rate based on a continuous frame volume sequence with the same bubble trajectory:

[0095] S1102. Determine bubble aggregation and rupture events based on the volume change rate threshold: When the volume change rate is greater than the first preset volume change rate threshold, it is determined to be a merging event: the bubble's volume suddenly increases beyond the corresponding threshold between adjacent frames, indicating that it may merge with other bubbles; When the volume change rate is less than the second preset volume change rate threshold, it is determined to be a rupture event: the volume of the bubble suddenly decreases by more than the corresponding threshold between adjacent frames, indicating that the bubble has split.

[0096] S12, Calculation of Bubble Swarm Statistical Parameters S1201, Organize bubble characteristic parameter data according to four levels: Bubble-by-frame data: Saves all parameters of a single bubble in each frame (geometric parameters, motion parameters, dimensionless parameters, event markers). Trajectory statistics: Describe the lifespan and overall evolution characteristics of a single bubble within the visible area; Frame-by-frame data aggregation: Analyzing the overall behavior of bubble clusters over time; Global statistical data: The method of first performing statistics frame by frame and then averaging all frames is used for univariate comparisons between different operating conditions.

[0097] S1202, trajectory-level statistical parameters include: bubble lifetime_s, maximum diameter d max Birth axis position y Mean tilt angle θ, mean resultant velocity v total Average capillary number Ca, average drag coefficient Cd, total number of coalescence events and total number of rupture events, average roundness C; S1203. The group average parameter for each frame is calculated using a volume-weighted average method, with the following weighting formula:

[0098] Where X i V represents the parameter value for the i-th bubble. iFor the corresponding volume. The parameters for weighted calculation include: equivalent diameter, surface area, volume, axial velocity, radial velocity, resultant velocity, axial acceleration, radial acceleration, Re, We, Eo, Fr, Eu, Ca, Cd, and inclination angle; S1204. The frame-by-frame summary data also includes: bubble count per frame, total surface area per frame, total volume per frame, and D per frame. 32 Number of clustering events per frame, number of rupture events per frame, and number of large bubbles per frame; S1205, Calculate the three-dimensional volumetric gas holdup:

[0099] The numerator is the sum of the volumes of all bubbles in that frame, V. domain The volume of the control volume is calculated based on the inner diameter of the experimental setup and the field of view height.

[0100] S13. Large Bubble Recognition and Feature Analysis S1301. Use dual criteria to jointly identify large bubbles: when the equivalent diameter of a bubble is greater than the overall mean plus one standard deviation, and the surface area is also greater than the overall mean plus one standard deviation, the bubble is marked as a large bubble. S1302. Count the number of large bubbles frame by frame to analyze the frequency of occurrence and axial distribution characteristics of large bubbles under different working conditions.

[0101] S14. Abnormal Sample Cleaning and Data Quality Control S1401, Track Length Filtering: Remove short-duration tracks with less than 5 frames per second to reduce false speeds caused by momentary false detections or unstable tracking; S1402, Physical Scale Filtering: Excludes abnormal targets whose equivalent diameter exceeds a preset physical scale threshold, which is determined based on the reasonable bubble size range under experimental conditions; S1403, Velocity quantile filtering: Use the quantile method to remove extreme velocity samples and remove samples whose axial velocity v_y is outside the preset low and high quantiles; S1404, Euler number extreme value filtering: Remove samples with Euler number exceeding the 99th percentile value to avoid numerical divergence due to insufficient speed; S1405, Extreme Sample Removal: Deletes a small number of extreme samples with the largest values ​​(default 20) according to the configured column to eliminate obvious identification errors or extreme anomalies.

[0102] S15, Axial and Radial Distribution Analysis S1501. Divide the field of view into N equal intervals along the axial direction, and statistically analyze the average ascent velocity and arithmetic mean diameter D within each interval. 10 Sothe average diameter D 32Average aspect ratio, average surface area, average volume, gas holdup proxy value, bubble count density, and bubble birth rate; S1502. Divide the field of view into several equal intervals along the radial direction, and use the sum of the projected areas in each interval as the local gas holdup surrogate value to draw a radial gas holdup distribution map.

[0103] S16, Multi-dimensional Visualization Analysis Based on the extracted parameters, the following 28 types of visualization charts are generated to achieve a comprehensive analysis of the two-phase flow behavior of bubble clusters: Axial distribution categories (8 types): Axial distribution of bubble birth rate, axial distribution of rising velocity, axial distribution of surface area, axial distribution of volume, axial distribution of bubble count, axial distribution of gas holdup, axial distribution of aspect ratio, D 10 With D 32 Bilinear axial distribution; Time evolution categories (14 categories): Time evolution of volumetric gas holdup, time evolution of total surface area, time evolution of total volume, frame-by-frame average surface area evolution, frame-by-frame average volume evolution, frame-by-frame average diameter evolution, frame-by-frame average velocity evolution, frame-by-frame average Re evolution, frame-by-frame average We evolution, frame-by-frame average Eo evolution, frame-by-frame average Fr evolution, frame-by-frame average Eu evolution, frame-by-frame large bubble count evolution, bubble count and D 32 Dual-axis time series; Statistical distribution types (3 categories): Bubble lifetime histogram, maximum diameter histogram, roundness histogram; Correlation analysis (2 types): Aspect ratio-Weber number scatter plot, axial distribution of aggregation and rupture events; Radial distribution type (Type 1): Radial gas holdup distribution diagram.

[0104] S17. Analysis of the Influence of Operating Condition Parameters and Establishment of Empirical Correlation Equations S1701. Based on the bubble swarm parameter data obtained in the above steps under different operating conditions, analyze the effects of nozzle diameter, incident pressure difference, liquid phase temperature, and system pressure on the bubble swarm scale (D). 32 D 10 The influence of gas holdup (α), total surface area, specific surface area (S / V), rising rate and dimensionless parameters (Re, We, Eo, Fr, Ca, Cd) on the following: S1702. Based on multi-condition data merging, global statistical data under different nozzle diameters and differential pressure conditions are merged into a unified dataset for cross-condition comparative analysis. S1703. Using nozzle diameter and incident pressure difference as basic variables, establish a hierarchical empirical correlation for bubble swarm characteristic parameters, expressing any bubble swarm characteristic parameter Y as the product of the basic term, temperature correction term, and system pressure correction term:

[0105] Where D is the nozzle diameter, Δ P Where P is the inlet pressure difference, T is the liquid phase temperature, and P is the liquid phase temperature. s This is for system pressure.

[0106] S18, Batch Processing and Automated Production Lines S1801. A structured parameter configuration file is used to manage the processing parameters of all working conditions. The structured parameter configuration file can be in the form of Excel, CSV, JSON or database table; each working condition has one line, including: video path, model path, output directory, liquid phase temperature, system absolute pressure, incident pressure difference, pixel scale factor and frame rate. S1802. The main program reads the structured parameter configuration file, sets the global parameters line by line, and then calls the single-condition processing flow. S1803, the single-condition processing flow is executed in sequence: automatic water property update → model loading → video frame-by-frame tracking → calculation of geometric and motion parameters → calculation of dimensionless parameters → event detection → data cleaning → four-level data output → visualization chart generation → annotated video generation. S1804. An exception capture and skip mechanism is adopted. When an error occurs in the processing of a single working condition, the error information is automatically recorded and the next working condition is processed, ensuring the overall completion rate of batch tasks.

[0107] In another embodiment of the present invention, a pool-type water washing bubble swarm two-phase flow parameter detection system based on instance segmentation is provided. This system can be used to implement the above-mentioned pool-type water washing bubble swarm two-phase flow parameter detection method based on instance segmentation. Specifically, the pool-type water washing bubble swarm two-phase flow parameter detection system based on instance segmentation includes an image acquisition and calibration module, an instance segmentation and contour extraction module, a trajectory tracking and motion parameter calculation module, a geometric parameter calculation module, a physical property and dimensionless parameter calculation module, and an event detection and swarm statistics module.

[0108] Among them, the image acquisition and calibration module is used to acquire video of bubble groups in the pool washing process, determine the pixel scale coefficient based on the scale image, and determine the volume of the control body based on the inner diameter of the experimental device and the field of view height. The instance segmentation and contour extraction module is used to infer the frame-by-frame images of the bubble group video using a trained deep learning instance segmentation model, obtain bubble instance masks, binarize the bubble instance masks, extract the external contours and fit ellipses to obtain the centroid coordinates, major and minor axes, tilt angle, projected area and perimeter of the bubbles, and convert them into physical scale parameters. The trajectory tracking and motion parameter calculation module is used to associate the same bubble in consecutive frames using Kalman filtering and data association algorithms, perform median filtering on the bubble centroid coordinate sequence, and calculate the bubble's axial velocity, radial velocity, composite velocity, and acceleration. The geometric parameter calculation module is used to calculate the equivalent diameter of the bubble based on the projected area, calculate the deformation ratio based on the major and minor axes, calculate the roundness based on the projected area and perimeter, and use a flattened rotating ellipsoid to approximate the three-dimensional surface area and volume of the bubble. The physical properties and dimensionless parameter calculation module is used to calculate the density, dynamic viscosity and surface tension of water based on the liquid phase temperature and the absolute pressure of the system, and to calculate the Reynolds number, Weber number, Etworth number, Froude number, Euler number, capillary number and drag coefficient in combination with the equivalent diameter, axial velocity and the combined velocity. The event detection and group statistics module is used to identify merging and bursting events based on the volume change rate of adjacent frames of the same bubble trajectory, calculate the bubble group parameters frame by frame using the volume weighted average method, calculate the Sotter average diameter, and calculate the three-dimensional volumetric gas holdup based on the three-dimensional volume of the bubble and the volume of the control volume.

[0109] This invention provides a terminal device comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or function. The processor described in this embodiment can be used in the operation of a pool-type water washing bubble group two-phase flow parameter detection method based on instance segmentation, including: Video of bubble clusters during the pool-type washing process is acquired. The pixel scale coefficient is determined based on the scale image, and the control volume is determined based on the inner diameter of the experimental setup and the field of view height. A trained deep learning instance segmentation model is used to infer the bubble cluster video frame by frame to obtain bubble instance masks. These masks are then binarized, their outer contours extracted, and ellipse fitted to obtain the bubble's centroid coordinates, major and minor axes, tilt angle, projected area, and perimeter, which are then converted into physical scale parameters. Kalman filtering and a data association algorithm are used to associate the same bubble in consecutive frames. Median filtering is applied to the bubble centroid coordinate sequence, and the axial velocity, radial velocity, composite velocity, and acceleration of the bubble are calculated. Based on the projected surface... The equivalent diameter of the bubble is calculated by averaging, the deformation ratio is calculated based on the major and minor axes, the roundness is calculated based on the projected area and perimeter, and the three-dimensional surface area and volume of the bubble are approximated using a flattened rotating ellipsoid. The density, dynamic viscosity, and surface tension of water are calculated based on the liquid phase temperature and the absolute pressure of the system. The Reynolds number, Weber number, Etworth number, Froude number, Euler number, capillary number, and drag coefficient are calculated by combining the equivalent diameter, axial velocity, and composite velocity. Bubble swarm parameters are identified based on the rate of volume change of adjacent frames of the same bubble trajectory. The Sotter average diameter is calculated using a volume-weighted averaging method, and the three-dimensional volumetric gas holdup is calculated based on the three-dimensional volume of the bubble and the volume of the control volume.

[0110] Please see Figure 8 The terminal device is a computer device. In this embodiment, the computer device 60 includes a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When executed by the processor 61, the computer program 63 implements the instance-segmentation-based two-phase flow parameter detection method for pool-type washing bubble swarms in this embodiment. To avoid repetition, these details are not elaborated here. Alternatively, when executed by the processor 61, the computer program 63 implements the functions of each model / unit in the instance-segmentation-based two-phase flow parameter detection system for pool-type washing bubble swarms in this embodiment. To avoid repetition, these details are not elaborated here.

[0111] Computer device 60 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. Computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will understand that... Figure 8 This is merely an example of computer device 60 and does not constitute a limitation on computer device 60. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device may also include input / output devices, network access devices, buses, etc.

[0112] The processor 61 may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0113] The memory 62 can be an internal storage unit of the computer device 60, such as a hard disk or memory of the computer device 60. The memory 62 can also be an external storage device of the computer device 60, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the computer device 60.

[0114] Furthermore, the memory 62 may include both internal storage units of the computer device 60 and external storage devices. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 can also be used to temporarily store data that has been output or will be output.

[0115] Please see Figure 9 The terminal device is an electronic device 600, which is manifested in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.

[0116] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.

[0117] Storage unit 620 may include readable media in the form of volatile storage units, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include read-only memory (ROM) 6203.

[0118] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0119] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0120] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem). This communication can be performed via input / output interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network, wide area network, and / or public network, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0121] This invention also provides a storage medium, specifically a computer-readable storage medium, which is a memory device in a terminal device for storing programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the terminal device and extended storage media supported by the terminal device; it can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which can be one or more computer programs (including program code). More specific examples of the computer-readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical fiber, portable compact disk read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0122] Computer-readable storage media also include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium can also be any readable medium other than a readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, radio frequency, etc., or any suitable combination thereof.

[0123] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0124] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the two-phase flow parameter detection method for pool-type water washing bubble swarms based on instance segmentation in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor to perform the following steps: Video of bubble clusters during the pool-type washing process is acquired. The pixel scale coefficient is determined based on the scale image, and the control volume is determined based on the inner diameter of the experimental setup and the field of view height. A trained deep learning instance segmentation model is used to infer the bubble cluster video frame by frame to obtain bubble instance masks. These masks are then binarized, their outer contours extracted, and ellipse fitted to obtain the bubble's centroid coordinates, major and minor axes, tilt angle, projected area, and perimeter, which are then converted into physical scale parameters. Kalman filtering and a data association algorithm are used to associate the same bubble in consecutive frames. Median filtering is applied to the bubble centroid coordinate sequence, and the axial velocity, radial velocity, composite velocity, and acceleration of the bubble are calculated. Based on the projected surface... The equivalent diameter of the bubble is calculated by averaging, the deformation ratio is calculated based on the major and minor axes, the roundness is calculated based on the projected area and perimeter, and the three-dimensional surface area and volume of the bubble are approximated using a flattened rotating ellipsoid. The density, dynamic viscosity, and surface tension of water are calculated based on the liquid phase temperature and the absolute pressure of the system. The Reynolds number, Weber number, Etworth number, Froude number, Euler number, capillary number, and drag coefficient are calculated by combining the equivalent diameter, axial velocity, and composite velocity. Bubble swarm parameters are identified based on the rate of volume change of adjacent frames of the same bubble trajectory. The Sotter average diameter is calculated using a volume-weighted averaging method, and the three-dimensional volumetric gas holdup is calculated based on the three-dimensional volume of the bubble and the volume of the control volume.

[0125] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0126] 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. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0127] Example 1 This example illustrates experimental image acquisition and dataset construction.

[0128] In this embodiment, please refer to Figure 2 The experiment used an HX-3E high-speed camera to acquire bubble images under simulated severe nuclear power plant accident conditions. The experimental conditions covered four dimensions: nozzle diameter, incident pressure difference, liquid phase temperature, and system pressure. The nozzle diameter included 1 mm, 3 mm, and 5 mm; the incident pressure difference covered 10-100 kPa; the liquid phase temperature covered 25-100℃; and the system pressure covered 100-400 kPa, for a total of 57 experimental conditions.

[0129] (1) Image acquisition: The high-speed camera shoots at a frame rate of 1000fps and a resolution of 1024×1024 pixels. The continuous shooting time for each working condition is no less than 5 seconds, and about 5000 frames of raw images are obtained.

[0130] (2) Frame extraction: Frames are extracted at 5-frame intervals, and approximately 1000 frames are obtained for each working condition. The extracted images are saved in the format of "working condition identifier_serial number" to ensure that the extracted images correspond to the experimental working conditions.

[0131] (3) Annotation: The CVAT annotation tool is used to perform frame-by-frame fine annotation of the bubble instances with polygonal outlines and generate JSON format annotation files.

[0132] (4) Format conversion: Normalize the vertex coordinates in the JSON annotation file according to the image width and height, and convert them into a general instance segmentation annotation format, such as the YOLO instance segmentation format. Each annotation file contains a category ID and normalized polygon vertex coordinates.

[0133] (5) Data set partitioning: The samples are randomly divided into training set, validation set and test set in a ratio of 8:1:1, and the random seed is fixed to ensure that the data set partitioning is repeatable.

[0134] Please see Figure 3 The construction process of the bubble instance segmentation dataset includes frame extraction from the original video, bubble polygon contour annotation, annotation format conversion, and dataset partitioning. Specifically, frames are extracted from the original video of bubble clusters for each working condition at a set frame interval. Each bubble instance in the extracted frame image is labeled with a polygon contour at the boundary level. The vertex coordinates in the annotation file are normalized according to the image width and height, converted into a general instance segmentation annotation format, and the images and their corresponding labels are synchronously divided into training set, validation set, and test set according to a preset ratio.

[0135] (6) Image calibration: Before the experiment, standard scale images were taken under the same shooting conditions. The interactive calibration tool cal_9.py was used to select two calibration points with known physical distances by mouse, and the pixel scale factor k was automatically calculated. In this embodiment, k=0.15mm / pixel.

[0136] Example 2 This embodiment is a semi-automatic annotation and dataset iterative expansion embodiment.

[0137] Please see Figure 4 The semi-automatic annotation process includes batch inference of newly added bubble images, image splitting based on prediction confidence, automatic label saving, manual review, and iterative expansion of the training set. The trained deep learning instance segmentation model first infers the newly added bubble images; based on the highest prediction confidence of bubble instances in the images, the newly added bubble images are divided into high-confidence images and low-confidence images; high-confidence images and their predicted labels are automatically stored in the training set expansion pool, while low-confidence images are transferred to the directory awaiting manual review; the automatically generated labels and the manually corrected labels are merged into the original training set, and the deep learning instance segmentation model is retrained.

[0138] In this embodiment, as an optional implementation, the trained YOLO instance segmentation model is used to perform semi-automatic annotation of the bubble image of the new working condition; in other implementations, Mask R-CNN, HTC, PP-YOLO or other instance segmentation models can also be used.

[0139] (1) Model inference: Load the trained instance segmentation model, such as the YOLO instance segmentation model, and perform batch inference on the new image. The inference parameters are set to confidence level 0.4, IoU threshold 0.5, and retina_masks=True.

[0140] (2) Automatic sorting: Set the confidence threshold to 0.9. For images with the highest confidence greater than or equal to 0.9, automatically save the original image and instance segmentation format label file, and generate a visual image with mask and bounding box overlay for manual sampling; for images with the highest confidence less than 0.9, classify them into the directory to be manually reviewed.

[0141] (3) Data set expansion: The automatically labeled and manually corrected data are merged into the training set, the model is retrained, and the model accuracy is iteratively improved.

[0142] Example 3 This embodiment is an example of instance segmentation model training and selection.

[0143] This embodiment completes model training on a high-performance GPU server, which is configured with dual AMD EPYC 9754 processors, 1536GB DDR5 RECC memory, and an NVIDIA GeForce RTX 4090 graphics card.

[0144] (1) Model Selection: As an optional implementation method, under the condition of controlling the dataset partitioning and hyperparameter consistency, three instance segmentation models, YOLOv8x-seg, YOLO11x-seg, and YOLO26x-seg, were trained in parallel. The training parameters were epochs=1000, patience=50, imgsz=1280, optimizer=SGD, lr0=0.01, cos_lr=True, and close_mosaic=20. The training results showed that YOLOv8x-seg achieved a mask mAP50 of 0.874, a mask mAP50-95 of 0.520, and a mask recall of 0.820, all of which were superior to the other two models. In this implementation method, YOLOv8x-seg was selected as the base model.

[0145] (2) Optimization of training rounds: Ablation analysis was performed using training schemes of 200, 300, 400, 500, 600, 700, 800, and 1000 rounds. The results showed that the mAP50 reached 0.92484, the mAP50-95 reached 0.54902, the precision reached 0.90939, and the recall reached 0.89917 after 800 rounds of training, demonstrating the best overall performance. Therefore, 800 rounds were determined as the final training parameter.

[0146] Example 4 This embodiment is an example of bubble image post-processing and parameter calculation.

[0147] In this embodiment, as an optional implementation, the trained YOLOv8x-seg model is used to perform batch inference on the frame-by-frame bubble images to establish a complete post-processing and parameter calculation process.

[0148] (1) Model inference and contour extraction: Input the preprocessed image frame, and the model outputs the mask for each bubble instance. Convert the mask into a binary image with a threshold of 0.5, extract the outer contour RETR_EXTERNAL, and select the outer contour with the largest area as the effective boundary. If the number of contour points is less than 5, the instance is discarded. Calculate the pixel area, pixel perimeter, and centroid coordinates for the effective contour.

[0149] Please see Figure 5 The bubble instance mask output by the model is converted into a binary image after being processed by a preset mask threshold, and the outer contour is extracted from the binary image. When the same bubble instance corresponds to multiple outer contours, the outer contour with the largest area is selected as the effective boundary of the bubble. The pixel projection area, pixel perimeter, and centroid coordinates of the bubble are calculated based on the effective boundary, and ellipse fitting is performed on the effective boundary to obtain the major axis diameter, minor axis diameter, and tilt angle of the bubble.

[0150] (2) Ellipse fitting and error prevention verification: Ellipse fitting is performed on the effective contour to obtain the major and minor axes and the tilt angle. A maximum diameter threshold of 100mm is set. When the fitting is abnormal, the equivalent circle is calculated by back-calculating the pixel area.

[0151] Figure 5 The verification process for abnormal fitting results is also shown. When the number of contour points of the effective contour is insufficient, ellipse fitting fails, the fitted major axis exceeds the maximum diameter threshold, the centroid coordinates are missing, or the area of ​​the fitted ellipse exceeds a preset multiple of the actual pixel area, the replacement calculation is performed using the circumscribed rectangle or the equivalent circle diameter derived from the pixel projection area.

[0152] (3) Calculation of three-dimensional geometric parameters: The three-dimensional surface area and volume of the bubble are approximated by a flat rotating ellipsoid and converted into actual physical units by combining the pixel scale coefficient.

[0153] (4) Coordinate transformation: The image coordinate system is transformed into a physical coordinate system with the bottom of the pool as the origin and the vertical upward direction as the positive direction.

[0154] (5) Automatic updating of water properties: The IAPWS-97 function is called to automatically calculate the density, dynamic viscosity and surface tension of water based on the operating temperature and system absolute pressure. For example, the density of water is approximately 997 kg / m³ at 25℃ and 0.1 MPa.

[0155] Example 5 This embodiment is an example of bubble tracking and motion parameter calculation.

[0156] Please see Figure 6During cross-frame tracking, the bubble detection results in consecutive frames are matched based on Kalman filtering and data association. The same trajectory number is assigned to the same bubble in consecutive frames, and the centroid coordinates and morphological parameters of the bubble in each frame are associated according to the trajectory number to construct the cross-frame motion trajectory of the bubble.

[0157] In this embodiment, as an optional implementation, the ByteTrack tracker is used to establish the bubble's cross-frame trajectory and calculate motion and mechanical parameters; in other implementations, SORT, DeepSORT, or other multi-target tracking algorithms based on motion prediction and data association can also be used.

[0158] (1) Track construction: As an optional implementation, the ByteTrack tracker assigns a stable track number to the same bubble in consecutive frames. The tracking parameters are conf=0.35, iou=0.5, and tracker=bytetrack.yaml.

[0159] (2) Centroid smoothing: Adaptive noise reduction smoothing is performed on the centroid coordinate sequence using median filtering with a window size of 3 to eliminate inter-frame jumps.

[0160] For the centroid coordinate sequence corresponding to the same trajectory number, median filtering is used to eliminate short-term transient distortion coordinates. The axial velocity, radial velocity, and composite velocity of the bubble are calculated based on the smoothed centroid positions of adjacent frames. Then, the axial acceleration and radial acceleration are calculated based on the velocity sequence, thereby obtaining... Figure 6 The diagram shows the relationships between bubble detection, trajectory association, coordinate smoothing, and motion parameter calculation.

[0161] (3) Velocity calculation: Based on the smoothed centroid coordinates, the axial velocity v is calculated. y Radial velocity v x and synthesis speed v total The axial velocity is corrected for a negative sign and smoothed using a three-point moving average.

[0162] (4) Acceleration calculation: axial acceleration a is calculated based on the smoothed velocity sequence. y and radial acceleration a x And a three-point moving average is used for smoothing.

[0163] (5) Calculation of dimensionless parameters: using the composite velocity v total Calculate Re and We, calculate Eo using the equivalent diameter, calculate Fr and Eu using the axial velocity, and calculate Ca and Cd; where Re is used to characterize the ratio of inertial force to viscous force, We is used to characterize the ratio of inertial force to surface tension, and Eo is used to characterize the ratio of buoyancy to surface tension.

[0164] Example 6 This embodiment is an example of detecting bubble aggregation and rupture events.

[0165] In this embodiment, aggregation and rupture events are detected based on bubble volume time series.

[0166] (1) Calculation of volume change rate: For each bubble trajectory, calculate the volume change rate between adjacent frames.

[0167] (2) Event discrimination: When the volume change rate is greater than 0.4, it is marked as a coalescence event; when the volume change rate is less than -0.3, it is marked as a rupture event.

[0168] (3) Event statistics: The number of merging and breaking events is accumulated frame by frame, the event distribution is statistically analyzed according to the axial interval, and the spatial pattern of merging and breaking is analyzed.

[0169] Example 7 This embodiment is an example of bubble group statistical analysis and multi-level data organization.

[0170] Please see Figure 7 The bubble parameter calculation and statistical output process takes the bubble instance profile and cross-frame trajectory as input. Based on the bubble's projected area, perimeter, and ellipse fitting results, the equivalent diameter, deformation ratio, roundness, 3D surface area, and 3D volume are calculated. Axial velocity, radial velocity, combined velocity, and acceleration are calculated based on the bubble's centroid trajectory. The density, dynamic viscosity, and surface tension of water are obtained based on the liquid phase temperature and system absolute pressure. Combined with the bubble's geometric and kinematic parameters, the Reynolds number, Weber number, Etworth number, Froude number, Euler number, capillary number, and drag coefficient are calculated.

[0171] Based on the three-dimensional volume change rate of adjacent frames of the same bubble trajectory, coalescence and bursting events are identified. After anomaly cleaning of the bubble data, the obtained parameters are organized into bubble-by-bubble and frame-by-frame data, trajectory statistics, frame-by-frame summary data, and global statistics. The frame-by-frame summary adopts the volume-weighted average method and calculates the Sotter average diameter, three-dimensional volumetric gas holdup, bubble count, total surface area, total volume, and the number of coalescence and bursting events. Finally, the bubble trajectory, frame-by-frame summary results, and global statistics are output.

[0172] In this embodiment, a systematic statistical analysis is performed based on bubble group parameter data under multiple operating conditions.

[0173] (1) Bubble-by-frame data: including frame number, trajectory ID, pixel centroid, physical centroid, equivalent diameter, major and minor axes, surface area, volume, aspect ratio, roundness, tilt angle, axial velocity, radial velocity, composite velocity, acceleration, Re, We, Eo, Fr, Eu, Ca, Cd, volume change rate, cluster marker, break marker and large bubble marker, totaling 25+ columns.

[0174] (2) Track-level statistics: including track ID, lifetime, maximum diameter, birth location, average dip angle, average synthesis rate, average Ca, average Cd, total number of aggregates, total number of breakages and average roundness.

[0175] (3) Frame-by-frame summary: A volume-weighted average method is used, including frame number, time, bubble count, total surface area, total volume, three-dimensional gas holdup, and D. 32 Frame-by-frame average equivalent diameter, frame-by-frame average surface area, frame-by-frame average volume, frame-by-frame average axial velocity, frame-by-frame average radial velocity, frame-by-frame average composite velocity, frame-by-frame average acceleration, frame-by-frame average Re, We, Eo, Fr, Eu, Ca, Cd, tilt angle, large bubble count, number of coalescence events, and number of rupture events.

[0176] (4) Global statistics: The average of the frame-by-frame summary data is calculated and a summary data line for each working condition is output, including physical property parameters, bubble size statistics, average group parameters, total number of events and total number of detected bubbles.

[0177] (5) Anomaly cleaning: Data cleaning is carried out using a five-fold strategy: trajectory length not less than 5 frames, physical scale less than 100mm, velocity quantile 0.1%-99.9%, Euler number 99th percentile, and extreme samples.

[0178] (6) Large bubble identification: Large bubbles are identified by using two criteria: diameter greater than the mean plus 1σ and surface area greater than the mean plus 1σ. The number of large bubbles is counted frame by frame.

[0179] Example 8 This embodiment is an example of cross-condition data merging and influence pattern analysis.

[0180] In this embodiment, a systematic comparative analysis is performed based on global statistical data from multiple operating conditions.

[0181] (1) Data merging: The global statistical CSV files under different nozzle diameters A1, A3, A5 and pressure difference B10-B100 conditions are merged into a unified dataset.

[0182] (2) Analysis of the influence of nozzle diameter: With the pressure difference, temperature and system pressure fixed, the influence of nozzle diameter on D32, gas holdup, total surface area, specific surface area and rising speed is analyzed.

[0183] (3) Analysis of the effect of incident pressure difference: With the nozzle diameter, temperature and system pressure fixed, the incremental sequence effect of incident pressure difference on bubble group parameters is analyzed.

[0184] (4) Analysis of the influence of liquid phase temperature: Under a representative pressure difference, the variation law of bubble group parameters in the temperature range of 25℃ to 100℃ is analyzed.

[0185] (5) Analysis of the influence of system pressure: Under a representative pressure difference, the variation law of bubble group parameters in the system pressure range of 100kPa to 400kPa is analyzed.

[0186] (6) Establishment of empirical correlation: Taking nozzle diameter D and incident pressure difference ΔP as the basic variables, temperature correction term and system pressure correction term are introduced, and the correlation is established for D. 32 The basic terms, including air holdup, specific surface area, and rising speed, were fitted in a stratified manner, and the R² values ​​of the training set were all higher than 0.95.

[0187] Example 9 This embodiment is a batch processing pipeline embodiment.

[0188] In this embodiment, batch processing of 57 working conditions is achieved through a configuration-driven automated production line.

[0189] (1) Parameter configuration: one line for each working condition. The parameter configuration can be in the form of Excel, CSV, JSON or database table, and includes VIDEO_PATH, MODEL_PATH, OUTPUT_DIR, WATER_TEMPERATURE_C, SYSTEM_PRESSURE_MPA, PRESSURE_DIFF_KPA, PIXEL_SIZE and FPS fields.

[0190] (2) Batch processing main program: Reads the configuration line by line, sets the global parameters, and then calls the single-condition processing flow. The single-condition flow executes the following steps in sequence: water property update, video frame-by-frame tracking and geometric calculation, motion parameter and dimensionless parameter calculation, event detection, data cleaning, large bubble recognition, four-level CSV output, 28 types of chart generation, and labeled video generation.

[0191] (3) Fault tolerance mechanism: Each working condition is wrapped in try-except. When an error occurs, the error message and backtrack stack are printed, and the process is automatically skipped and continues to the next working condition.

[0192] In summary, this invention provides a method and system for detecting two-phase flow parameters of bubble swarms in pool-type washing systems based on instance segmentation. Through high-speed image acquisition, instance-level data annotation, deep learning instance segmentation model training, bubble mask post-processing, cross-frame tracking based on Kalman filtering and data association, automatic water property updating, dimensionless parameter calculation, aggregation and rupture event detection, and multi-level statistical output, it establishes an automated processing chain from raw high-speed video to bubble geometric parameters, motion parameters, mechanical parameters, event parameters, and swarm statistical parameters. This method can automatically identify bubble instance contours and extract parameters under complex bubble swarm conditions of adhesion, occlusion, boundary blurring, and rapid evolution, reducing errors from manual frame-by-frame processing and improving the efficiency, consistency, and repeatability of acquiring two-phase flow parameters for bubble swarms in pool-type washing systems. Furthermore, by limiting the specific model, tracker, and threshold parameters to the instance level, the scope of protection of this invention can cover similar automated detection systems implemented using equivalent instance segmentation networks, tracking algorithms, and parameter configuration methods.

[0193] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0194] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0195] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0196] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0197] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0198] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0199] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random-access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0200] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0201] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0202] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0203] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A method for detecting two-phase flow parameters of bubble swarms in pool-type water washing based on instance segmentation, characterized in that, Includes the following steps: Video of bubble clusters during the pool washing process was collected, the pixel scale coefficient was determined based on the scale image, and the volume of the control volume was determined based on the inner diameter of the experimental device and the field of view height. The trained deep learning instance segmentation model is used to infer the bubble group video frame by frame to obtain bubble instance masks. The bubble instance masks are then binarized, their outer contours are extracted, and ellipse fitting is performed to obtain the centroid coordinates, major and minor axes, tilt angle, projected area, and perimeter of the bubbles, which are then converted into physical scale parameters. Kalman filtering and data association algorithms are used to associate the same bubble in consecutive frames. Median filtering is applied to the bubble centroid coordinate sequence, and the axial velocity, radial velocity, composite velocity and acceleration of the bubble are calculated. The equivalent diameter of the bubble is calculated based on the projected area, the deformation ratio is calculated based on the major and minor axes, the roundness is calculated based on the projected area and perimeter, and the three-dimensional surface area and volume of the bubble are approximated using a flattened rotating ellipsoid. The density, dynamic viscosity, and surface tension of water are calculated based on the liquid phase temperature and the absolute pressure of the system. The Reynolds number, Weber number, Etworth number, Froude number, Euler number, capillary number, and drag coefficient are calculated in combination with the equivalent diameter, axial velocity, and combined velocity. Clustering and bursting events are identified based on the rate of change of volume of adjacent frames of the same bubble trajectory. The bubble group parameters are calculated frame by frame using a volume-weighted average method. The Sotter average diameter is calculated, and the three-dimensional volumetric gas holdup is calculated based on the three-dimensional volume of the bubble and the volume of the control volume.

2. The method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation according to claim 1, characterized in that, The training process of the deep learning instance segmentation model includes: The bubble group video is frame-sampling at set time intervals. The bubble instances in the frame-sampling images are labeled with polygonal outlines. The coordinates of the polygon vertices are normalized according to the image width and height and converted into an instance segmentation labeling format. The image samples are divided into training set, validation set and test set. Deep learning instance segmentation models of different specifications are trained under the same dataset partitioning and hyperparameter conditions. The base model is determined based on bounding box loss, mask segmentation loss, mAP50 and mAP50-95, and the number of training rounds is determined based on mAP50, mAP50-95, precision and recall corresponding to different training rounds.

3. The method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation according to claim 2, characterized in that, It also includes iteratively expanding the training set: The trained deep learning instance segmentation model is used to perform batch inference on the newly added bubble images. The newly added bubble images with the highest confidence level not lower than the preset confidence threshold and their predicted labels are stored in the training set expansion pool, and the newly added bubble images with the highest confidence level lower than the preset confidence threshold are stored in the manual review directory. The predicted labels and the manually corrected labels are incorporated into the training set, and the deep learning instance segmentation model is retrained.

4. The method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation according to claim 1, characterized in that, The pixel scale factor is: The axial physical coordinates of the bubble's center of mass are: The volume of the control body is: in, This represents the actual physical distance between two calibration points on a scaled image. The pixel distance between two calibration points. Image height, The vertical pixel coordinates of the bubble's centroid. The inner diameter of the experimental setup The physical height of the field of view.

5. The method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation according to claim 1, characterized in that, Processing the bubble instance mask includes: The bubble instance is converted into a binary image according to a preset mask threshold. The outer contour of the binary image is extracted, and the outer contour with the largest area is determined as the effective contour. When the number of contour points of the effective contour is less than 5, the corresponding bubble instance is removed; when the ellipse fitting fails, the length and width of the outer rectangle of the effective contour are used to replace the major and minor axes; when the major axis exceeds the preset maximum diameter threshold, the centroid coordinates are missing, or the area of ​​the fitted ellipse exceeds a preset multiple of the bubble projection area, the equivalent circle diameter is calculated based on the bubble projection area.

6. The method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation according to claim 1, characterized in that, The centroid coordinates of the same bubble in consecutive frames are associated using trajectory numbers, and the centroid coordinates are then filtered using a median filter with a preset window length; the axial and radial velocities of the bubble are respectively: The rate of bubble formation is: in, and The first The horizontal and vertical pixel coordinates of the bubble centroid in the frame. The time interval between adjacent frames is defined as follows: the axial velocity and radial velocity are subjected to moving average processing, and the axial acceleration and radial acceleration are calculated based on the processed velocity sequence.

7. The method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation according to claim 1, characterized in that, The equivalent diameter, deformation ratio, and roundness are respectively: in, Let be the pixel projection area of ​​the bubble. Let be the pixel perimeter of the bubble. To fit the major axis diameter of the ellipse, To fit the minor axis diameter of the ellipse, and ; make , ,and ,when At that time, the three-dimensional surface area of ​​the bubble is: when At that time, the three-dimensional surface area of ​​the bubble is: in: The three-dimensional volume of the bubble is: The average diameter of the Sott is: 。 8. The method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation according to claim 1, characterized in that, The density of water was calculated using the IAPWS-97 water and steam property formulas, based on the liquid phase temperature and the system absolute pressure. Dynamic viscosity and surface tension The Reynolds number, Weber number, Etworth number, Froude number, Euler number, and capillary number are respectively: in, It is the acceleration due to gravity. The incident pressure difference; when At that time, the drag coefficient is: when At that time, the drag coefficient is: 。 9. The method for detecting two-phase flow parameters of a pool-type water washing bubble swarm based on instance segmentation according to claim 1, characterized in that, The rate of volume change between adjacent frames within the same bubble trajectory is: When the volume change rate is greater than a first preset volume change rate threshold, the corresponding bubble is marked as a coalescence event; when the volume change rate is less than a second preset volume change rate threshold, the corresponding bubble is marked as a rupture event. The volume-weighted average of the bubble swarm parameters frame by frame is: The three-dimensional volumetric gas holdup is: in, For the first The three-dimensional volume of a bubble. For the first The parameters to be statistically analyzed for each bubble are organized into bubble-by-bubble and frame-by-frame data, trajectory statistics data, frame-by-frame summary data, and global statistics data.

10. A two-phase flow parameter detection system for pool-type water washing bubble swarms based on instance segmentation, characterized in that, include: The image acquisition and calibration module is used to acquire video of bubble groups during the pool washing process, determine the pixel scale coefficient based on the scale image, and determine the volume of the control body based on the inner diameter of the experimental device and the field of view height. The instance segmentation and contour extraction module is used to infer the frame-by-frame images of the bubble group video using a trained deep learning instance segmentation model, obtain bubble instance masks, binarize the bubble instance masks, extract the external contours and fit ellipses to obtain the centroid coordinates, major and minor axes, tilt angle, projected area and perimeter of the bubbles, and convert them into physical scale parameters. The trajectory tracking and motion parameter calculation module is used to associate the same bubble in consecutive frames using Kalman filtering and data association algorithms, perform median filtering on the bubble centroid coordinate sequence, and calculate the bubble's axial velocity, radial velocity, composite velocity, and acceleration. The geometric parameter calculation module is used to calculate the equivalent diameter of the bubble based on the projected area, calculate the deformation ratio based on the major and minor axes, calculate the roundness based on the projected area and perimeter, and use a flattened rotating ellipsoid to approximate the three-dimensional surface area and volume of the bubble. The physical properties and dimensionless parameter calculation module is used to calculate the density, dynamic viscosity and surface tension of water based on the liquid phase temperature and the absolute pressure of the system, and to calculate the Reynolds number, Weber number, Etworth number, Froude number, Euler number, capillary number and drag coefficient in combination with the equivalent diameter, axial velocity and the combined velocity. The event detection and group statistics module is used to identify merging and bursting events based on the volume change rate of adjacent frames of the same bubble trajectory, calculate the bubble group parameters frame by frame using the volume weighted average method, calculate the Sotter average diameter, and calculate the three-dimensional volumetric gas holdup based on the three-dimensional volume of the bubble and the volume of the control volume.