| Gas-liquid two-phase flow has important applications in critical science and technology in areas such as nuclear energy and industrial systems.One of the current research hotspots is the use of high spatial resolution cameras to capture the transient characteristics of both continuous and dispersed phases.However,the workflow and bubble distribution parameters are heavily dependent on complex experimental conditions,and therefore in-depth research and analysis on the tracking of bubble motion trajectories and their intrinsic operating principles have not been able to reach satisfactory conclusions so far.With the wide application of deep learning in the field of target detection,this has brought new technical means for the detection and tracking of bubble trajectories.In this paper,we construct a lightweight multi-bubble detection and tracking model based on YOLOv4 network to improve the model inference speed of the network and achieve real-time tracking purpose.First,to address the problem of experimentally collected bubble flow data without labels,Label-Studio is used to produce training set labels.The raw bubble flow data are obtained by simulating the gas-liquid two-phase flow phenomenon through the experimental setup and using a high-speed camera to capture the bubble motion process in the two-phase flow.Second,to address the problem of bubble occlusion or overlap in this dataset,a regression loss function based on KL scatter is introduced for detection using YOLOv4 network.This loss function can simultaneously learn the uncertainty in the regression and localization of the detection frame,and the applicability of the loss function is compared and analyzed to verify that the proposed loss function is the best loss function.Further,to address the problem of high experimental cost caused by fixed channel pruning rate,a global optimal threshold-based method is proposed through theoretical derivation to search for the optimal pruning rate,and experiments are used to verify the existence of the optimal pruning rate.The channel pruning method based on the global optimal threshold can search the optimal pruning rate adaptively and greatly reduce the experimental time.After pruning,fine-tuning is performed to recover the detection accuracy,and a lightweight YOLOv4 network model is obtained to solve the problem of detecting realtime bubbles.Finally,the SORT algorithm is used to track the trajectories of bubbles,and finally the multi-bubble trajectories containing partial overlap are obtained. |