Industrial pointer type disc instrument intelligent reading method for complex environment

By using a deep learning framework based on YOLOv10 and Shape-IoU, combined with image inpainting and correction algorithms, the instrument range and pointer position are identified, solving the problems of accuracy and speed in instrument reading under complex environments, and achieving efficient and accurate instrument reading.

CN120299018BActive Publication Date: 2026-01-27NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510363222.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2026-01-27
Estimated Expiration
2045-03-26

AI Technical Summary

Technical Problem

Traditional industrial pointer-type disc instrument reading methods suffer from difficulties in detection, low accuracy, and low efficiency in complex environments. Existing deep learning methods have weak feature representation capabilities, many model parameters, and long inference times in complex environments.

Method used

Image inpainting is performed using a YOLOv10-based deep learning framework, combined with the Shape-IoU loss function and the IPT model. Image correction is performed using the STN algorithm. Text and scale recognition are performed using PaddleOCR and Deeplabv3+ models. Pointer position is detected using Hough transform, and readings are performed using the central angle algorithm.

Benefits of technology

It enables high-precision and rapid instrument readings in complex environments, reduces manpower consumption, improves reading speed and accuracy, and reduces the impact of abnormal environments on readings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120299018B_ABST
    Figure CN120299018B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer vision, and particularly discloses an intelligent reading method for an industrial pointer type disc instrument in a complex environment, which comprises the following steps: S1, detecting a meter panel contained in an input image; S2, performing denoising processing on the meter panel image; S3, identifying an instrument range and a measurement unit based on the meter panel image; S4, identifying a meter panel center, a zero scale, a maximum scale and a pointer pointing scale based on the meter panel image, and constructing a simplified meter panel schematic diagram; and S5, performing reading on the instrument according to the simplified meter panel schematic diagram, the instrument range and the measurement unit. The technical scheme provided by the application excludes the influence of abnormal reading on industrial production, compared with a traditional manual reading method, the reading speed and reading accuracy are greatly improved, and the implementation cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision, in particular to an intelligent reading method for industrial pointer type disc instrument in complex environment. BACKGROUND

[0002] Traditional industrial meter reading needs personnel to go to the site to read the meter, which consumes manpower and material resources, is prone to data entry errors, and has safety risks. Therefore, the traditional industrial meter reading scheme cannot meet the needs of modern industry for accurate measurement and safety management. Existing industrial pointer type disc instrument reading methods include: 1. Traditional manual observation. This method is greatly affected by subjective factors and objective conditions, and is low in efficiency. 2. Using traditional image processing technology. This kind of method has low accuracy, usually needs to manually adjust multiple parameters, and has poor universality. 3. Based on deep learning technology. This kind of method brings double improvement of reading accuracy and speed.

[0003] However, there are still many challenges in instrument reading in complex environment, mainly including: 1. The industrial instrument dial is small, the pointer is thin, and the instrument detection is difficult. 2. There are oil stains, cracks, tilting and other complex environmental disturbances on the dial, and the instrument reading is difficult. 3. The existing instrument reading method based on deep learning has weak feature representation ability, many model parameters, long reasoning time and other problems, and the instrument reading accuracy is low. SUMMARY

[0004] The present application provides an intelligent reading method for industrial pointer type disc instrument in complex environment, which can realize fast and high-precision identification of instrument reading.

[0005] To achieve the above purpose, the present application provides an intelligent reading method for industrial pointer type disc instrument in complex environment, comprising the following steps:

[0006] S1, detecting the instrument dial contained in the input image;

[0007] S2, denoising the instrument dial image;

[0008] S3, identifying the instrument range and unit based on the instrument dial image;

[0009] S4, identifying the instrument dial center, zero scale, maximum scale and pointer pointing scale based on the instrument dial image, and constructing a simplified instrument dial schematic diagram;

[0010] S5, reading the instrument according to the simplified instrument dial schematic diagram, instrument range and unit.

[0011] Preferably, in S1, the detection of the instrument panel contained in the input image is divided into five stages of collection, sample labeling, data input, model optimization and model inference, and the specific steps are as follows:

[0012] S11, collection: arranging a camera near the industrial pointer type disc instrument to collect instrument pictures;

[0013] S12, sample labeling: manually labeling instrument pictures using labellmg software;

[0014] S13, data input: inputting a data set into a deep learning network model based on YOLOv10 to train a model;

[0015] S14, model optimization: optimizing through a loss function to obtain optimal weights;

[0016] S15, model inference: inputting instrument images into the trained model, the model outputting detection box parameters and categories of the instrument, calling a function to crop out the detection box, intercepting the instrument panel contained in the input image, and storing it in a corresponding folder.

[0017] Preferably, in S14, the loss function is Shape-IoU, which can be expressed as:

[0018] L S hape-Io U U shape +0.5′Ω shape ;

[0019] In the formula, IoU is the intersection over union of the GT box and the anchor box, distance shape is the distance between the GT box and the anchor box,

[0020] Preferably, in S2, the specific steps of denoising the instrument panel image are as follows: according to the instrument categories output by the YOLOv10 model inference stage, different operations are taken: if it is greasy or broken, image restoration is performed first, and then image correction is performed; if it is normal, image correction is directly performed.

[0021] Preferably, in S2, image restoration adopts an IPT model, which consists of four parts: a head part for extracting features from the instrument panel picture, an encoder and a decoder for restoring lost information, and a tail part for mapping features to the restored image, and the objective function of IPT is defined as:

[0022] L IPT =λ·L contrastive +L supervised ;

[0023] In the formula, L contrastive To compare the losses, L supervised To monitor losses.

[0024] Preferably, in S2, image correction is based on the STN algorithm to transform the dashboard image; the Spatial Transformation Network (STN) converts the dashboard image into a forward dashboard image, and includes three steps: parameter prediction (Localisation net), coordinate mapping (Grid generator), and pixel acquisition (Sampler). The specific operations are as follows:

[0025] S21. The Localization net calculates the parameters required for spatial transformation: Input a Feature map: U∈R H×W×C After several convolutional and fully connected operations, a regression layer is used to obtain the transformation parameter θ, as shown in the following formula:

[0026] θ=f loc (U);

[0027] Where θ is the transformation parameter, and the dimension of θ depends on the specific transformation type of the network, U∈R H×W×C is the input feature map, and floc(·) is the localization network, which can take any form;

[0028] S22. The grid generator uses the calculated θ to perform a corresponding spatial transformation on the feature map, as shown in the following formula:

[0029]

[0030] In the formula, T represents the target pixel position on the output feature map. θ (G i ) represents the applied transformation, G i Representing a rule network, A θ Represents the transformation matrix. This indicates the sampling position on the corresponding input feature map;

[0031] S23, Sampler, based on the transformed sampling grid T θ (G i The pixel values ​​are extracted from the input feature map (U) to generate the output feature map (V) at the position in the sampling grid; each position indicates a specific sampling point on the input feature map (U).

[0032] Preferably, in S3, the specific steps for recognizing the instrument range and unit of measurement based on the dashboard image are as follows:

[0033] S31. Call the trained text recognition model PaddleOCR, configure the path frame of the dashboard image to be recognized, store the recognition result in result, extract the plain text part stored in result and store it in text.

[0034] S32. Match the text based on the characteristic information of the instrument range and unit of measurement, and classify the two accordingly, using the following formula:

[0035]

[0036] In the formula, Ks represents the candidate set of instrument ranges, and Us represents the candidate set of measurement units.

[0037] S33. Select the largest value from the Ks set as the instrument range K, and select the value that matches the actual value from the Us set as the measurement unit U.

[0038] Preferably, in S4, the specific steps for constructing a simplified dashboard schematic diagram based on the dashboard image recognition of the dashboard center, zero mark, maximum mark, and pointer-pointing mark are as follows:

[0039] S41. Use the trained semantic segmentation model Deeplabv3+ to segment the scale in the dashboard image and read the segmentation mask. The specific operation steps are as follows:

[0040] DeepLabv3+ uses cross-entropy loss after the output layer to calculate the loss between the predicted class map and the ground truth label, and updates the network weights using backpropagation based on the calculated loss. The cross-entropy loss function is formulated as follows:

[0041] L=-∑ i y i log(p i )-(1-y i log(1-p) i );

[0042] In the formula, p is the probability predicted by the model to belong to the meter scale category, and y is the true label, where y=1 indicates that the pixel belongs to the meter scale and y=0 indicates that the pixel does not belong to the meter scale.

[0043] S42. Fit the circle containing the scale and calculate the center coordinates O(x0,y0). Use Thomas corner detection to obtain the two endpoints A(x1,y1) and B(x2,y2) of the fitted circular curve of the scale. Connect the two endpoints and the center of the circle to obtain the zero scale line and the maximum scale line respectively. The center of the dashboard is the center coordinate. Perform ellipse fitting and Thomas corner detection on the grid_image and output the processed image.

[0044] S43. Determine the position of the pointer's line based on Hough transform line detection, wherein the longest line object is selected as the pointer and its position information is stored; the specific steps for determining the position of the pointer's line are as follows:

[0045] Associate each straight line in the image with a Hough space containing a pair of parameters (r, θ), initializing the (θ, ρ) space as N(θ, ρ) = 0. For each pixel (x, y), find the (θ, ρ) pair in the parameter space that satisfies xcosθ + ysinθ = ρ, and let N(θ, ρ) = N(θ, ρ) + 1. Count the magnitudes of all N(θ, ρ), and select the parameters where N(θ, ρ) > τ. For points not less than a threshold, obtain the straight line through the inverse mapping of the parameter pair (r, θ) in the Hough space, calculated as follows:

[0046]

[0047] In the formula, r is the perpendicular distance from the origin to the line, and θ l It is the angle between this straight line and the positive x-axis, expressed in radians, and (x,y) is the coordinate point in the image space;

[0048] S44. Based on the positions of the dashboard center, zero scale line, maximum scale line, and the pointer's line, use matplotlib to draw a simplified dashboard diagram. During the drawing process, make the following judgments: determine the relationship between the ordinates of the dashboard center O and the two corner points A and B. If O is less than A or B, rotate the simplified dashboard diagram by 180 degrees. Determine the relative positions of the zero and maximum scale lines. If the zero scale line is to the right of the maximum scale line, flip the simplified dashboard diagram horizontally.

[0049] Preferably, in S5, the specific steps for reading the instrument based on the simplified instrument panel diagram, instrument range, and unit of measurement are as follows:

[0050] S51. Calculate the deflection angle θ1 between the zero mark line and the straight line where the pointer is located, and the deflection angle θ2 between the zero mark line and the maximum mark line based on the central angle algorithm;

[0051] The formula for calculating the deflection angle θ1 between the zero mark and the maximum mark is as follows:

[0052]

[0053] In the formula, O(x0,y0) are the coordinates of the circle's center, A(x1,y1) and B(x2,y2) are the intersection points of the lines containing the zero and maximum scale lines with the circle, respectively, and the vector...

[0054]

[0055] In the formula, O(x0,y0) are the coordinates of the circle's center, A(x1,y1) and C(x3,y3) are the intersection points of the zero mark and the line containing the pointer with the circle, respectively, and the vector...

[0056] S52. Calculate the ratio of the deflection angle between the zero mark and the pointer's line to the deflection angle between the zero mark and the maximum mark, then multiply by the instrument's range and, combined with the unit of measurement, obtain the reading result. The calculation formula is:

[0057]

[0058] In the formula, K is the instrument range, U is the unit of measurement, and result is the reading result.

[0059] Therefore, this invention proposes an intelligent reading method for industrial pointer-type disc instruments designed for complex environments, with the following beneficial effects:

[0060] (1) The dial detection model designed by this invention based on the deep learning Yolov10 detection framework can better identify small targets, thereby improving reading accuracy; compared with the traditional manual reading method, it greatly improves the reading speed and reduces the implementation cost; compared with the existing deep detection framework, a brand-new loss function is designed, which brings higher performance and lower inference latency.

[0061] (2) The present invention performs a series of noise reduction processes on the dial, eliminating the impact of abnormal readings on industrial production caused by complex and changeable industrial production environments, such as tilting, oil stains, and cracks on the dial surface.

[0062] (3) This invention utilizes a deep learning model to automatically learn the features of the scale in the instrument from a large amount of instrument image data, and can extract the scale in the pointer instrument, process the extracted image, and perform formula calculations. This simple method replaces the tedious manual reading procedure and reduces the consumption of human resources.

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

[0064] Figure 1 This is a flowchart illustrating an intelligent reading method for an industrial pointer-type disc instrument designed for complex environments, according to the present invention.

[0065] Figure 2This is an overall flowchart of the intelligent reading method for industrial pointer-type disc instruments in complex environments according to the present invention.

[0066] Figure 3 This invention relates to a deep learning model based on YOLOv10 in a method for intelligent reading of industrial pointer-type disc instruments for complex environments. Detailed Implementation

[0067] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of this application.

[0068] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0069] like Figure 1 As shown, a flowchart of an intelligent reading method for an industrial pointer-type disc instrument in complex environments, according to an embodiment of the present invention, specifically includes the following steps:

[0070] S1. Detect the dashboard contained in the input image;

[0071] S2. Denoise the dashboard image;

[0072] S3. Identify the instrument range and measurement unit based on the dashboard image;

[0073] S4. Based on the instrument panel image, identify the center, zero mark, maximum mark, and pointer-pointing mark of the instrument panel to construct a simplified instrument panel schematic diagram;

[0074] S5. Take readings of the instrument based on the simplified instrument panel diagram, instrument range, and unit of measurement.

[0075] In S1, the detection of dashboards contained in the input image is divided into five stages: acquisition, sample preparation, data input, model optimization, and model inference. The specific steps are as follows:

[0076] S11. Data Acquisition: Place a camera near the industrial pointer-type disc instrument to acquire images of the instrument;

[0077] S12. Sample Preparation: Manually label instrument images using labellmg software, where the instrument image categories are as follows: Figure 3 As shown;

[0078] S13. Data Input: Input the dataset into a YOLOv10-based deep learning network model to train the model;

[0079] S14. Model Optimization: To improve the performance of YOLOv10, a Shape-IoU-based object detection loss function is designed to obtain the optimal weights. Shape-IoU can calculate the loss by focusing on the shape and scale of the bounding box, thus making the bounding box regression more accurate. Shape-IoU can be expressed as:

[0080] L Shape-IoU =1-IoU+distance shape +0.5′Ω shape ;

[0081] In the formula, IoU is the intersection-union ratio of the ground truth bounding box and the anchor bounding box, and distance is... shape This represents the distance between the ground truth bounding box and the anchor bounding box.

[0082] S15, Model Inference: Input the instrument image into the trained model. The model outputs the detection box parameters and category of the instrument. Call the function to crop out the detection box, extract the instrument panel contained in the input image, and save it to the corresponding folder.

[0083] In this embodiment, the instrument dial that needs to be read is small and has high real-time requirements. Therefore, the improved YOLOv10 is used for dial detection in this embodiment.

[0084] YOLOv10 introduces a consistent dual-assignment strategy for NMS-free training. The model uses two prediction heads during training: one with a one-to-many assignment and the other with a one-to-one assignment. This leverages the rich supervision signals from the one-to-many assignment during training, while using the predictions from the one-to-one assignment during inference, thus achieving efficient inference without NMS. This results in significant performance improvements and low inference latency.

[0085] YOLOv10 also adopts an efficiency-accuracy driven model design. After analyzing the impact of classification error and regression error, it was found that the regression head has a greater impact on the performance of YOLOs. Therefore, without significantly affecting performance, the computational overhead of the classification head can be appropriately reduced.

[0086] In S2, the specific steps for denoising the dashboard image are as follows: different operations are performed based on the dashboard category output by the YOLOv10 model inference stage: if it is greasy or broken, image restoration is performed first, followed by image correction; if it is normal, image correction is performed directly.

[0087] In S2, image inpainting uses the IPT model, which consists of four parts: a head that extracts features from the dashboard image, an encoder and decoder that recover lost information, and a tail that maps features to the recovered image. IPT can fully utilize supervised and self-supervised information. The objective function of IPT is defined as:

[0088] L IPT =λ·L contrastive +L supervised ;

[0089] In the formula, L contrastive To compare the losses, L supervised To monitor losses.

[0090] In S2, image correction is based on the STN algorithm to transform the dashboard image. The Spatial Transformation Network (STN) converts the dashboard image into a forward-facing dashboard image and includes three steps: parameter prediction (Localisation net), coordinate mapping (Gridgenerator), and pixel acquisition (Sampler). The specific operations are as follows:

[0091] S21. The Localization net calculates the parameters required for spatial transformation: Input a Feature map: U∈R H×W×C After several convolutional and fully connected operations, a regression layer is used to obtain the transformation parameter θ, as shown in the following formula:

[0092] θ=f loc (U);

[0093] Where θ is the transformation parameter, and the dimension of θ depends on the specific transformation type of the network, U∈R H×W×C is the input feature map, and floc(·) is the localization network, which can take any form;

[0094] S22. The grid generator uses the calculated θ to perform a corresponding spatial transformation on the feature map, as shown in the following formula:

[0095]

[0096] In the formula, T represents the target pixel position on the output feature map. θ (G i ) represents the applied transformation, G i Representing a rule network, A θ Represents the transformation matrix. This indicates the sampling position on the corresponding input feature map;

[0097] S23, Sampler, based on the transformed sampling grid T θ (G i The pixel values ​​are extracted from the input feature map (U) to generate the output feature map (V) at the position in the sampling grid; each position indicates a specific sampling point on the input feature map (U).

[0098] In S3, the specific steps for recognizing the instrument range and unit of measurement based on the dashboard image are as follows:

[0099] S31. Call the trained text recognition model PaddleOCR, configure the path frame of the dashboard image to be recognized, store the recognition result in result, extract the plain text part stored in result and store it in text.

[0100] S32. Match the text based on the characteristic information of the instrument range and unit of measurement, and classify the two accordingly, using the following formula:

[0101]

[0102] In the formula, Ks represents the candidate set of instrument ranges, and Us represents the candidate set of measurement units.

[0103] S33. Select the largest value from the Ks set as the instrument range K, and select the value that matches the actual value from the Us set as the measurement unit U.

[0104] In S4, the specific steps for constructing a simplified dashboard schematic diagram based on the dashboard image recognition of the dashboard center, zero mark, maximum mark, and pointer-pointing mark are as follows:

[0105] S41. Use the trained semantic segmentation model Deeplabv3+ to segment the scale in the dashboard image and read the segmentation mask. The Deeplabv3+ model consists of two parts: Encoder and Decoder. The main body of the Encoder is a DCNN with dilated convolution and uses the classification network Xception. Under the same computing resources, it can achieve the same accuracy as ResNet and has better expressive power. The Decoder module further fuses the low-level features with the high-level features to improve the accuracy of the segmentation boundary.

[0106] The specific steps are as follows:

[0107] DeepLabv3+ uses cross-entropy loss after the output layer to calculate the loss between the predicted class map and the ground truth label, and updates the network weights using backpropagation based on the calculated loss. The cross-entropy loss function is formulated as follows:

[0108] L=-∑i y i log(p i )-(1-y i log(1-p) i );

[0109] In the formula, p is the probability predicted by the model to belong to the meter scale category, and y is the true label, where y=1 indicates that the pixel belongs to the meter scale and y=0 indicates that the pixel does not belong to the meter scale.

[0110] S42. Fit the circle containing the scale and calculate the center coordinates O(x0,y0). Use Thomas corner detection to obtain the two endpoints A(x1,y1) and B(x2,y2) of the fitted circular curve of the scale. Connect the two endpoints and the center of the circle to obtain the zero scale line and the maximum scale line respectively. The center of the dashboard is the center coordinate. Perform ellipse fitting and Thomas corner detection on the grid_image and output the processed image.

[0111] S43. Based on Hough transform line detection, determine the position of the line where the pointer is located, select the longest line object as the pointer, and store the pointer's position information; specifically, based on Hough transform line detection, since there are also scale lines and other straight lines in the dashboard in addition to the pointer, in most cases more than one line object is detected, and the length of the pointer is the longest among them, so the longest line object is selected as the pointer, and the pointer's position information is stored.

[0112] The specific steps to determine the position of the line where the pointer is located are as follows:

[0113] Associate each straight line in the image with a Hough space containing a pair of parameters (r, θ), initializing the (θ, ρ) space as N(θ, ρ) = 0. For each pixel (x, y), find the (θ, ρ) pair in the parameter space that satisfies xcosθ + ysinθ = ρ, and let N(θ, ρ) = N(θ, ρ) + 1. Count the magnitudes of all N(θ, ρ), and select the parameters where N(θ, ρ) > τ. For points not less than a threshold, obtain the straight line through the inverse mapping of the parameter pair (r, θ) in the Hough space, calculated as follows:

[0114]

[0115] In the formula, r is the perpendicular distance from the origin to the line, and θ l It is the angle between this straight line and the positive x-axis, expressed in radians, and (x,y) is the coordinate point in the image space;

[0116] S44. Based on the positions of the dashboard center, zero scale line, maximum scale line, and the pointer's line, use matplotlib to draw a simplified dashboard diagram. During the drawing process, make the following judgments: determine the relationship between the ordinates of the dashboard center O and the two corner points A and B. If O is less than A or B, rotate the simplified dashboard diagram by 180 degrees. Determine the relative positions of the zero and maximum scale lines. If the zero scale line is to the right of the maximum scale line, flip the simplified dashboard diagram horizontally.

[0117] In S5, based on the simplified instrument panel diagram, instrument range, and unit of measurement, the specific steps for reading the instrument are as follows:

[0118] S51. Calculate the deflection angle θ1 between the zero mark line and the straight line where the pointer is located, and the deflection angle θ2 between the zero mark line and the maximum mark line based on the central angle algorithm;

[0119] The formula for calculating the deflection angle θ1 between the zero mark and the maximum mark is as follows:

[0120]

[0121] In the formula, O(x0,y0) are the coordinates of the circle's center, A(x1,y1) and B(x2,y2) are the intersection points of the lines containing the zero and maximum scale lines with the circle, respectively, and the vector...

[0122]

[0123] In the formula, O(x0,y0) are the coordinates of the circle's center, A(x1,y1) and C(x3,y3) are the intersection points of the zero mark and the line containing the pointer with the circle, respectively, and the vector...

[0124] S52. Calculate the ratio of the deflection angle between the zero mark and the pointer's line to the deflection angle between the zero mark and the maximum mark, then multiply by the instrument's range and, combined with the unit of measurement, obtain the reading result. The calculation formula is:

[0125]

[0126] In the formula, K is the instrument range, U is the unit of measurement, and result is the reading result.

[0127] Therefore, this invention provides an intelligent reading method for industrial pointer-type disc instruments in complex environments, which can achieve rapid and high-precision identification of instrument readings, eliminate the impact of abnormal readings on industrial production, and greatly improve reading speed and accuracy while reducing implementation costs compared with traditional manual reading methods.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for intelligent reading of industrial pointer-type disc instruments for complex environments, characterized in that, Includes the following steps: S1. Detecting dashboards contained in the input image; the detection of dashboards contained in the input image is divided into five stages: acquisition, sample labeling, data input, model optimization, and model inference. The specific steps are as follows: S11. Data Acquisition: Place a camera near the industrial pointer-type disc instrument to acquire images of the instrument; S12. Sample labeling: Manually label instrument images using labellmg software; S13. Data Input: Input the dataset into a YOLOv10-based deep learning network model to train the model; S14. Model Optimization: Optimization is performed using a loss function to obtain the optimal weights; the loss function is Shape-IoU, which can be expressed as: ; In the formula, Let be the intersection-union ratio of the ground truth box and the anchor box. This represents the distance between the ground truth bounding box and the anchor bounding box. ; S15, Model Inference: Input the instrument image into the trained model, the model outputs the detection box parameters and category of the instrument, calls the function to crop out the detection box, extracts the instrument panel contained in the input image, and saves it to the corresponding folder; S2. Denoising the dashboard image: Based on the STN algorithm, image transformation is performed on the dashboard image. The Spatial Transformation Network (STN) converts the dashboard image into a forward-facing dashboard image, and includes three steps: parameter prediction (Localisation net), coordinate mapping (Grid generator), and pixel acquisition (Sampler). The specific operation is as follows: S21. The Localization net calculates the parameters required for spatial transformation: Input a Feature map: U∈R H ×W×C After several convolutional and fully connected operations, the transformation parameters are obtained through a regression layer. The formula is as follows: ; in, These are transformation parameters. The dimension depends on the specific transformation type of the network, U∈R H×W×C It is the input feature map. It's a positioning network, a positioning network. It can take any form; S22, Grid generator uses calculations obtained from... The feature map undergoes a spatial transformation, as shown in the following formula: ; In the formula, This indicates the location of the target pixel on the output feature map. G represents the transformation applied. i Representing a rule network, A θ Represents the transformation matrix. This indicates the sampling position on the corresponding input feature map; S23, Sampler, based on the transformed sampling grid The pixel values ​​are extracted from the input feature map (U) to generate the output feature map (V) at the position in the sampling grid; each position obtained indicates a specific sampling point on the input feature map (U); S3. Identify the instrument range and measurement unit based on the dashboard image; S4. Based on the instrument panel image, identify the center, zero mark, maximum mark, and pointer-pointing mark of the instrument panel to construct a simplified instrument panel schematic diagram; S5. Take readings of the instrument based on the simplified instrument panel diagram, instrument range, and unit of measurement.

2. The intelligent reading method for industrial pointer-type disc instruments in complex environments according to claim 1, characterized in that, In S2, the specific steps for denoising the dashboard image are as follows: different operations are performed based on the instrument category output by the YOLOv10 model inference stage: if it is greasy or broken, image repair is performed first, followed by image correction; if it is normal, image correction is performed directly.

3. The intelligent reading method for industrial pointer-type disc instruments in complex environments according to claim 2, characterized in that, In S2, image inpainting uses the IPT model, which consists of four parts: a head that extracts features from the dashboard image, an encoder and decoder that recover lost information, and a tail that maps features to the recovered image. The objective function of IPT is defined as: ; In the formula, To compare the losses, To monitor losses.

4. The intelligent reading method for industrial pointer-type disc instruments in complex environments according to claim 1, characterized in that, In S3, the specific steps for recognizing the instrument range and unit of measurement based on the dashboard image are as follows: S31. Call the trained text recognition model PaddleOCR, configure the path frame of the dashboard image to be recognized, store the recognition result in result, extract the plain text part stored in result and store it in text. S32. Match the text based on the characteristic information of the instrument range and unit of measurement, and classify the two accordingly, using the following formula: ; In the formula, Ks represents the candidate set of instrument ranges, and Us represents the candidate set of measurement units; S33. Select the largest value from the Ks set as the instrument range K, and select the value that matches the actual value from the Us set as the measurement unit U.

5. The intelligent reading method for industrial pointer-type disc instruments in complex environments according to claim 1, characterized in that, In S4, the specific steps for constructing a simplified dashboard schematic diagram based on the dashboard image recognition of the dashboard center, zero mark, maximum mark, and pointer-pointing mark are as follows: S41. Use the trained semantic segmentation model Deeplabv3+ to segment the scale in the dashboard image and read the segmentation mask. The specific operation steps are as follows: DeepLabv3+ uses cross-entropy loss after the output layer to calculate the loss between the predicted class map and the ground truth label, and updates the network weights using backpropagation based on the calculated loss. The cross-entropy loss function is formulated as follows: ; In the formula, p is the probability predicted by the model to belong to the meter scale category, and y is the true label, where y=1 indicates that the pixel belongs to the meter scale and y=0 indicates that the pixel does not belong to the meter scale. S42. Fit the circle containing the scale and calculate the center coordinates O(x0,y0). Use Thomas corner detection to obtain the two endpoints A(x1,y1) and B(x2,y2) of the fitted circular curve of the scale. Connect the two endpoints and the center of the circle to obtain the zero scale line and the maximum scale line. The center of the dashboard is the center coordinate. Perform ellipse fitting and Thomas corner detection on the grid_image and output the processed image. S43. Determine the position of the pointer's line based on Hough transform line detection, wherein the longest line object is selected as the pointer and its position information is stored; the specific steps for determining the position of the pointer's line are as follows: Each straight line in the image is paired with a pair of parameters. The Hough space is associated, and initialization is performed. space, For each pixel (x, y), find the parameter space that satisfies... of Yes, let ; Statistics of all Take out the size. The parameters, where for points not less than a threshold, are determined by the parameters of the Hough space. The inverse mapping yields a straight line, and its calculation formula is: ; In the formula, r is the perpendicular distance from the origin to the line, and θ l It is the angle between this straight line and the positive x-axis, expressed in radians, and (x,y) is the coordinate point in the image space; S44. Based on the positions of the dashboard center, zero scale line, maximum scale line, and the pointer's line, use matplotlib to draw a simplified dashboard diagram. During the drawing process, make the following judgments: determine the relationship between the ordinates of the dashboard center O and the two corner points A and B. If O is less than A or B, rotate the simplified dashboard diagram by 180 degrees. Determine the relative positions of the zero and maximum scale lines. If the zero scale line is to the right of the maximum scale line, flip the simplified dashboard diagram horizontally.

6. The intelligent reading method for industrial pointer-type disc instruments in complex environments according to claim 1, characterized in that, In S5, based on the simplified instrument panel diagram, instrument range, and unit of measurement, the specific steps for reading the instrument are as follows: S51. Calculate the deflection angle θ1 between the zero mark line and the straight line where the pointer is located, and the deflection angle θ2 between the zero mark line and the maximum mark line based on the central angle algorithm; The formula for calculating the deflection angle θ1 between the zero mark and the maximum mark is as follows: ; In the formula, O(x0,y0) are the coordinates of the circle's center, A(x1,y1) and B(x2,y2) are the intersection points of the lines containing the zero and maximum scale lines with the circle, respectively, and the vector... , ; ; In the formula, O(x0,y0) are the coordinates of the circle's center, A(x1,y1) and C(x3,y3) are the intersection points of the zero mark and the line containing the pointer with the circle, respectively, and the vector... , ; S52. Calculate the ratio of the deflection angle between the zero mark and the pointer's line to the deflection angle between the zero mark and the maximum mark, then multiply by the instrument's range and, combined with the unit of measurement, obtain the reading result. The calculation formula is: ; In the formula, K is the instrument range, U is the unit of measurement, and result is the reading result.

Citation Information

Patent Citations

  • Automatic identification reading method and system for pointer instrument

    CN112818988A

  • Pointer instrument automatic reading method based on improved semantic segmentation network

    CN114266881A