X and gamma dose rate instrument automatic verification method based on machine vision

Through machine vision technology, the X and γ dose rate meter are automatically checked, and the image preprocessing and neural network algorithm are used to realize automatic text recognition, which solves the problems of low intelligence and low manual reading efficiency in the existing technology, and achieves rapid and accurate numerical reading and verification of the dosage rate meter.

CN119087496APending Publication Date: 2024-12-06CHINA INST FOR RADIATION PROTECTION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411011012.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing air-release standard device has less intelligence than kinetic energy release, which leads to difficulty in storing and analyzing data in the laboratory, low efficiency of manual reading and error, and instrument verification relies on manual labor, resulting in low detection efficiency.

Method used

Automatic verification method based on machine vision is adopted to detect and recognize text through image preprocessing and neural network algorithms, and combined with digital jump error processing, automatic reading and accurate recognition of X and γ dose rate meter values ​​are achieved.

Benefits of technology

The automatic reading of the X and γ dose rate meter values ​​is realized, and the recognition time is less than 0.5s, which significantly improves the calibration efficiency and solves the OCR recognition error problem caused by the digital jump of the instrument.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119087496A_ABST
    Figure CN119087496A_ABST
Patent Text Reader

Abstract

The invention discloses an X and gamma dose rate instrument automatic verification method based on machine vision, and relates to the technical field of machine vision, and the method comprises the steps: S1, reading an image of an instrument reading camera in an irradiation room, taking the image as a data source, and carrying out the preprocessing of the image to improve the text recognition speed and accuracy; s2, performing text detection and recognition on the instrument picture by adopting a neural network algorithm, converting the instrument reading into a character string, and storing the character string in a memory; s3, post-processing the output result of the neural network, wherein the post-processing content comprises dose rate extraction and digital hopping error processing; and S4, based on the data of each measurement point, calculating the statistical fluctuation, the calibration factor, the relative inherent error and the relative expansion uncertainty of the instrument, and linking the calculation result to the fixed position of the verification certificate template to complete the generation of the certificate. According to the method provided by the invention, the numerical values of the X and gamma dose rate instruments can be automatically read, the identification time is less than 0.5 s, and the verification efficiency can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of machine vision, and in particular relates to an automatic calibration method for X-ray and gamma dose rate meters based on machine vision. Background Art

[0002] With the rapid development of nuclear technology in many fields in my country, the construction of radiation monitoring capabilities has become an important issue. In order to ensure the accuracy of radiation monitoring instruments, it is necessary to transfer the value through calibration to provide a basis for analyzing, judging and controlling the dose level. X-ray and gamma-ray air kerma standard devices are the most widely used ionizing radiation measurement standards. Commonly used environmental radiation monitoring instruments, radiation protection monitoring instruments and other equipment must be traced through such measurement standards. However, most of the current domestic air kerma standard devices have the following common problems due to the early construction of the equipment and relatively backward design and technology: low intelligence, lack of storage and analysis of a large amount of data from various sensors and cameras in the laboratory; instrument calibration relies heavily on manual readings, which cannot guarantee that the intervals between data readings are equal, which not only brings human errors to the final results, but also has the problem of low detection efficiency. Summary of the invention

[0003] In view of the defects existing in the prior art, the purpose of the present invention is to provide an automatic calibration method for X-ray and γ-dose rate meters based on machine vision. This method can automatically read the values ​​of X-ray and γ-dose rate meters and solve the OCR recognition error problem caused by the digital jump of the instrument.

[0004] To achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0005] An automatic calibration method for X-ray and gamma dose rate meters based on machine vision comprises the following steps:

[0006] S1, read the image of the instrument reading camera in the irradiation room as the data source, and pre-process the image to improve the text recognition speed and recognition accuracy;

[0007] S2. After preprocessing, a neural network algorithm is used to complete text detection and text recognition of the instrument image, and the instrument readings in the video stream are converted into strings and stored in the software memory;

[0008] S3. Post-process the output results of the neural network to improve the OCR recognition accuracy. The post-processing content includes dose rate extraction and digital jump error processing.

[0009] Furthermore, in the above-mentioned automatic calibration method of X-ray and gamma dose rate meters based on machine vision, the preprocessing of the image in step S1 specifically includes: binarization, tilt correction, cropping and denoising of the image in sequence.

[0010] Further, in the above-mentioned automatic calibration method of X-ray and gamma dose rate meters based on machine vision, in step S1:

[0011] Binarization: The image is binarized using the maximum inter-class variance method. The traversal method is used to obtain the threshold that maximizes the inter-class variance, which is the optimal threshold. The calculation formula of the maximum inter-class variance method is:

[0012]

[0013] Where: N 0 and N 1 is the number of pixels in the foreground and background, ω 0 and ω 1 are the ratio of foreground to background, μ 0 and μ 1 are the average grayscale of foreground and background pixels, μ is the average grayscale of the entire image, and g is the required maximum inter-class variance;

[0014] Tilt correction: Tilt correction of the image is achieved based on the recognition of straight lines in the image. The principle is: the corresponding straight lines are detected from the image using Hough transform, and then the tilt angle of the image is determined based on the angle between the straight lines, and then the image is rotated;

[0015] Cropping: Cropping the image to extract the region of interest in the image, i.e., the ROI region. An image cropping user control is constructed based on the OPENCV library, and the ROI region can be dragged, enlarged, or reduced through the control.

[0016] Denoising: An eight-neighborhood denoising algorithm is used to remove image noise. The eight-neighborhood denoising algorithm determines whether a pixel is noise by comparing the brightness of eight neighboring pixels around each pixel and performs corresponding processing.

[0017] Furthermore, in the automatic calibration method of X-ray and gamma dose rate meters based on machine vision as described above, in step S2, a neural network OCR recognition technology based on deep learning is used to perform text detection and text recognition on the text in the instrument image. The text detection is used to select the text box contained in the image, and its output is used as the input of the text recognition algorithm; the text recognition is used to extract and recognize the text in the text box.

[0018] Further, in the above-mentioned automatic calibration method of X-ray and gamma dose rate meters based on machine vision, the DBNet model is used to implement text detection in step S2, specifically:

[0019] Extract features from different stages of the DBNet model backbone network and fuse them to obtain feature maps;

[0020] Predicting a probability map and a threshold map according to the feature map;

[0021] The probability map and the threshold map are converted into a binary map using a differentiable binarization formula;

[0022] The binary image is post-processed to obtain the coordinates of the text box.

[0023] Further, in the above-mentioned X-ray and γ dose rate meter automatic calibration method based on machine vision, the CRNN-CTC model is used in step S2 to realize text recognition. The CRNN-CTC model structure includes three parts, from bottom to top: convolutional layer CNN, recurrent layer RNN and transcription layer CTC loss. The specific process of text recognition is:

[0024] Use a standard CNN network to extract features of text images;

[0025] The feature vectors are fused using the RNN network to extract the contextual features of the character sequence, and then the probability distribution of each column feature is obtained;

[0026] Finally, the text sequence is predicted through the transcription layer CTC.

[0027] Further, in the above-mentioned automatic calibration method of X-ray and gamma dose rate meters based on machine vision, the dose rate extraction is realized based on the position coordinates of the text box in step S3, specifically:

[0028] S31, preliminarily screening all text boxes extracted in the ROI area, and if the character string contained in the text box can be converted into a floating point number, it is determined that the text box contains digital information;

[0029] S32, if there is only one text box that meets the condition of step S31, the number in the text box is the dose rate; if there is more than one text box that meets the condition, continue to filter the text box containing "Sv" or "Gy", and the text box is the dose rate unit display text;

[0030] S33, reading the image coordinates of the dose rate unit display text box. If the coordinates of the digital text box are located on the left side of the dose rate unit display text box, it is determined that the number is a dose rate value.

[0031] Further, in the above-mentioned X-ray and γ dose rate meter automatic calibration method based on machine vision, the digital jump error processing method in step S3 is specifically as follows:

[0032] Read the image sent back by the camera, read another image sent back by the camera after a set delay, and save the two images into the memory respectively;

[0033] Perform text recognition on the two images and compare all text recognition results. If the recognition results of the two images are the same, it means that no digital jump occurred during the acquisition of the two images, and the OCR results are retained; if the recognition results are different, it means that a digital jump occurred during the acquisition process, and the current recognition result is invalidated and wait for the next acquisition cycle data to be re-recognized.

[0034] Furthermore, in the above-mentioned automatic calibration method of X-ray and gamma dose rate meters based on machine vision, the delay setting time length is 100ms.

[0035] Furthermore, the above-mentioned X-ray and gamma dose rate meter automatic calibration method based on machine vision further includes, after step S3:

[0036] After completing the data identification of all measurement points, the statistical fluctuation, calibration factor, relative inherent error, and relative expanded uncertainty of the instrument are calculated based on the data of each measurement point, and the calculation results are linked to the fixed position of the verification certificate template to complete the generation of the certificate.

[0037] Compared with the prior art, the automatic calibration method of X-ray and gamma dose rate meters based on machine vision provided by the present invention has the following beneficial effects:

[0038] The present invention can effectively extract image features by performing preprocessing such as binarization, tilt correction, cropping, and denoising on the image; the deep learning neural network OCR recognition technology can effectively detect and recognize the text in the instrument picture; the dose rate extraction algorithm based on position coordinates can screen the text recognition results and accurately locate the dose rate value from multiple texts; the digital jump error processing algorithm is used to solve the problem of OCR recognition errors caused by digital jumps of the instrument.

[0039] In summary, the method provided by the invention can automatically read the values ​​of X-ray and gamma dose rate meters, with an identification time of less than 0.5s, which can significantly improve the verification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A flow chart of an automatic calibration method for an X-ray and gamma dose rate meter based on machine vision provided in an embodiment of the present invention;

[0041] Figure 2 Another flow chart of an automatic calibration method for an X-ray and gamma dose rate meter based on machine vision provided in an embodiment of the present invention;

[0042] Figure 3 This is a schematic diagram of the image binarization processing result;

[0043] Figure 4 This is a schematic diagram of the tilt correction processing result;

[0044] Figure 5 This is a schematic diagram of the image cropping processing result;

[0045] Figure 6 This is a schematic diagram of the image denoising results;

[0046] Figure 7 This is a schematic diagram of text recognition results;

[0047] Figure 8 This is the OCR result post-processing flowchart;

[0048] Fig. 9 It is a digital jump phenomenon;

[0049] Fig.10 Schematic diagram of the OCR recognition effect of various X-ray and γ dose rate meters. DETAILED DESCRIPTION

[0050] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0051] Figure 1 and Figure 2 The flowchart of an automatic calibration method for X-ray and gamma dose rate meters based on machine vision provided in an embodiment of the present invention is shown. The method includes five stages: image reading, image preprocessing, recognition model calculation, calculation result post-processing, and raw data and certificate generation. Specifically, the following steps are included:

[0052] S1. Read the image of the instrument reading camera in the irradiation room as the data source and pre-process the image to improve the text recognition speed and recognition accuracy.

[0053] The image preprocessing is specifically: binarization, tilt correction, cropping and denoising are performed on the image in sequence. Each preprocessing operation method is described in detail below.

[0054] Image binarization: The algorithm used for image binarization is the maximum inter-class variance method (OTSU method). The maximum inter-class variance calculation formula is:

[0055]

[0056] Where: N 0 and N 1 is the number of pixels in the foreground (greyscale greater than the threshold) and background (greyscale less than the threshold), ω 0 and ω 1 are the ratio of foreground to background, μ 0 and μ 1 are the average grayscale of foreground and background pixels respectively, μ is the average grayscale of the entire image, and g is the required maximum inter-class variance.

[0057] The traversal method is used to obtain the threshold T that maximizes the inter-class variance g, which is the optimal threshold. The binarization result is as follows Figure 3 shown.

[0058] Tilt correction: In OCR processing, tilted images will lead to incomplete text detection, which will affect the subsequent recognition results, so tilt correction is required. The present invention realizes the correction of tilted images based on the recognition of straight lines in the image. The principle is to use Hough transform to detect the corresponding straight lines from the image, and then judge the tilt angle of the image based on the angle between the straight lines, and then rotate it. The tilt correction processing result is shown in the figure below. Figure 4 shown.

[0059] Cropping: Since the pictures taken by the camera contain a lot of text information, such as instrument model, instrument name, current time, etc., these texts will take up a lot of resources in the subsequent OCR recognition process, resulting in slow recognition speed and a negative impact on the extraction of effective information. Therefore, it is necessary to crop the image and extract the area of ​​interest in the image, namely the ROI area. In order to realize the image cropping function, the present invention constructs an image cropping user control based on the OPENCV library, which can realize the dragging, zooming in and out of the cropping area. After the user has placed the instrument, he needs to select the ROI area. The image cropping processing result is as follows: Figure 5 shown.

[0060] Denoising: When there are too many noise points in the image, it will greatly interfere with the program's detection and recognition of text in the image, so noise reduction processing is required. This paper uses an eight-neighborhood noise reduction algorithm to remove image noise. The algorithm determines whether the pixel is noise by comparing the brightness of the eight neighboring pixels around each pixel, and performs corresponding processing. The image denoising processing result is shown in the figure below. Figure 6 shown.

[0061] S2. After preprocessing, a neural network algorithm is used to complete text detection and text recognition of the instrument image, and the instrument readings in the video stream are converted into strings and stored in the software memory.

[0062] The present invention adopts deep learning-based neural network OCR recognition technology to detect and recognize text in instrument pictures. The OCR process is mainly divided into two parts: text detection and text recognition. Text detection is used to select the text box contained in the picture, and its output is used as the input of the text recognition algorithm; text recognition is used to extract and recognize the text in the text box. In a specific embodiment of the present invention, text detection is implemented based on the DBNet model, and text recognition is implemented based on the CRNN-CTC model, specifically:

[0063] Text detection: The present invention uses the DBNet model to implement text detection. The DBNet structure is as follows: First, it is a backbone network that extracts features from different stages and then fuses them to obtain a feature map. After obtaining the feature map, two results will be predicted, one is a probability map, and the other is a threshold map. The probability map is the text area, and the threshold map is a contraction and expansion of the text area. Use the differentiable binarization formula to convert the probability map and the threshold map into a binary map; finally, after post-processing, the coordinates of the text box are obtained.

[0064] Text recognition: The present invention uses the CRNN-CTC model to realize text recognition. The entire CRNN network structure consists of three parts, from bottom to top: CNN (convolutional layer), RNN (recurrent layer) and CTC loss (transcription layer). During the recognition process, the standard CNN network is first used to extract the features of the text image, and then the RNN network is used to fuse the feature vectors to extract the contextual features of the character sequence, and then the probability distribution of each column feature is obtained, and finally the transcription layer (CTC) is used to predict the text sequence. The text recognition results are shown in Figure 2. Figure 7 shown.

[0065] S3. Post-process the output results of the neural network to improve the OCR recognition accuracy. The post-processing content includes dose rate extraction and digital jump error processing.

[0066] like Figure 8 As shown, the present invention realizes dose rate extraction based on the text box position coordinates, specifically:

[0067] S31, performing a preliminary screening on all text boxes extracted in the ROI area, and if the character string contained in the text box can be converted into a floating point number, it is determined that the text box contains digital information;

[0068] S32. If there is only one text box that meets the condition of step S31, the number is the dose rate. If there is more than one text box that meets the condition, continue to filter the text box containing "Sv" or "Gy". The text box is the dose rate unit display text.

[0069] S33, reading the image coordinates of the dose rate unit display text box. If the coordinates of the digital text box are located on the left side of the dose rate unit display text box, it means that the number is the dose rate value.

[0070] Digital jump error processing: The display interface of X-ray and γ dose rate meters has a digital refresh process. During the digital refresh, not all digital tubes change at the same time, resulting in some non-digital content being displayed on the interface. This phenomenon is called "digital jump", such as Fig. 9As shown. Digital jumps can cause OCR to produce incorrect recognition, seriously affecting the recognition accuracy. To solve this problem, the digital jump error processing method adopted by the present invention is:

[0071] Read the image sent back by the camera, delay for a set time, for example, 100ms, re-read an image sent back by the camera, and save the two images into the memory respectively;

[0072] Perform text recognition on the two images and compare all text recognition results. If the recognition results of the two images are the same, it means that no digital jump occurred during the acquisition of the two images, and the OCR results are retained; if the recognition results are different, it means that a digital jump occurred during the acquisition process, and the current recognition result is invalidated and wait for the next acquisition cycle data to be re-recognized.

[0073] S4. After completing the data identification of all measurement points, the statistical fluctuation, calibration factor, relative inherent error, and relative expanded uncertainty of the instrument are calculated based on the data of each measurement point, and the calculation results are linked to the fixed position of the calibration certificate template to complete the generation of the certificate.

[0074] The above method provided by the present invention is used to test the OCR recognition effect of multiple X-ray and γ-ray dose rate meters, such as Fig.10 As shown in the figure, although the fonts, background colors, text colors, and tilt angles of different instruments are different, the OCR system can still accurately detect the digital text and correctly recognize it, indicating that the image preprocessing can effectively extract image features and the parameters of the deep learning model have reached the most appropriate state.

[0075] The automatic calibration method of X-ray and gamma dose rate meters based on machine vision provided by the present invention can effectively extract image features through pre-processing such as cropping, binarization, denoising, and tilt correction of images; the neural network OCR recognition technology based on deep learning can effectively detect and recognize texts in instrument images; the dose rate extraction algorithm based on position coordinates can screen text recognition results and accurately locate dose rate values ​​from multiple texts; the digital jump error processing algorithm solves the problem of OCR recognition errors caused by digital jumps of instruments. In short, the method provided by the invention can complete the automatic reading of the values ​​of X-ray and gamma dose rate meters, and the recognition time is less than 0.5s, which can significantly improve the calibration efficiency.

[0076] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for automatic calibration of X-ray and gamma dose rate meters based on machine vision, comprising the following steps: S1, read the image of the instrument reading camera in the irradiation room as the data source, and pre-process the image to improve the text recognition speed and recognition accuracy; S2. After preprocessing, the neural network algorithm is used to complete text detection and text recognition of the instrument image, and the instrument readings in the video stream are converted into strings and stored in the software memory; S3. Post-process the output results of the neural network to improve the OCR recognition accuracy. The post-processing content includes dose rate extraction and digital jump error processing.

2. The automatic calibration method of X-ray and gamma dose rate meters based on machine vision according to claim 1 is characterized in that: The image preprocessing in step S1 specifically includes: performing binarization, tilt correction, cropping and denoising on the image in sequence.

3. The automatic calibration method of X-ray and gamma dose rate meters based on machine vision according to claim 2 is characterized in that: In step S1: Binarization: The image is binarized using the maximum inter-class variance method. The traversal method is used to obtain the threshold that maximizes the inter-class variance, which is the optimal threshold. The calculation formula of the maximum inter-class variance method is: Where: N0 and N1 are the number of foreground and background pixels, ω0 and ω1 are the ratios of foreground and background, μ0 and μ1 are the average grayscale of foreground and background pixels, μ is the average grayscale of the entire image, and g is the required maximum inter-class variance; Tilt correction: Tilt correction of the image is achieved based on the recognition of straight lines in the image. The principle is: the corresponding straight lines are detected from the image using Hough transform, and then the tilt angle of the image is determined based on the angle between the straight lines, and then the image is rotated; Cropping: Cropping the image to extract the region of interest in the image, i.e., the ROI region. An image cropping user control is constructed based on the OPENCV library, and the ROI region can be dragged, enlarged, or reduced through the control. Denoising: An eight-neighborhood denoising algorithm is used to remove image noise. The eight-neighborhood denoising algorithm determines whether a pixel is noise by comparing the brightness of eight neighboring pixels around each pixel and performs corresponding processing.

4. The automatic calibration method of X-ray and gamma dose rate meters based on machine vision according to any one of claims 1 to 3, characterized in that: In step S2, a neural network OCR recognition technology based on deep learning is used to perform text detection and text recognition on the text in the instrument image. The text detection is used to select the text box contained in the image, and its output is used as the input of the text recognition algorithm; the text recognition is used to extract and recognize the text in the text box.

5. The automatic calibration method of X-ray and gamma dose rate meter based on machine vision according to claim 4 is characterized in that: In step S2, the DBNet model is used to implement text detection, specifically: Extract features from different stages of the DBNet model backbone network and fuse them to obtain feature maps; Predicting a probability map and a threshold map according to the feature map; The probability map and the threshold map are converted into binary maps using a differentiable binarization formula; The binary image is post-processed to obtain the coordinates of the text box.

6. The automatic calibration method of X-ray and gamma dose rate meter based on machine vision according to claim 5 is characterized in that: In step S2, the CRNN-CTC model is used to realize text recognition. The CRNN-CTC model structure includes three parts, from bottom to top: convolutional layer CNN, recurrent layer RNN and transcription layer CTCloss. The specific process of text recognition is as follows: Use a standard CNN network to extract features of text images; The feature vectors are fused using the RNN network to extract the contextual features of the character sequence, and then the probability distribution of each column feature is obtained; Finally, the text sequence is predicted through the transcription layer CTC.

7. The automatic calibration method of X-ray and gamma dose rate meters based on machine vision according to claim 6 is characterized in that: In step S3, the dose rate is extracted based on the text box position coordinates, specifically: S31, preliminarily screening all text boxes extracted in the ROI area, and if the character string contained in the text box can be converted into a floating point number, it is determined that the text box contains digital information; S32. If there is only one text box that meets the requirements of step S31, the number in the text box is the dose rate. If there is more than one text box that meets the requirements, continue to filter the text box containing "Sv" or "Gy". The text box is the dose rate unit display text. S33, reading the image coordinates of the dose rate unit display text box. If the coordinates of the digital text box are located on the left side of the dose rate unit display text box, it is determined that the number is a dose rate value.

8. The automatic calibration method of X-ray and gamma dose rate meter based on machine vision according to claim 7 is characterized in that: The digital transition error processing method in step S3 is specifically as follows: Read the image sent back by the camera, read another image sent back by the camera after a set delay, and save the two images into the memory respectively; Perform text recognition on the two images and compare all text recognition results. If the recognition results of the two images are the same, it means that no digital jump occurs during the acquisition of the two images, and the OCR results are retained; If the recognition results are different, it means that a digital jump occurs during the collection process, and the current recognition result will be invalidated and the next collection cycle data will be re-recognized.

9. The automatic calibration method of X-ray and gamma dose rate meters based on machine vision according to claim 8, characterized in that: The delay setting duration is 100ms.

10. The automatic calibration method of X-ray and gamma dose rate meter based on machine vision according to any one of claims 7 to 9, characterized in that: After step S3, the following steps are also included: After completing the data identification of all measurement points, the statistical fluctuation, calibration factor, relative inherent error, and relative expanded uncertainty of the instrument are calculated based on the data of each measurement point, and the calculation results are linked to the fixed position of the verification certificate template to complete the generation of the certificate.