Neutron bubble detector counting method and 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.

CN121385964AActive Publication Date: 2026-01-23NAT UNIV OF DEFENSE TECH

Patent Information

Application Number
CN202511972793.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-01-23
Estimated Expiration
2045-12-25

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 and accurate automated data management.

Method used

By acquiring multiple frames of detection images from multiple angles, identifying bubble positions and calculating the cross-union ratio through a pre-trained target detection model, and simultaneously obtaining detector numbers 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 realizes high-quality, accurate, and versatile automatic counting of bubble detectors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121385964A_ABST
    Figure CN121385964A_ABST
Patent Text Reader

Abstract

The invention discloses a neutron bubble detector counting method and system, a medium and a program product. The method comprises the following steps: acquiring multiple frames of detection images which are acquired by sequentially rotating around a neutron bubble detector at multiple angles; performing segmentation pretreatment to extract a bubble area; using a target detection model to identify bubble position information for the bubble area; serial numbers are distributed for the bubbles recognized in the first frame of detection image, and the bubbles recognized in any subsequent Nth frame of detection image are processed as follows: the intersection-union ratio of the detection frame of the bubble to the detection frame of each bubble recognized in the specified reference detection image is calculated, and if the intersection-union ratio is greater than a preset threshold value, the Nth frame of detection image is detected; if yes, 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 values of the numbers distributed for the bubbles in all the frame detection images. The invention aims to realize high-quality, accurate and high-universality automatic bubble counting for the 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 multiple-angle bubble detection is used, since the collected multi-angle bubble detector data are processed independently, for example, in angle 1, data collected from bubble a is not blocked, and bubble b is blocked, in angle 2, data collected from bubble b is not blocked, and bubble a is blocked. When the multi-angle bubble detector data are processed independently, 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: in view of the above problems of the prior art, a neutron bubble detector counting method, system, medium and program product are provided, and the present application aims to realize high-quality, accurate and strong general-purpose automatic bubble counting for a neutron bubble detector.

[0005] In order to solve the above technical problems, the technical scheme adopted by the present application is: A neutron bubble detector counting method, comprising the following steps: S101, acquiring a plurality of frames of detection images collected at multiple angles in turn around a neutron bubble detector; S102, segmenting and preprocessing each frame of detection image to obtain a bubble region of the neutron bubble detector; 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 for 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; S104, outputting the counting value of the number assigned to the bubble in all frames of detection image.

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

[0007] Optionally, in step S103, when assigning a number to the bubble identified in the first frame of detection image, it comprises: 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; 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, then the detection boxes are divided into different columns, thereby obtaining a plurality of column grouping detection boxes, wherein δ x is a column spacing threshold; S203, for each column grouping detection box, sorting in ascending order of y coordinate to realize arrangement from top to bottom; merging the sorted results of each column in turn, and finally returning a detection box array arranged in the order of column first and row second, and taking the index number of the element in the detection box array as the number of the corresponding detection box.

[0008] Optionally, the step S102 further comprises a segmentation preprocessing on each frame detection image to obtain a label region of the neutron bubble detector; and the step S103 further comprises: S301, contrast enhancement is performed on the label region according to the following formula: ; Wherein, is the label region image after contrast enhancement, is a scaling factor, is the label region, is a step function, which is 1 when the input is non-negative, otherwise 0; is a contrast processing threshold; S302, optical character recognition is performed on the label region image after contrast enhancement to obtain identity information of the neutron bubble detector, wherein the identity information of the neutron bubble detector includes part or all of the number and position of the neutron bubble detector.

[0009] Optionally, the step S102 further comprises solving the y coordinate and z coordinate of the bubble according to the size and x coordinate of the detection frame of the bubble recognized from the first frame detection image and any i-th frame detection image: S401, a simultaneous equation of the y coordinate of the detection frame of the bubble in the first frame detection image and the i-th frame detection image is constructed: ; ; 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; S402, the distance of the bubble to the origin and the angle between the bubble and the y axis are solved according to the simultaneous equation: ; ; S403, the z coordinate of the bubble is calculated according to the angle between the bubble and the y axis : ; Wherein, is the z coordinate of the bubble.

[0010] Optionally, the 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.

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

[0012] The present 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.

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

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

[0015] 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 detection images collected at multiple angles in turn around a neutron bubble detector; extracting a bubble region through segmentation preprocessing; identifying position information of a bubble by using a target detection model 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 frame of the bubble and the detection frame 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 method of the present application completes counting of bubbles in a bubble detector by using the collected multi-angle bubble detector data and 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 enables high-quality, accurate and highly universal automatic counting of bubbles in a neutron bubble detector. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 FIG. 1 is a basic flowchart of the method of the present application.

[0017] Figure 2 FIG. 2 is a specific flowchart of the method of the present application.

[0018] Figure 3 The result of the segmentation pretreatment in the embodiment of the present application is shown in the figure.

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

[0020] Figure 5 The rotation around the neutron bubble detector in the embodiment of the present application is shown in the figure, wherein (a) is the rotation of the yoz plane of the neutron bubble detector, and (b) is the rotation of the xoy plane of the neutron bubble detector.

[0021] Figure 6 The bubble on the yoz plane in the embodiment of the present application is shown in the figure.

[0022] Figure 7 The module implementation and workflow in the embodiment of the present application are shown in the figure.

[0023] Figure 8 The flowchart of the simulated detection image data in the embodiment of the present application is shown in the figure.

[0024] Figure 9 The generated cylindrical probability distribution function in the embodiment of the present application is shown in the figure.

[0025] Figure 10 The result comparison before and after adding the cylindrical symmetric probability distribution function in the embodiment of the present application is shown in the figure, 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.

[0026] Figure 11 The micro-bubble background noise in the embodiment of the present application is shown in the figure, wherein (a) is the random noise, (b) is the actual bubble detector photo, and (c) is the Gaussian circular plate noise.

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

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

[0029] In order to enable personnel in the technical field to better understand the technical solutions of the application, the following will The technical solutions of the application will be further described in detail in combination with the drawings in the embodiments of the application.

[0030] As Figure 1 shown, the neutron bubble detector counting method in the embodiment includes the following steps: S101, acquiring a plurality of frames of detection images collected at multiple angles in turn around the neutron bubble detector; S102, performing segmentation preprocessing on each frame of detection image to obtain a bubble region of the neutron bubble detector; S103, identifying the position information of the bubble by using a pre-trained target detection model for the bubble region; assigning a number to the bubble identified in the first frame of detection image, and performing the following processing for 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, that is, the ratio obtained by dividing the intersection between the two detection boxes by the union, 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; S104, outputting the counting value of the number assigned to the bubble in all frames of detection images.

[0031] As an optional implementation, step S101 in this embodiment specifically involves acquiring multiple frames of detection images acquired sequentially by rotating around the neutron bubble detector at four different angles. The angle between adjacent frames should not be too large to avoid affecting the accuracy of the cross-validation ratio (CVR) calculation. For example, in this embodiment, the angle between adjacent frames is 1 degree, resulting in 4 frames of detection images. To avoid the influence of a single backlight on the detection image, this embodiment uses a rotating backlight illumination recording method to acquire detection images by rotating around the neutron bubble detector. Specifically, the backlight rotates synchronously with the camera, ensuring that the backlight angle acquired at any angle is consistent, thereby improving the consistency between multiple frames of detection images and increasing the accuracy of bubble detection. It should be noted that the above rotation is a relative rotation; the neutron bubble detector can rotate actively, or both the camera and the backlight can rotate actively, both achieving the same effect.

[0032] like Figure 2 As shown, in this embodiment, the reference detection image specified in step S103 is the first frame detection image. That is, for each bubble identified in any subsequent Nth frame detection image, the following processing is performed: The intersection-union ratio (IUR) of the detection box of the bubble with the detection box of each bubble identified in the first frame detection image is calculated. If the IUR is greater than a preset threshold, the corresponding bubble number in the specified reference detection image is assigned to the bubble; otherwise, a new number is assigned to the bubble. Alternatively, the (N-1)th frame detection image can be used as the specified reference detection image. That is, the IUR of the detection box of the bubble in the Nth frame detection image with the detection box of each bubble identified in the (N-1)th frame detection image is calculated. If the IUR is greater than a preset threshold, the corresponding bubble number in the specified reference detection image is assigned to the bubble; otherwise, a new number is assigned to the bubble. See also... Figure 2When the processed image is not the first frame image, the image processing procedure is completely consistent, only with a difference 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 satisfied, 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 satisfy 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 is 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 frame 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 in the third frame, a new bubble appears, which is numbered 38. In the fourth frame, no new bubble is detected, and the maximum number is still 38.

[0033] When the step S102 performs segmentation preprocessing on each frame detection 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.

[0034] 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 a YOLOv8 model, as needed. Since the target detection model and its pre-training are both existing methods, the implementation details are not described here. The position and size information of the bubble detection frame are obtained by using the pre-trained target detection model to identify the position information of the bubble.

[0035] When the step S103 assigns a number to the bubble identified in the first frame detection image, the required numbering rule can be selected as needed, 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: S201, sort all bubble detection frames according to the x coordinate (horizontal coordinate of the left upper corner of the detection frame) from small to large to obtain a preliminary detection frame sequence arranged from left to right; 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. If the difference value of the x coordinates of adjacent detection frames is greater than δx pixels, the adjacent detection frames are divided into different columns, so as to obtain a plurality of detection frame column groups in column units, wherein δx is an interval threshold between columns, which can be adjusted according to actual conditions. S203, for each detection frame column group, 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 sequentially combined, 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 such a sorting mode, the detection frame is arranged, which is more in line with the counting logic of the human brain and is easier to check the data when tracing back the data.

[0036] When counting the bubble detector, it is often necessary to record the number of the detector synchronously in order to trace and locate the number of bubbles. However, when counting the bubble detector, the existing equipment 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 problems, the step S102 of the embodiment further includes segmenting and preprocessing each frame of the detection image to obtain a label region of the neutron bubble detector. Similarly, the label region of the neutron bubble detector can be calibrated in advance, so that the segmented and preprocessed label region is obtained, Figure 3 A schematic diagram of the bubble region and the label region obtained by the segmentation 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 region is extremely weak. For the data collected in the experiment, the code value of the label region is often between 0 and 10 (8-bit quantization accuracy), and the contrast is extremely poor. When input into the OCR module, the test tube number cannot be recognized. In order to solve the above problems, the step S103 of the embodiment further includes: S301, the contrast of the label region is enhanced according to the following formula: ; Wherein, is the label region image after contrast enhancement, is a scaling factor, is the label region, is a step function, which is 1 when the input is non-negative, otherwise it is 0; is a contrast processing threshold; for 8-bit quantized picture data, the contrast processing threshold <255, the maximum value of γ is set to . Figure 4 is the label region in the 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. 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.

[0037] 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.

[0038] 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: 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, a y coordinate of the detection frame of the bubble in the first frame detection image, a distance of the bubble to the origin, an included angle of the bubble with the y axis, a y coordinate of the detection frame of the bubble in the i-th frame detection image, a relative rotation angle between the i-th frame detection image and the first frame detection image; S402, solving the distance of the bubble to the origin by solving the simultaneous equations and the included angle of the bubble with the y axis : ; ; S403, calculating the z coordinate of the bubble according to the included angle of the bubble with the y axis : ; wherein, the z coordinate of the bubble, so as to obtain the three-dimensional coordinate (x, y, z) information of each bubble.

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

[0040] Figure 7 is a module implementation and workflow diagram of the embodiment method. Referring to Figure 7 , it can be known that the bubble detection module and the OCR (optical character recognition) detection module are encapsulated 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 an optical character recognition (OCR) module, the number of the detector in the image is extracted by using the OCR, and a number recognition result and position information of the bubble detector are obtained. The detection frame of the bubble and the detection frame of the number are labeled 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 labeled 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.

[0041] As an optional implementation, as shown in Figure 8 , the bubble recognition neural network in the embodiment includes generated simulated detection image data in addition to the collection of real detection images during training: S501, generating a column probability distribution function according to the inputted information of the length of the test tube diameter of the neutron bubble detector, for simulating the bubble distribution in the neutron bubble detector under real conditions; generating a Gaussian circular plate noise function according to the inputted information of the standard deviation of the Gaussian function and the number of Gaussian circular plate noises, for simulating the micro-bubble background noise under the neutron bubble detection condition; S502, generating a bubble image according to the column probability distribution function and the Gaussian circular plate noise function; S503, generating a simulated detection image data by using the bubble generation adversarial network BubGan.

[0042] The bubble generation adversarial network BubGan is an existing network model (see CN119274043A for details), which outputs a picture and the outline information of the bubbles in the picture. The existing bubble generation adversarial network BubGan uses IPE The bubble image of the gas-liquid-solid three-phase flow taken by the multiphase flow measuring instrument is synthesized into a bubble image of the gas-liquid two-phase flow; and the outline information of the bubbles is (x1, y1) (x2, y2) … (x n ,y n ). The coordinates of these points constitute the outline information of the bubbles. The position information of the bubbles, i.e. (min(x i ), min(y i ), max(x i ), max(y i )), can be extracted, and a box can be drawn through these data, which can mark the position information of the bubbles. The coordinates of the four vertices of the box are: [min(x i ), min(y i )],[min(x i ), max(y i )],[max(x i ), max(y i )],[max(x i ), min(y i )].

[0043] Then, the position information of the bubbles is converted into the input format of the bubble recognition neural network, i.e. {[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)}.

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

[0045] In order to realize the simulation of the bubble distribution in the neutron bubble detector under real conditions, in the embodiment, the generation mode of the bubble image of the existing bubble generation generative adversarial network BubGan is improved, specifically, a cylindrical symmetry probability distribution module and a Gaussian circular plate noise module are introduced. Firstly, the cylindrical symmetry probability distribution module generates a cylindrical probability distribution function according to the input information of the test tube diameter length of the neutron bubble detector to simulate the bubble distribution in the neutron bubble detector under real conditions. Considering that the neutron is uniformly irradiated on the neutron bubble detector with a radius of r, the camera photographs the neutron bubble detector along the y direction. In the photographing result, the appearance probability of the bubble is positively correlated with the interaction distance of the neutron and the medium in the neutron bubble detector. Assuming that the center of the neutron bubble detector is the x=0 point, the interaction distance of the neutron and the neutron bubble detector is satisfies: ; wherein, is the distance of the bubble to the origin, is the x coordinate of the bubble, and thus the function expression for generating the cylindrical probability distribution function is: ; wherein, is the cylindrical probability distribution function. For the neutron bubble detector with a radius of 8 mm, the probability density function distribution of the generated x coordinate (x coordinate) of the bubble is as shown in Figure 9 In addition, since the neutron bubble detector is a straight cylinder, the probability distribution of the generated z coordinate (z coordinate) of the bubble is a uniform distribution. By introducing the cylindrical probability distribution function, the bubble distribution under real conditions can be better simulated. Figure 10 The distributions of (a) and (b) in FIG. 8 show the simulation statistical results of about 1500 bubbles before (uniform distribution) and after (cylindrical symmetry probability distribution) adding the cylindrical symmetry probability distribution function. It can be seen that the program after adding the cylindrical symmetry probability distribution function can generate bubbles that better conform to the physical situation.

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

[0047] The Gaussian circular plate noise can be expressed as: ; wherein, is the standard deviation of the Gaussian function, used to control the blurring degree of the Gaussian circular plate, is a scaling factor, used to control the intensity of the Gaussian disk noise, Randomly generate the center coordinate of the i-th Gaussian disk. By setting the number n of Gaussian disk noise, n loops are performed, and the center coordinate of the i-th Gaussian disk is randomly generated each time After generating the Gaussian disk noise, it is added to the bubble generation map. Figure 11 is the micro-bubble background noise contrast in the embodiment of the application, where (a) is random noise, (b) is an actual bubble detector photo, and (c) is Gaussian disk noise. By taking (b) in Figure 11 as a reference, it can be seen that (a) and (c) in Figure 11 are compared, and it can be seen that the Gaussian disk noise simulation result is closer to the actual photo.

[0048] As an optional implementation, the step S104 in the embodiment further includes marking a detection frame for each bubble in each frame of the detection image and attaching a bubble number. Figure 12 is the detection result of four frames of detection images in the embodiment, where (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.

[0049] Figure 13 is a local magnification labeling result comparison of the bubble numbered 38 in the four frames of detection images in the embodiment, where (a) is a local magnification detection result in the first frame of detection image, (b) is a local magnification detection result in the second frame of detection image, (c) is a local magnification detection result in the third frame of detection image, (d) is a local magnification detection result in the fourth frame of detection image, (e) is a local magnification labeling result in the first frame of detection image, (f) is a local magnification labeling result in the second frame of detection image, (g) is a local magnification labeling result in the third frame of detection image, and (h) is a local magnification labeling 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 is given a new number 38, which also proves the superiority of the method in the embodiment in bubble counting.

[0050] In addition, the embodiment further provides a neutron bubble detector counting system, comprising a microprocessor and a memory connected with each other, wherein the microprocessor is programmed or configured to execute the neutron bubble detector counting method. The embodiment further provides a computer readable storage medium, wherein a computer program or instructions are stored in the computer readable storage medium, and the computer program or instructions are programmed or configured to execute the neutron bubble detector counting method by a processor. The embodiment further provides a computer program product, comprising a computer program or instructions, which are programmed or configured to execute the neutron bubble detector counting method by a processor.

[0051] Those skilled in the art should understand that the technical solutions provided by the present application can be in the form of a method, a system or a computer program product. Therefore, the present application can be in the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. In addition, the present application can be in the form of a computer program product implemented on one or more computer readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code. The present application is described with reference to flowcharts and / or block diagrams of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as a combination of flows and / or blocks in the flowcharts and / or block diagrams, can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device implemented in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the function specified by one or more flows and / or blocks. These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction means, which implement the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the function specified by one or more flows and / or blocks. These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction means, which implement the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the function specified by one or more flows and / or blocks. These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction means, which implement the flowcharts and / or block diagrams.

[0052] The above merely describes the preferred embodiments of the present application, and the protection scope of the present application is not limited to the above-described embodiments. Any technical solution falling within the concept of the present application shall fall within the protection scope of the present application. It should be noted that, for ordinary skilled persons in the art, some improvements and refinements without departing from the principles of the present application shall also be considered as falling within 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 outputs a count of the numbers assigned to the bubbles in all frame detection images.

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 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. The identity information of the neutron bubble detector includes part or all of the neutron bubble detector's number and location.

5. The neutron bubble detector counting method according to claim 1, characterized in that, 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.

6. The neutron bubble detector counting method according to claim 5, 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.

7. 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.

8. 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 7.

9. 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 7 via a processor.

10. 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 7 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

  • Detector / dosimeter for gamma and microwave radiation

    EP0260844A2

  • Neutron detector

    JP1993060872A

  • Reactor core flow monitoring device

    JP1998082884A

Cited By

  • Millikan oil drop experiment control method and system based on multi-voltage sampling

    CN122131637A

  • A Millikan oil drop experiment control method and system based on multi-voltage sampling

    CN122131637B