A neutron bubble detector counting method, system, medium, and program product

By acquiring images from multiple angles and combining them with target detection models and optical character recognition technology, the problems of low counting efficiency and large errors in neutron bubble detectors have been solved, achieving high-quality and accurate automatic bubble counting.

CN121385964BActive Publication Date: 2026-03-27NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing neutron bubble detector counting methods are inefficient, susceptible to human factors, and have large counting errors in high-density bubble environments, making it difficult to achieve high-quality, accurate, and automated data management.

Method used

By acquiring multiple frames of detection images from multiple angles, identifying bubble positions through a pre-trained target detection model, matching bubble numbers using cross-union ratio thresholding, and simultaneously acquiring detector identity information using optical character recognition technology, high-quality and accurate bubble counting is achieved.

Benefits of technology

It improves the accuracy and efficiency of bubble counting, reduces the complexity of manual operation, and achieves high-quality, accurate, and universal automatic bubble counting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121385964B_ABST
    Figure CN121385964B_ABST
Patent Text Reader

Abstract

The application discloses a neutron bubble detector counting method, system, medium and program product, and the method comprises the following steps: acquiring a plurality of detection images collected at multiple angles in sequence around a neutron bubble detector; segmenting and preprocessing to extract a bubble region; using a target detection model to identify position information of the bubble for the bubble region; assigning a number to the bubble identified in the first detection image, and performing the following processing on the bubble identified in any Nth detection image: calculating the intersection over union of the detection box of the bubble and the detection box of each bubble identified in a specified reference detection image, if the intersection over union is greater than a preset threshold, assigning the number of the corresponding bubble in the specified reference detection image to the bubble, otherwise assigning a new number to the bubble; and outputting a counting value of the number assigned to the bubble in all detection images. The application aims to realize high-quality, accurate and highly universal automatic bubble counting for a neutron bubble detector.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application mainly relates to the field of neutron radiation dose measurement, and particularly relates to a neutron bubble detector counting method, system, medium and program product. BACKGROUND

[0002] The neutron bubble detector is a radiation detection device based on superheated droplet technology, which is widely used for measuring neutron radiation dose. Its working principle is to disperse tiny droplets in a superheated state in a gel. When neutrons are transmitted therein, they will generate recoil protons through elastic collision. The recoil protons deposit energy through collision ionization when transporting in high-pressure gel, causing the droplets to rapidly vaporize to form visible bubbles. The number of these bubbles is positively correlated with the dose of neutron radiation. Therefore, accurately counting the number of bubbles is a key step for evaluating the intensity of neutron radiation.

[0003] The traditional bubble counting method mainly relies on manual visual observation or simple microscope assisted manual counting. Although this method is simple to operate, it has the following shortcomings when dealing with a large number of detectors or high bubble density scenarios: first, manual counting is inefficient and difficult to meet the detection needs of large scale and high throughput; second, manual counting is easily affected by the subjective judgment of the operator, resulting in large counting errors; in addition, manual operation cannot realize the automatic storage and management of data, which is not conducive to data tracing and auditing. In recent years, automatic counting technology has developed rapidly in the field of radiation detection. For example, some commercial devices use optical imaging combined with image processing algorithms to capture bubble images through a camera and analyze the number of bubbles using software. This method significantly improves the counting efficiency and accuracy. However, the current technology still faces several limitations: existing devices usually use single-angle lighting recording when photographing and counting bubble detectors. When the bubble density is high, bubbles will be blocked, resulting in a lower counting result. This single-angle method is difficult to meet the recognition needs in high-density bubble environments. Even if multi-angle bubble detection is used, since the multi-angle bubble detector data processing is independent of each other, for example, in the case of dense bubbles, data collected at angle 1 is not blocked by bubble a, and data collected at angle 2 is not blocked by bubble b. When multi-angle bubble detector data processing is independent of each other, there is always a bubble that is not counted. In addition, existing devices usually use threshold segmentation algorithms when counting bubbles, such as using intensity or color threshold to segment the image, and then counting the connected domains after segmentation. This counting method will produce significant counting errors when bubbles are partially blocked. SUMMARY

[0004] The technical problems solved by the present application are: In view of the above problems of the prior art, the present application provides a neutron bubble detector counting method, system, medium and program product, and aims to realize high-quality, accurate and highly universal automatic bubble counting for a neutron bubble detector.

[0005] To solve the above technical problems, the technical scheme adopted by the present application is:

[0006] A neutron bubble detector counting method, comprising the following steps:

[0007] S101, acquiring a plurality of frames of detection images collected at multiple angles in turn around a neutron bubble detector;

[0008] S102, performing segmentation preprocessing on each frame of detection image to obtain a bubble region of the neutron bubble detector;

[0009] S103, using a pre-trained target detection model to identify the position information of the bubble for the bubble region; assigning a number to the bubble identified in the first frame of detection image, and performing the following processing on each bubble identified in any Nth frame of detection image: respectively calculating the intersection over union of the detection box of the bubble and the detection box of each bubble identified in the specified reference detection image, if the intersection over union is greater than a preset threshold, assigning the number of the corresponding bubble in the specified reference detection image to the bubble, otherwise assigning a new number to the bubble;

[0010] S104, outputting the counting value of the number assigned to the bubble in all frames of detection image.

[0011] Optionally, the specified reference detection image in step S103 is the first frame of detection image or the N-1th frame of detection image.

[0012] Optionally, in step S103, when assigning a number to the bubble identified in the first frame of detection image, the step comprises:

[0013] S201, sorting the detection boxes of all bubbles in ascending order of x coordinate to obtain a preliminary detection box sequence arranged from left to right;

[0014] S202, for the preliminary detection box sequence, dividing the detection boxes with similar x coordinates into the same column, and sorting each column internally, if the difference between the x coordinates of adjacent detection boxes is greater than δ x pixels, the adjacent detection boxes are divided into different columns, thereby obtaining a plurality of column groupings of detection boxes in column units, wherein δ x is a column spacing threshold;

[0015] S203, for each column grouping of the detection frame, sorting according to the y coordinate from small to large to realize the arrangement from top to bottom; the sorted results of each column are merged in turn, and finally a detection frame array arranged in the order of column first and row second is returned, and the index number of the element in the detection frame array is taken as the number of the corresponding detection frame.

[0016] Optionally, step S102 further includes segmenting and preprocessing each frame detection image to obtain a label region of the neutron bubble detector; and step S103 further includes:

[0017] S301, the label region is subjected to contrast enhancement according to the following formula:

[0018] ;

[0019] wherein, is the label region image after contrast enhancement, is a scaling factor, is the label region, is a step function, taking 1 when the input is non-negative, otherwise taking 0; is a contrast processing threshold value;

[0020] S302, the label region image after contrast enhancement is subjected to optical character recognition to obtain identity information of the neutron bubble detector, the identity information of the neutron bubble detector including part or all of the number and position of the neutron bubble detector.

[0021] Optionally, step S102 further includes solving the y coordinate and the z coordinate of the bubble according to the size and the x coordinate of the detection frame of the bubble recognized from the first frame detection image and any i-th frame detection image:

[0022] S401, a simultaneous equation of the y coordinate of the detection frame of the first frame detection image and the i-th frame detection image is constructed for the bubble:

[0023] ;

[0024] ;

[0025] wherein, is the y coordinate of the detection frame of the bubble in the first frame detection image, is the distance of the bubble to the origin, is the included angle between the bubble and the y axis, is the y coordinate of the detection frame of the bubble in the i-th frame detection image, is the relative rotation angle between the i-th frame detection image and the first frame detection image;

[0026] S402, the distance of the bubble to the origin is solved from the simultaneous equation and the included angle between the bubble and the y-axis

[0027]

[0028]

[0029] S403, according to the included angle between the bubble and the y-axis the z coordinate of the bubble is calculated:

[0030]

[0031] wherein, the z coordinate of the bubble.

[0032] Optionally, step S104 further includes outputting the size of the detection frame of the bubble, and the x coordinate, y coordinate and z coordinate of the detection frame.

[0033] Optionally, step S104 further includes marking the detection frame for each bubble in each frame of the detected image and attaching the number of the bubble.

[0034] The application also provides a neutron bubble detector counting system, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the neutron bubble detector counting method.

[0035] The application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program or instructions, and the computer program or instructions are programmed or configured to execute the neutron bubble detector counting method by a processor.

[0036] The application also provides a computer program product, comprising a computer program or instructions, and the computer program or instructions are programmed or configured to execute the neutron bubble detector counting method by a processor.

[0037] ​​​​Compared with the prior art, the present application mainly has the following beneficial effects: the method of the present application comprises obtaining a plurality of frames of detection images collected at multiple angles in sequence around a neutron bubble detector; segmenting and preprocessing to extract a bubble region; using a target detection model to identify the position information of the bubble for the bubble region; assigning a number to the bubble identified in the first frame of detection image, and performing the following processing on the bubble identified in any Nth frame of detection image: calculating the intersection over union of the detection box of the bubble and the detection box of each bubble identified in the specified reference detection image, if the intersection over union is greater than a preset threshold, assigning the number of the corresponding bubble in the specified reference detection image to the bubble, otherwise assigning a new number to the bubble; and outputting the count value of the number assigned to the bubble in all frames of detection image, the method of the present application uses the multi-angle bubble detector data collected, and completes the counting of the bubbles in the bubble detector by using the following multi-angle simultaneous bubble number counting method, through the simultaneous use of multi-angle bubble detector data, each bubble is numbered, and a new number is assigned to a newly appearing bubble, the multi-angle simultaneous bubble number counting method improves the counting accuracy, and can realize high-quality, accurate and highly universal automatic bubble counting for the neutron bubble detector. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 It is a basic flowchart of the method of the embodiment of the present application.

[0039] Figure 2 It is a specific flowchart of the method of the embodiment of the present application.

[0040] Figure 3 It is a result diagram of the segmentation preprocessing in the embodiment of the present application.

[0041] Figure 4 It is an effect comparison before and after contrast enhancement in the embodiment of the present application, wherein (a) is a label region image before contrast enhancement, and (b) is a label region image after contrast enhancement.

[0042] Figure 5 It is a rotation diagram around the neutron bubble detector in the embodiment of the present application, wherein (a) is a rotation diagram of the yoz plane of the neutron bubble detector, and (b) is a rotation diagram of the xoy plane of the neutron bubble detector.

[0043] Figure 6 It is a bubble diagram on the yoz plane in the embodiment of the present application.

[0044] Figure 7 It is a module implementation and workflow diagram in the embodiment of the present application.

[0045] Figure 8Flowchart of the simulated detection image data in the embodiment of the present application.

[0046] Figure 9 Cylindrical probability distribution function generated in the embodiment of the present application.

[0047] Figure 10 Result comparison before and after adding the cylindrical symmetric probability distribution function in the embodiment of the present application, wherein (a) is the result before adding the cylindrical symmetric probability distribution function, and (b) is the result after adding the cylindrical symmetric probability distribution function.

[0048] Figure 11 Micro-bubble background noise in the embodiment of the present application, wherein (a) is random noise, (b) is an actual bubble detector photo, and (c) is a Gaussian circular plate noise.

[0049] Figure 12 Detection results of four frames of detection images in the embodiment of the present application, wherein (a) is the detection result of the first frame of detection image, (b) is the detection result of the second frame of detection image, (c) is the detection result of the third frame of detection image, and (d) is the detection result of the fourth frame of detection image.

[0050] Figure 13 Local magnification labeled result comparison of bubble No. 38 in the four frames of detection images in the embodiment of the present application, wherein (a) is the local magnification detection result in the first frame of detection image, (b) is the local magnification detection result in the second frame of detection image, (c) is the local magnification detection result in the third frame of detection image, (d) is the local magnification detection result in the fourth frame of detection image, (e) is the local magnification labeled result in the first frame of detection image, (f) is the local magnification labeled result in the second frame of detection image, (g) is the local magnification labeled result in the third frame of detection image, and (h) is the local magnification labeled result in the fourth frame of detection image. DETAILED DESCRIPTION

[0051] In order to make the person skilled in the art better understand the technical scheme of the present application, the following will

[0052] The technical scheme of the present application will be further described in detail in combination with the drawings in the embodiment of the present application.

[0053] As Figure 1 shown, the neutron bubble detector counting method in the embodiment includes the following steps:

[0054] S101, acquiring a plurality of frames of detection images collected at multiple angles in turn around a neutron bubble detector;

[0055] S102, segmenting and preprocessing each frame of detection image to obtain a bubble region of the neutron bubble detector.

[0056] S103, the position information of the bubble is identified by using the pre-trained target detection model for the bubble area; a number is assigned to the bubble identified in the first frame detection image, and the following processing is performed for each bubble identified in any Nth frame detection image: the intersection over union of the detection box of the bubble and the detection box of each bubble identified in the specified reference detection image is calculated respectively, that is, the ratio of the intersection to the union between the two detection boxes, if the intersection over union is greater than a preset threshold, the number of the corresponding bubble in the specified reference detection image is assigned to the bubble, otherwise a new number is assigned to the bubble;

[0057] S104, the count value of the number assigned to the bubble in all frame detection images is output.

[0058] As an optional implementation, in the embodiment, the step S101 specifically acquires a plurality of frame detection images collected by rotating four angles around the neutron bubble detector in sequence. The angle between adjacent frame detection images should not be too large to affect the accuracy of the intersection over union calculation, for example, in the embodiment, the angle between adjacent frame detection images is 1 degree, thereby obtaining 4 frame detection images. In order to avoid the influence of single backlight on the detection of the detection image, in the embodiment, the detection image is collected by rotating around the neutron bubble detector and using the rotating backlight illumination recording mode, specifically, the backlight lamp is rotated synchronously with the camera, so that the backlight angle collected at any angle is consistent, thereby improving the consistency between the plurality of frame detection images and improving the accuracy of bubble detection. It should be noted that the above rotation is a relative rotation, which can be active rotation of the neutron bubble detector, or active rotation of both the camera and the backlight lamp, which can achieve the same effect.

[0059] As shown in Figure 2 , in the embodiment, the reference detection image specified in the step S103 is the first frame detection image, that is, the following processing is performed for each bubble identified in any Nth frame detection image: the intersection over union of the detection box of the bubble in the Nth frame detection image and the detection box of each bubble identified in the first frame detection image is calculated respectively, if the intersection over union is greater than a preset threshold, the number of the corresponding bubble in the specified reference detection image is assigned to the bubble, otherwise a new number is assigned to the bubble. In addition, the N-1th frame detection image can also be used as the specified reference detection image, that is: the intersection over union of the detection box of the bubble in the Nth frame detection image and the detection box of each bubble identified in the N-1th frame detection image is calculated respectively, if the intersection over union is greater than a preset threshold, the number of the corresponding bubble in the specified reference detection image is assigned to the bubble, otherwise a new number is assigned to the bubble. Referring to Figure 2When the processed image is not the first frame image, the image processing procedure is completely consistent, only different in the bubble detection module, for example, for the Nth frame image, the bubble recognition neural network obtains the position information of the bubble, and the bubble detection frame is matched with the bubble detection frame in the (N-1)th frame image through an IOU threshold, if the matching threshold is met, the number of the bubble in the (N-1)th frame image is assigned to the bubble in the Nth frame image. When a certain bubble in the Nth frame does not meet the matching threshold through IOU threshold matching with all bubble detection frames in the (N-1)th frame image, it is marked as a new bubble and assigned a new number. For example, for the (N-1)th frame image, m bubbles are detected, and the bubble number in the first frame image is the smallest, which is 1, and the largest is m. At this time, for the new bubble in the Nth frame image, the number assigned is m+1. In this way, the detection of the Nth frame image is completed. By analogy, the detection of all bubbles in all frames of images is completed. For example, for the data collected at four angles, 37 bubbles are detected in the first and second frames, and after the bubble numbered 32, a new bubble appears in the third frame, which is numbered 38. In the fourth frame, no new bubble is detected, and the maximum number is still 38.

[0060] When the step S102 performs segmentation preprocessing on each frame of the detected image to obtain the bubble region of the neutron bubble detector, the bubble region of the neutron bubble detector can be calibrated in advance, so as to obtain the calibrated bubble region through segmentation preprocessing.

[0061] When the step S103 identifies the position information of the bubble by using the pre-trained target detection model (named bubble recognition neural network in this embodiment, as shown in Figure 2 The target detection model can use the required target detection model, such as YOLOv8 model, according to the needs. Since the target detection model and its pre-training are both existing methods, the implementation details are not described here. The position information of the bubble is identified by using the pre-trained target detection model, and the result includes the position and size information of the bubble detection frame.

[0062] When the step S103 assigns a number to the bubble identified in the first frame of the detected image, the required numbering rule can be selected according to the needs, for example, the bubbles are numbered according to the order output by the target detection model, and each bubble has its own separate number. However, this ordering method often has randomness, and as an optional embodiment, this embodiment provides an ordering method that is more consistent with the human brain counting logic, so that the experimental personnel can more easily verify the data when tracing the data:

[0063] S201, sort all bubble detection frames in ascending order of x coordinate (horizontal coordinate of the upper left corner of the detection frame), and obtain a preliminary detection frame sequence arranged from left to right;

[0064] S202, for the preliminary detection frame sequence, the detection frame with similar x coordinates is divided into the same column, and each column is sorted respectively, and the x coordinates of adjacent detection frames are obtained. The difference value is greater than the interval threshold value of the column, and the adjacent detection frames are divided into different columns, so as to obtain a plurality of column grouping detection frames. The interval threshold value of the column can be adjusted according to the actual situation;

[0065] S203, for each detection frame column grouping, the y coordinates (the vertical coordinates of the upper left corner of the detection frame) are sorted from small to large to realize the arrangement from top to bottom; the sorted results of the columns are combined in turn, and finally a detection frame array arranged in the order of column first and row second is returned, and the index number of the element in the detection frame array is taken as the number of the corresponding detection frame. Through the arrangement of the detection frame in this way, it is more in line with the counting logic of the human brain, and it is also easier to check the data when tracing the data.

[0066] When counting the bubble detector, it is often necessary to record the number of the detector synchronously, so as to trace and locate the number of bubbles. However, when counting the bubble detector, the existing device often needs manual input of the number, which significantly increases the complexity of the operation of the experimental personnel. In order to solve the above technical problem, the step S102 of the embodiment further includes segmenting and preprocessing each frame of detection image to obtain a label area of the neutron bubble detector. Similarly, the label area of the neutron bubble detector can be calibrated in advance, so as to segment and preprocess to obtain the calibrated label area, Figure 3 The schematic diagram of the bubble area and the label area obtained by segmenting and preprocessing in the embodiment. In the optical character recognition module, since the back light illumination method is adopted in the embodiment, the brightness of the label area is very weak. For the data collected in the experiment, the code value of the label area is often between 0 and 10 (8-bit quantization accuracy), and the contrast is very poor. When input into the OCR module, the test tube number cannot be recognized. In order to solve the above problem, the step S103 of the embodiment further includes:

[0067] S301, the contrast of the label area is enhanced according to the following formula:

[0068] ;

[0069] Wherein, is the label area image after contrast enhancement, is the scaling factor, is the label area, is a step function, which takes 1 when the input is non-negative, otherwise takes 0; is the contrast processing threshold; for 8-bit quantized picture data, the contrast processing threshold <255, the maximum value of is set to 255.Figure 4 For this embodiment =50、 The image shows a comparison of the contrast enhancement effect before and after (a) enhancement, where (a) is the label area image before contrast enhancement and (b) is the label area image after contrast enhancement. It is evident that the contrast enhancement algorithm can improve the accuracy of optical character recognition with simple numerical calculations.

[0070] S302, Optical Character Recognition (OCR) is performed on the contrast-enhanced label area image to obtain the identity information of the neutron bubble detector. The identity information includes part or all of the neutron bubble detector's number and location. This embodiment introduces a dual-region processing algorithm: the aforementioned method is used to detect the number of bubbles in the bubble area, while an OCR module is used to detect the test tube number area. Both methods work together to achieve synchronous automatic detection of the bubble number and test tube number. The extracted number information is automatically associated with the bubble count result to generate a structured data record. This function significantly reduces the workload of manual number input by staff and lowers the risk of numbering errors.

[0071] Because the angles differ between multiple detection images, it is impossible to obtain a unique two-dimensional position of the bubble detection box. To achieve precise bubble positioning, this embodiment can further utilize the inter-frame bubble position information, and can also absolutely determine the three-dimensional position of the bubble.

[0072] Figure 5 This is a rotational schematic diagram of the neutron bubble detector in an embodiment of the present invention, wherein (a) is a rotational schematic diagram of the yoz plane of the neutron bubble detector, and (b) is a rotational schematic diagram of the xoy plane of the neutron bubble detector. Figure 6 A schematic diagram of a bubble on the yoz plane is given. Assume the bubble's center is a distance *r* from the origin. In the first frame, the bubble's y-coordinate is y1, and in the second frame, its y-coordinate is y2. The second frame is rotated relative to the first frame. Degree. For example... Figure 5 As shown in (a) and (b), the neutron bubble detector rotates along the x-axis. The size and x-coordinate of each bubble can be determined from the first frame image. By simultaneously solving the system of equations with the second frame image, the y-coordinate and z-coordinate of each bubble can be obtained. Specifically, step S102 also includes simultaneously solving the y-coordinate and z-coordinate of the bubble based on the size and x-coordinate of the detection box of the bubble identified from the first frame detection image and any i-th frame detection image:

[0073] S401, construct the simultaneous equations for the y-coordinates of the detection boxes in the first frame and the i-th frame of the detection image for the bubble:

[0074] ;

[0075] ;

[0076] wherein, is the y coordinate of the detection frame of the bubble in the first frame detection image, is the distance of the bubble to the origin, is the angle between the bubble and the y axis, is the y coordinate of the detection frame of the bubble in the i-th frame detection image, is the relative rotation angle between the i-th frame detection image and the first frame detection image;

[0077] S402, the distance of the bubble to the origin is obtained by solving the simultaneous equations and the angle between the bubble and the y axis :

[0078] ;

[0079] ;

[0080] S403, the z coordinate of the bubble is calculated according to the angle between the bubble and the y axis :

[0081] ;

[0082] wherein, is the z coordinate of the bubble, so as to obtain the three-dimensional coordinate (x, y, z) information of each bubble.

[0083] As an optional embodiment, the step S104 of the embodiment further includes outputting the size of the detection frame of the bubble, and the x coordinate, the y coordinate and the z coordinate of the detection frame.

[0084] Figure 7 is the module implementation and workflow schematic diagram of the method of the embodiment. Referring to Figure 7It can be seen that the bubble detection module and the OCR (optical character recognition) detection module are packaged in the embodiment, the bubble detection module is used for bubble detection on the bubble region, and the OCR detection module is used for detection on the label region. The first image is segmented and preprocessed into a label region and a bubble region. The label region is input into the OCR module to read the number. The bubble region is input into the bubble detection module to count the bubbles. The image of the label region is input into the optical character recognition (OCR) module, the number of the detector in the image is extracted by using the OCR, and the number recognition result and the position information of the bubble detector are obtained. The detection frame of the bubble and the detection frame of the number are marked in the original image in combination with the bubble recognition result and the number recognition result. Finally, the bubble detection frame and the character detection frame can be framed and marked in the original image to output the recognition result and the position information, save the picture, and output the time information, the bubble count, and the neutron bubble detector number structured data.

[0085] As an optional implementation manner, as shown in Figure 8 the bubble recognition neural network in the embodiment generates simulated detection image data in addition to collecting real detection images during training:

[0086] S501, generating a cylindrical probability distribution function according to the input test tube diameter length information of the neutron bubble detector, for simulating the bubble distribution in the neutron bubble detector under real conditions; and generating a Gaussian circular plate noise function according to the input standard deviation of the Gaussian function and the number information of the Gaussian circular plate noise, for simulating the micro-bubble background noise under the neutron bubble detection condition;

[0087] S502, generating a bubble image from the cylindrical probability distribution function and the Gaussian circular plate noise function;

[0088] S503, generating simulated detection image data from the bubble image by using a bubble generation adversarial network BubGan.

[0089] The bubble generation adversarial network BubGan is an existing network model (for details, see CN119274043A), and the bubble generation adversarial network BubGAN outputs a picture and contour information of bubbles in the picture. The existing bubble generation adversarial network BubGan uses IPE The bubble image of the gas-liquid-solid three-phase flow synthesized from the bubble image of the gas-liquid two-phase flow measured by the multiphase flow meter; the contour information of the bubble is (x1, y1) (x2, y2) … (x n ,y n ). The coordinates of these points form the contour information of the bubble. The position information of the bubble is (min(x i ), min(y i ), max(x i),max(y i Using this data, a box can be drawn, which can be used to mark the position information of the bubbles. The coordinates of the four vertices of the box are:

[0090] [min(x i ),min(y i )],[min(x i ),max(y i )],[max(x i ),max(y i )],[max(x i ),min(y i )).

[0091] The bubble's position information is then converted into the input format of the bubble recognition neural network, namely:

[0092] {[min(x i )+max(x i )] / 2,[min(y i )+max(y i )] / 2,max(x i )-min(x i ),max(y i )-min(y i )}.

[0093] After being converted to the input format, the bubble recognition neural network is trained.

[0094] To simulate the bubble distribution in a neutron bubble detector under real-world conditions, this embodiment improves the bubble image generation method of the existing BubGAN bubble generation adversarial network by introducing a cylindrical symmetric probability distribution module and a Gaussian circular plate noise module.

[0095] Firstly, a cylindrical probability distribution function is generated using a cylindrical symmetric probability distribution module based on the input test tube diameter and length information of the neutron bubble detector to simulate the bubble distribution in the neutron bubble detector under real-world conditions. Consider uniform neutron irradiation on a neutron bubble detector of radius r, with a camera photographing the detector along the y-direction. In the photographic results, the probability of bubble appearance is positively correlated with the interaction distance between the neutron and the medium inside the bubble detector. Let the center of the bubble detector be x=0, then the interaction distance between the neutron and the neutron bubble detector... satisfy:

[0096] ;

[0097] in, The distance from the bubble to the origin. Let x be the x-coordinate of the bubble, and thus the functional expression for the probability distribution function of generating the column can be obtained as follows:

[0098] ;

[0099] in, Let be the cylindrical probability distribution function. For a neutron bubble detector with a radius of 8 mm, the probability density function distribution of the generated bubble's x-coordinate is as follows: Figure 9 As shown. Furthermore, since the neutron bubble detector is a straight cylinder, the probability distribution of the generated bubble's vertical coordinate (z-coordinate) is uniform. By introducing a cylindrical probability distribution function, the bubble distribution under real-world conditions can be better simulated. Figure 10 Distributions (a) and (b) in the figure show the simulation statistics for approximately 1500 bubbles before (uniform distribution) and after (cylindrical symmetric probability distribution) the addition of the cylindrical symmetric probability distribution function. It can be seen that the program that adds the cylindrical symmetric probability distribution function generates bubbles that are more in line with the physical situation.

[0100] Secondly, a Gaussian circular plate noise module is introduced to simulate background noise under actual conditions.

[0101] Gaussian circular plate noise It can be represented as:

[0102] ;

[0103] in, The standard deviation of the Gaussian function is used to control the blurring degree of the Gaussian disc. This is a scaling factor used to control the intensity of the Gaussian circular plate noise. Randomly generate the center coordinates for the i-th Gaussian circular plate. By setting the number n of Gaussian circular plate noises, perform n iterations, each time randomly generating the center coordinates for the i-th Gaussian circular plate. After generating Gaussian circular noise, it is added to the bubble generation diagram. Figure 11 This is a comparison of background noise from microbubbles in an embodiment of the present invention, where (a) is random noise, (b) is an actual bubble detector photograph, and (c) is Gaussian circular plate noise. Figure 11 (b) is used as a reference for comparison. Figure 11 As shown in (a) and (c), the simulation results of Gaussian circular plate noise are closer to the real photos.

[0104] As an optional implementation, step S104 of this embodiment further includes marking a detection frame for each bubble in each frame of the detection image and adding a bubble number. Figure 12The detection results of four frames of detection images in this embodiment, wherein (a) is the detection result of the first frame of detection image, (b) is the detection result of the second frame of detection image, (c) is the detection result of the third frame of detection image, and (d) is the detection result of the fourth frame of detection image.

[0105] Figure 13 The local enlarged annotation result comparison of the bubble numbered 38 in four frames of detection images in this embodiment, wherein (a) is the local enlarged detection result in the first frame of detection image, (b) is the local enlarged detection result in the second frame of detection image, (c) is the local enlarged detection result in the third frame of detection image, (d) is the local enlarged detection result in the fourth frame of detection image, (e) is the local enlarged annotation result in the first frame of detection image, (f) is the local enlarged annotation result in the second frame of detection image, (g) is the local enlarged annotation result in the third frame of detection image, and (h) is the local enlarged annotation result in the fourth frame of detection image. See Figure 9 It can be seen that in the first and second frames of detection images, the bubble numbered 38 is partially or completely blocked, and the bubble network fails to recognize it, while in the third and fourth frames of detection images, the bubble numbered 38 is recognized and assigned a new number 38, which also proves the superiority of the method in this embodiment in bubble counting.

[0106] In addition, the embodiment also provides a neutron bubble detector counting system, which comprises a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the neutron bubble detector counting method. The embodiment also provides a computer readable storage medium, which stores a computer program or instructions programmed or configured to execute the neutron bubble detector counting method by a processor. The embodiment also provides a computer program product comprising a computer program or instructions programmed or configured to execute the neutron bubble detector counting method by a processor.

[0107] Those skilled in the art will appreciate that the technology provided herein is not limited to any particular form of implementation. The technology provided herein can be implemented in hardware, software, or a combination thereof. Those skilled in the art will appreciate that the technology provided herein can be implemented in a number of different embodiments, including method embodiments, system embodiments, and computer program product embodiments. The technology provided herein can be implemented in any combination of hardware, software, or a combination thereof. The technology provided herein can be implemented in a number of different ways, including as a computer program product stored on a computer readable storage medium, as a system on chips (SOCs), as an application specific integrated circuit (ASIC), or as a cloud service. The computer program product can be implemented using two or more computer program Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks

[0108] The above description is only preferred embodiments of the present application, the protection scope of the present application is not limited to the above-mentioned embodiments, and any technical scheme falling within the concept of the present application shall be considered as falling within the protection scope of the present application. It should be noted that, for ordinary skilled in the art, some improvements and refinements without departing from the principles of the present application are also considered as the protection scope of the present application.

Claims

1. A neutron bubble detector counting method, characterized in that, Includes the following steps: S101, acquire multiple frames of detection images acquired sequentially by rotating around the neutron bubble detector at multiple angles; S102, Perform segmentation preprocessing on each frame of the detection image to obtain the bubble region of the neutron bubble detector; S103, A pre-trained target detection model is used to identify the location information of the bubble in the bubble region; For each bubble identified in the first frame of the detection image, a number is assigned. For each bubble identified in any subsequent Nth frame of the detection image, the following processing is performed: calculate the intersection-union ratio (IUU) of the detection box of the bubble with the detection box of each bubble identified in the specified reference detection image. If the IUU is greater than a preset threshold, assign the number of the corresponding bubble in the specified reference detection image to the bubble; otherwise, assign a new number to the bubble. S104, the output is the count value of the number assigned to the bubble in all frame detection images; Step S102 further includes segmenting and preprocessing each frame of the detection image to obtain the label region of the neutron bubble detector; step S103 further includes: S301, enhance the contrast of the label area according to the following formula: ; in, This is the image of the label area after contrast enhancement. Scaling factor For the label area, This is a step function, which takes the value 1 when the input is non-negative and 0 otherwise. The contrast processing threshold; S302, Optical character recognition is performed on the contrast-enhanced label area image to obtain the identity information of the neutron bubble detector, wherein the identity information of the neutron bubble detector includes part or all of the number and location of the neutron bubble detector. Step S102 also includes solving the y and z coordinates of the bubble by simultaneously solving the detection box size and x-coordinate of the bubble identified from the first frame detection image and any i-th frame detection image: S401, construct the simultaneous equations for the y-coordinates of the detection boxes in the first frame and the i-th frame of the detection image for the bubble: ; ; in, Let y be the y-coordinate of the detection box of the bubble in the first frame of the detection image. The distance from the bubble to the origin. Let be the angle between the bubble and the y-axis. Let y be the y-coordinate of the detection box of the bubble in the i-th frame of the detection image. Let be the relative rotation angle between the i-th frame detection image and the first frame detection image; S402, Solve the simultaneous equations to obtain the distance from the bubble to the origin. and the angle between the bubble and the y-axis : ; ; S403, based on the angle between the bubble and the y-axis The z-coordinate of the bubble was calculated as follows: ; in, Let z be the z-coordinate of the bubble.

2. The neutron bubble detector counting method according to claim 1, characterized in that, The reference detection image specified in step S103 is either the first frame detection image or the (N-1)th frame detection image.

3. The neutron bubble detector counting method according to claim 1, characterized in that, When assigning numbers to the bubbles identified in the first frame of the detection image in step S103, the following steps are included: S201, Sort all the detection boxes of the bubbles in ascending order of their x-coordinates to obtain a preliminary sequence of detection boxes arranged from left to right; S202, For the initial detection box sequence, detection boxes with similar x-coordinates are grouped into the same column, and the boxes within each column are sorted. The difference in x-coordinate between adjacent detection boxes is greater than δ. x Each pixel is then divided into different columns, resulting in multiple detection box column groups based on columns, where δ x The column spacing threshold; S203: For each detection box column group, sort them from smallest to largest according to the y-coordinate to achieve a top-to-bottom arrangement; merge the sorted results of each column in turn, and finally return an array of detection boxes arranged in column-first and row-second order, and use the index number of the element in the detection box array as the number of the corresponding detection box.

4. The neutron bubble detector counting method according to claim 1, characterized in that, Step S104 also includes the size of the detection box for the output bubble, as well as the x, y, and z coordinates of the detection box.

5. The neutron bubble detector counting method according to claim 1, characterized in that, Step S104 also includes marking a detection box for each bubble in each frame of the detection image and adding a bubble number.

6. A neutron bubble detector counting system, comprising a microprocessor and a memory interconnected, characterized in that, The microprocessor is programmed or configured to perform the neutron bubble detector counting method according to any one of claims 1 to 5.

7. A computer-readable storage medium storing a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute the neutron bubble detector counting method according to any one of claims 1 to 5 via a processor.

8. A computer program product, comprising a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute the neutron bubble detector counting method according to any one of claims 1 to 5 via a processor.

Citation Information

Patent Citations

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

    CN119274043A

  • Neutron bubble detector counting device

    CN223092149U