A method and device for identifying sulfur hexafluoride instrument readings based on deep learning
By using a deep learning-based instrument detection model to locate the pointer endpoints and dial screw points and calculate the readings, the problems of high deployment costs and low recognition accuracy in existing technologies are solved, and efficient automatic recognition in multiple scenarios is achieved.
Patent Information
- Application Number
- CN202310100878.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-09
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-02-09
AI Technical Summary
Existing technologies for identifying SF6 hexafluoride instrument readings suffer from high deployment costs, sensitivity to shooting angles, and low accuracy, and are prone to identification errors, especially in real-world scenarios.
A deep learning-based instrument detection model is adopted. By constructing a sample set and training the instrument detection model, the loss function is used to update the parameters, locate the pointer endpoint and dial screw point, calculate the instrument reading, reduce the sensitivity to the shooting angle and improve the recognition accuracy.
It enables automatic identification of SF6 instrument readings without parameter settings or deployment debugging, has better robustness and identification accuracy, reduces sensitivity to shooting angle, and improves the real-time performance and accuracy of reading identification.
Smart Images

Figure CN116051809B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and device for identifying sulfur hexafluoride instrument readings based on deep learning, belonging to the field of image processing. Background Technology
[0002] Sulfur hexafluoride (SF6) is a common insulating and arc-quenching gas used in high-voltage equipment in substations. Its density, pressure, and temperature are crucial to the safety of personnel and equipment within the substation. Substations extensively use mechanical pointer-type SF6 gas density gauges. Figure 3 As shown, the measured values cannot be directly uploaded to the power system and require manual or automatic identification of the instrument image readings through computer vision technology.
[0003] For SF6 instrument reading recognition, the traditional image processing algorithm steps include: image grayscale, image binarization, image edge detection, Hough line transformation to locate the pointer and starting scale, Hough circle transformation to locate the center of the circle, angle calculation, reading conversion, etc. Zhu Haixia [1] used the Hough recognition algorithm to recognize the pointer line and the dial circle, and used the gray center method to improve the accuracy by reducing the number of accumulated pixels. Finally, the BP (backpropagation) neural network was used to locate the starting scale character recognition. Ding Yongze [2] used the Hough transformation algorithm to locate the pointer, the starting scale line and the ending scale line, and then obtained the instrument reading by calculating the deflection angle of the pointer relative to the starting scale line. The key steps of Hough line transformation and Hough circle transformation are sensitive to parameter settings. In most scenarios, each instrument needs to be designed and debugged, which greatly increases the deployment cost and is not conducive to large-scale promotion. Moreover, Hough transformation has high requirements for the shooting angle of the image. Especially when Hough circle transformation is used, when the angle between the line connecting the camera to the center point of the instrument and the normal of the instrument plane is greater than 15°, the recognition accuracy drops significantly. Figure 4 As shown. In real-world scenarios, the instrument's installation location is easily obstructed, and the inspection robot's positioning and posture errors often prevent it from meeting the imaging requirements, leading to frequent recognition errors. Furthermore, because the SF6 instrument's pointer is short and not significantly different from the scale pointer on the dial, the Hough linear transformation occasionally misidentifies the scale line as the dial pointer, resulting in reading errors.
[0004] CN115035364A, "A Method for Reading Pointer Instruments Based on Deep Neural Networks," discloses... Figure 8The SF6 instrument shown is used for identification. A trained dial scale key point prediction algorithm and a pointer key point prediction algorithm are used to analyze the dial detection box image and pointer detection box image respectively to obtain the key points of the dial scale and pointer. Angles θ1 and θ2 of the pointer are calculated from the coordinates of the key points to obtain the instrument reading. Due to factors such as resolution or lighting, the accuracy of the key point prediction algorithm for the scale key points is not high. This method improves the reading recognition accuracy by locating the larger, more obvious scale lines and by averaging, but further improvement is still needed. At the same time, because the SF6 instrument pointer is short and the difference between it and the large scale lines on the dial is not obvious, when the pointer is close to or even overlaps with the large scale lines, it is easy to misjudge the scale lines as the pointer or the pointer as the scale.
[0005] CN113780273A, "A Method for Reading Water Meter Reading Based on Target Detection and Keypoint Detection," discloses a method that uses a pointer target detection module to obtain detection boxes for all pointers in a water meter image, then uses a target region segmentation module to obtain the detection box for the target pointer and extracts the region of interest from the original water meter image. Finally, the region of interest is used as input to a pointer keypoint detection module to obtain the keypoint positions of the target pointer. This patent constructs and trains the pointer target detection module and the pointer keypoint detection module separately to identify the pointer and keypoint positions, resulting in high training costs and room for improvement in real-time performance.
[0006] [1]Zhu Haixia.Pointer meter recognition based on improved Houghtransform and BP network[J].Electrical Measurement&Instrumentation,2015,52(05):11-14.
[0007] [2] Ding Yongze, Hou Chunping, Yang Yang. A Meter Reading Recognition Method Based on Image Processing [P], 2019, 10(6): 58-381.5 Summary of the Invention
[0008] To overcome the problems existing in the prior art, the present invention adopts a deep learning-based SF6 instrument reading recognition method. Compared with the recognition method based on Hough lines, it does not require parameter setting and deployment debugging, and can cover SF6 instruments in the deployment scenario to complete automatic reading recognition.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] Technical Solution 1
[0011] A deep learning-based method for identifying sulfur hexafluoride (SF6) instrument readings includes the following steps:
[0012] Construct an instrument detection model;
[0013] Training the instrument detection model: Construct a sample set, the labeled information of which includes dial position information and several key point position information; the key points include pointer endpoints and dial screw points; input the sample set into the instrument detection model to obtain prediction results; use a loss function to calculate the loss between the prediction results and the labeled information, the loss including target confidence loss, dial positioning loss and key point positioning loss; based on the loss, iteratively update the parameters of the instrument detection model;
[0014] Obtain the image to be processed;
[0015] Input the image to be processed into the trained instrument detection model to obtain the dial position and the positions of several key points;
[0016] The instrument reading is calculated based on the relative positional relationship between the pointer endpoint and the dial screw point.
[0017] Furthermore, the reading of the computing instrument is expressed by the following formula:
[0018]
[0019]
[0020]
[0021] In the formula, σ represents the instrument reading; Ψ, φ, As prior knowledge, let represent the instrument range, the angle corresponding to the range, and the instrument reference vector, respectively. The reading being pointed to; δ represents the direction parameter; θ represents the pointer line vector. With instrument reference vector The included angle; Indicates the pointer line vector; Indicates the instrument reference vector; A x A y Represents the x and y coordinates of pointer endpoint A, B x B y Represents the x and y coordinates of pointer endpoint B, C x C y Indicate the x and y coordinates of the dial screw point C, D x D y This represents the x and y coordinates of the dial screw point D.
[0022] Furthermore, the loss function is expressed by the formula:
[0023] Loss = λ1Loss loc+λ2Loss obj +λ3Loss Land
[0024] In the formula, λ1, λ2, and λ3 represent different loss coefficients; Loss loc Loss represents the dial positioning loss for all positive samples. obj Loss represents the target confidence loss for all positive and negative samples. Land This represents the keypoint localization loss for all positive samples.
[0025] Furthermore, the keypoint localization loss is expressed by the formula:
[0026]
[0027] In the formula, a and b represent the horizontal and vertical coordinates of the key points in the prediction result, respectively. and represents the x and y coordinates of the key points in the annotation information, respectively; WL(x) represents the Wing loss function.
[0028] Furthermore, the instrument detection model includes a backbone network and a head network;
[0029] The backbone network is used to extract shallow, mid-level, and deep features of the image to be processed;
[0030] The head network is used to enhance the feature extraction of shallow, medium and deep features of the image to be processed, and obtain three feature maps of different scales. Prediction is performed on the three feature maps respectively, and three prediction results are output. The prediction results include target confidence, prediction box center point coordinates, prediction box width, prediction box height and several key point coordinates.
[0031] Technical Solution Two
[0032] A deep learning-based sulfur hexafluoride (SF6) meter reading identification device includes a memory and a processor. The memory stores instructions adapted for loading and execution by the processor of the following steps:
[0033] Construct an instrument detection model;
[0034] Training the instrument detection model: Construct a sample set, the labeled information of which includes dial position information and several key point position information; the key points include pointer endpoints and dial screw points; input the sample set into the instrument detection model to obtain prediction results; use a loss function to calculate the loss between the prediction results and the labeled information, the loss including target confidence loss, dial positioning loss and key point positioning loss; based on the loss, iteratively update the parameters of the instrument detection model;
[0035] Obtain the image to be processed;
[0036] Input the image to be processed into the trained instrument detection model to obtain the dial position and the positions of several key points;
[0037] The instrument reading is calculated based on the relative positional relationship between the pointer endpoint and the dial screw point.
[0038] Furthermore, the reading of the computing instrument is expressed by the following formula:
[0039]
[0040]
[0041]
[0042] In the formula, σ represents the instrument reading; Ψ, φ, As prior knowledge, let represent the instrument range, the angle corresponding to the range, and the instrument reference vector, respectively. The reading being pointed to; δ represents the direction parameter; θ represents the pointer line vector. With instrument reference vector The included angle; Indicates the pointer line vector; Indicates the instrument reference vector; A x A y Represents the x and y coordinates of pointer endpoint A, B x B y Represents the x and y coordinates of pointer endpoint B, C x C y Indicate the x and y coordinates of the dial screw point C, D x D y This represents the x and y coordinates of the dial screw point D.
[0043] Furthermore, the loss function is expressed by the formula:
[0044] Loss = λ1Loss loc +λ2Loss obj +λ3Loss Land
[0045] In the formula, λ1, λ2, and λ3 represent different loss coefficients; Loss loc Loss represents the dial positioning loss for all positive samples. obj Loss represents the target confidence loss for all positive and negative samples. Land This represents the keypoint localization loss for all positive samples.
[0046] Furthermore, the keypoint localization loss is expressed by the formula:
[0047]
[0048] In the formula, a and b represent the horizontal and vertical coordinates of the key points in the prediction result, respectively. and represents the x and y coordinates of the key points in the annotation information, respectively; i represents the number of key points; WL(x) represents the Wing loss function.
[0049] Furthermore, the instrument detection model includes a backbone network and a head network;
[0050] The backbone network is used to extract shallow, mid-level, and deep features of the image to be processed;
[0051] The head network is used to enhance the feature extraction of shallow, medium and deep features of the image to be processed, and obtain three feature maps of different scales. Prediction is performed on the three feature maps respectively, and three prediction results are output. The prediction results include target confidence, prediction box center point coordinates, prediction box width, prediction box height and several key point coordinates.
[0052] Compared with the prior art, the present invention has the following features and beneficial effects:
[0053] 1. This invention constructs an instrument detection model to locate the pointer endpoints and dial screw points of SF6 instruments, and calculates the reading based on the relative positional relationship between the pointer endpoints and dial screw points. Compared to recognition methods based on Hough lines, this invention can automatically identify readings without parameter settings and deployment debugging, exhibiting better robustness, reducing sensitivity to shooting angles, and covering SF6 instruments in various deployment scenarios. Compared to recognition methods based on scale key points, this invention locates dial screw points, which have a clear distinction from other objects on the dial, resulting in higher positioning accuracy and thus improving reading recognition accuracy.
[0054] 2. Furthermore, the present invention converts the relative positional relationship between the pointer endpoint and the dial screw point into a pointer line vector. and instrument reference vector The angle between them is used to calculate the readings using the angle and prior knowledge, which requires little computation and is highly real-time.
[0055] 3. Existing technologies typically use L1, L2, or smooth-L1 loss functions to regress coordinate values. However, experiments conducted by the inventors of this invention have revealed that these loss functions are not sensitive to small errors, and their accuracy is insufficient for detection requirements. This invention, based on the Yolov7 model structure, trains an instrument detection model by constructing loss functions that include confidence loss, dial positioning loss, and keypoint positioning loss, achieving simultaneous detection of the dial and keypoints. Furthermore, it calculates the keypoint positioning loss based on the Wing loss function, making the loss function more sensitive to small errors and obtaining higher-precision keypoint coordinates. Attached Figure Description
[0056] Figure 1-2 This is a schematic diagram of the instrument detection model structure of the present invention;
[0057] Figure 3 This is a schematic diagram of a sulfur hexafluoride (SF6) instrument.
[0058] Figure 4 This is a schematic diagram of the existing technology based on the Hough line recognition method;
[0059] Figure 5 This is a schematic diagram illustrating the annotation information of this invention;
[0060] Figure 6 This is a schematic diagram showing the prediction results of this invention and the output results of the existing Yolov7 model;
[0061] Figure 7 This is a schematic diagram of the aiming frame and the annotation frame;
[0062] Figure 8 This is a schematic diagram of the instrument identification based on patent CN115035364ASF6 in the prior art. Detailed Implementation
[0063] The present invention will now be described in more detail with reference to the embodiments.
[0064] Example 1
[0065] A deep learning-based method for identifying sulfur hexafluoride (SF6) instrument readings includes the following steps:
[0066] S1. Constructing the sample set:
[0067] A set of sulfur hexafluoride (SF6) instrument images was obtained as a sample set. In this embodiment, the SF6 instrument dial has two screw points located on the same dial diameter. Figure 5 As shown, a rectangular frame is marked on the dial, and key points are marked on the two pointer endpoints A and B and the two dial screw points C and D to obtain the dial position information (including the coordinates of the center point of the marked frame, the frame height and the frame width) and the position information of several key points (including the coordinates of four key points).
[0068] S2. Construct the instrument detection model and loss function:
[0069] like Figure 1-2 As shown, the instrument detection model adopts a Yolov7 network architecture, including a backbone network and a head network.
[0070] The backbone network consists of four CBS modules, four ELAN modules, and three MP-1 modules. Each CBS module comprises a standard convolutional layer (Conv), a normalized layer (BN), and a SiLU activation layer. Each ELAN module consists of multiple CBS modules and a cat module; the MP-1 modules consist of a max-pooling module and a CBS module.
[0071] The backbone network is used to extract shallow, mid-level, and deep features of the image to be processed. Specifically, the second ELAN module in the backbone network outputs the shallow features of the image to be processed to the head network, the third ELAN module in the backbone network outputs the mid-level features of the image to be processed to the head network, and the fourth ELAN module in the backbone network outputs the deep features of the image to be processed to the head network.
[0072] The head network consists of four CBS modules, four ELAN-W modules, two UPSample modules, one SPPCSPC module, two MP-2 modules, three Rep modules, four cat modules, and three CBM modules. The ELAN-W modules have the same structure as the ELAN modules, the difference being the number of outputs selected in the second branch: the ELAN modules sum three outputs from the second branch, while the ELAN-W modules sum five outputs. The UPSample module uses nearest-neighbor interpolation for upsampling. The SPPCSPC module, composed of seven CBS modules, three max-pooling modules, and two cat modules, increases the receptive field, allowing the instrument detection model to adapt to images of different resolutions. The MP-2 modules have the same structure as the MP-1 modules, the difference being the input-output channel ratio; specifically, the MP-1 input-output channel ratio is 1, while the MP-2 input-output channel ratio is 0.5. During training, the Rep module consists of three branches: 3x3 convolution + normalized BN, 1x1 convolution + normalized BN, and identity module + normalized BN. During deployment, the Rep module needs to be reparameterized, that is, the 1x1 convolution and identity module are converted into 3x3 convolutions, and then matrix fusion is performed, that is, the corresponding weights of the matrices are added together to obtain a single 3x3 convolution, which serves as the unique weight for the instrument detection model's inference. The cat module is used to concatenate multiple sets of received features for feature fusion to obtain a single feature. The CBM module consists of a standard convolutional layer (Conv), a normalized layer (BN), and a sigmoid activation layer. The network architecture of the instrument detection model and the connections between its modules are existing technologies and will not be described further in this embodiment.
[0073] The head network is used to enhance feature extraction of shallow, mid-level, and deep features of the image to be processed, resulting in three feature maps at different scales. Three CBM modules are then used to independently predict on each of the three feature maps, outputting three prediction results. The prediction results include the target confidence (represented by the foreground confidence in the original Yolov7 model), the dial position (coordinates of the predicted bounding box center point (x, y), predicted box width w, and predicted box height h), and the positions of four keypoints (coordinates of keypoints (a, b)).
[0074] Specifically, such as Figure 6As shown, the length of the prediction result is SxSxBx(4+1+Px2); where SxS represents the number of feature points (grid), which in this embodiment are 20x20, 40x40, and 80x80 respectively; each feature point generates B anchor boxes centered on that point, with B being 3 in this embodiment; P represents the number of keypoints, which is 4 in this embodiment. For example, the first prediction result includes 20x20x3 dial positions (i.e., x, y, w, h), 20x20x3 target confidences, and 20x20x3x4 keypoint positions (a, b). In this embodiment, the center point coordinates (x, y) and the keypoint coordinates (a, b) are both set with coordinate offsets relative to the grid center point.
[0075] Existing technologies generally utilize mean absolute error loss L1, mean square error loss L2, or smooth-L1 loss functions to calculate coordinate loss values, such as CN114863406A, "An Intelligent Detection and Recognition Method for Pointer Instruments in Substations under Complex Backgrounds." Experiments conducted by the technical personnel of this application have revealed that the aforementioned loss functions are not sensitive to small errors, and the detection accuracy is insufficient. Considering the need for high-precision key point coordinates to obtain accurate instrument readings, the following loss function is constructed:
[0076] Loss = λ1Loss loc +λ2Loss obj +λ3Loss Land
[0077] In the formula, λ1, λ2, and λ3 represent different loss coefficients, which are taken as 0.05, 0.7, and 0.005 respectively in this embodiment; Loss loc This represents the dial positioning loss, i.e., the anchor point coordinate loss, for all positive samples; Loss obj Loss represents the target confidence loss for all positive and negative samples. Land This represents the keypoint localization loss, or keypoint coordinate loss, for all positive samples.
[0078] During training, when the center point of the ground truth bounding box falls on or near an anchor point in the feature map, the bounding box corresponding to that anchor point is counted as a positive sample; otherwise, the bounding box corresponding to that anchor point is counted as a negative sample. For each positive sample, the coordinate loss function is calculated using GIoU, as follows:
[0079]
[0080] In the formula, fg represents the foreground box, i.e., the positive sample anchor point; S1 represents the area of the intersection of the aiming frame and the label frame; S2 is the area of the region where the aiming frame and the label frame are joined; and S3 is the area of the smallest rectangle enclosing the aiming frame and the label frame. For example... Figure 7As shown, A represents the center point of the aiming frame, B represents the center point of the annotation box, (x p1 ,y p1 ), (x p2 ,y p2 (x) represents the coordinates of the top left and bottom right corners of the aiming frame, respectively. l1 ,y l1 ), (x l2 ,y l2 ) represent the coordinates of the top left and bottom right corners of the annotation box, respectively.
[0081] S1=(min(x p2 ,x l2 )-max(x p1 ,x l1 ))*(min(y p2 ,y l2 )-max(y p1 ,y l1 ))
[0082] S2=(x p2 -x p1 )*(y p2 -y p1 )+(x l2 -x l1 )*(y l2 -y l1 )-S1
[0083] S3=(max(x p2 ,x l2 )-min(x p1 ,x l1 ))*(max(y p2 ,y l2 )-min(y p1 ,y l1 ))
[0084] Loss obj The target confidence loss for all positive and negative samples is represented by the binary cross-entropy loss function, as shown in the following formula:
[0085]
[0086] In the formula, bg represents the background box (negative sample anchor point), fg represents the foreground box (positive sample anchor point), and p represents the target confidence score in the prediction result. The IoU between the labeled box and the predicted box is S1 / S2.
[0087] Loss Land The keypoint loss for all positive samples is expressed by the following formula:
[0088]
[0089]
[0090] In the formula, fg represents the foreground box, i.e., the anchor point of the positive sample; a and b represent the coordinates of the keypoints in the prediction result, i.e., the offset values of the keypoints relative to the center of the grid in the horizontal and vertical directions, respectively. and These represent the coordinates of key points in the annotation information, i.e., the offset values of key points relative to the grid center in the horizontal and vertical directions, respectively; the value of i ranges from 1 to 4.
[0091]
[0092] In the formula, WL(x) represents the Wing loss function; ω represents a positive number; ∈ represents the curvature of the constrained nonlinear region; and C represents a constant.
[0093] The Wing loss function limits the nonlinear part to the interval [-ω, ω], while the rest is linear. The derivative of this function is shown below. When |x| is large, it is greater than ω, and the derivative is a constant 1 or -1. When |x| is small, it is less than ω. The derivative and |x| are negatively correlated. The smaller |x| is, the larger the derivative is. This ensures that when the error is small, the loss function is more sensitive and more beneficial to the accurate localization of key points.
[0094]
[0095] In this embodiment, ω is set to 10, ∈ is set to 2, and C is set to [value missing] to ensure the continuity of the function.
[0096] S3, Model Training:
[0097] The sample set is input into the instrument detection model, and the loss is calculated using the loss function. The loss includes the anchor point coordinate loss of all positive samples, the target confidence loss of all positive and negative samples, and the key point coordinate loss of all positive samples.
[0098] The training batch size is set to 16, the initial learning rate Lr is 0.001, the learning rate decay rate decay_rate is 0.99, and the number of iterations epoch_num is 80. The optimizer uses the stochastic gradient descent (SGDM) algorithm with momentum to adjust the weight parameters of the network model. Training is completed when the number of training epochs reaches epoch_num or the loss value no longer decreases, and the corresponding weight parameters are saved.
[0099] S4. Model Deployment:
[0100] A camera captures an image of the SF6 instrument panel, yielding the image to be processed. The trained instrument detection model is deployed to a server. The image to be processed is acquired via the network and input into the instrument detection model, resulting in several predictions. The prediction with the highest target confidence is selected as the inference result of the instrument detection model, thus determining the dial position and the locations of several key points.
[0101] Construct pointer line vectors and instrument reference vector as follows:
[0102]
[0103]
[0104] In the formula, A x A y This represents the x and y coordinates of the inner endpoint A of the pointer, B. x B y This represents the x and y coordinates of the pointer's outer endpoint B, C. x C y Indicate the x and y coordinates of the dial screw point C, D x D y Represents the x and y coordinates of the dial screw point D, and the pointer line vector. and instrument reference vector The included angle θ is calculated as follows:
[0105]
[0106] Due to pointer line vector It is possible in the instrument reference vector It could be on the left or the right. However, the angle θ cannot represent left or right, so a direction parameter δ is set. When δ is 1, it represents the pointer line vector. In the instrument reference vector Right side; when δ is -1, it represents the pointer line vector. In the instrument reference vector On the left; and when δ is 0, collinearity occurs, meaning θ is 0 or π. From Figure 5 It can be seen that the pointer cannot obtain the instrument reference vector. Since θ is the opposite of δ, it can only be 0 when δ is 0. The direction parameter δ is calculated using the outer product of vectors as follows:
[0107]
[0108] The prior knowledge is constructed as follows:
[0109] a. Calculate the instrument range Ψ as 1 (0.9 - (-0.1) = 1.);
[0110] b. Obtain the included angle corresponding to the measurement range In this embodiment, 270° is taken as 1.5π;
[0111] c. The instrument reference vector formed by dial screw point C and dial screw point D. Pointing to the middle reading of the instrument In this embodiment, 0.4 is used.
[0112] Using prior knowledge and the coordinates of key points, the instrument reading σ is calculated as follows:
[0113]
[0114] In the formula, Ψ, φ, These represent the instrument range, the included angle corresponding to the range, and the instrument reference vector, respectively. Points to the reading.
[0115] It should be noted that the aforementioned deep learning-based sulfur hexafluoride instrument reading recognition method system is also used to implement the above-mentioned... Figure 1 The method steps corresponding to each embodiment of the deep learning-based sulfur hexafluoride instrument reading identification method shown are not repeated here.
[0116] It should be noted that the functional units / modules in the various embodiments of the present invention can be integrated into one processing unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated into one unit / module. The integrated unit / module described above can be implemented in hardware or in the form of software functional units / modules.
[0117] From the above description of the embodiments, those skilled in the art will clearly understand that the embodiments described herein can be implemented in hardware, software, firmware, middleware, code, or any suitable combination thereof. For hardware implementation, the processor can be implemented in one or more of the following units: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), processor, controller, microcontroller, microprocessor, other electronic units designed to implement the functions described herein, or combinations thereof. For software implementation, some or all of the processes of the embodiments can be implemented by a computer program instructing the associated hardware. During implementation, the program can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of a computer program from one place to another. Storage media can be any available medium accessible to a computer. Computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code having the form of instructions or data structures and accessible to a computer.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should be able to analyze that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the essence and scope of the technical solutions of the present invention.
Claims
1. A method for identifying a sulfur hexafluoride instrument reading based on deep learning, characterized in that, The method comprises the following steps: constructing an instrument detection model; training the instrument detection model: constructing a sample set, the annotation information of the sample comprising dial position information and a plurality of key point position information; the plurality of key points comprising pointer end points and dial screw points; inputting the sample set into the instrument detection model to obtain a prediction result; calculating the loss between the prediction result and the annotation information by using a loss function, the loss comprising target confidence loss, dial positioning loss and key point positioning loss; based on the loss, iteratively updating the instrument detection model parameters; obtaining a to-be-processed image; inputting the to-be-processed image into the trained instrument detection model to obtain the dial position and the plurality of key point positions; calculating the instrument reading according to the relative positional relationship between the pointer end points and the dial screw points; wherein the calculation of the instrument reading is expressed by a formula as follows: wherein, represents the instrument reading; , , are priori knowledge, respectively representing the instrument scale, the angle corresponding to the scale, the instrument reference vector pointing to the reading; represents the direction parameter; represents the pointer line vector and the angle between the pointer line vector and the instrument reference vector ; represents the instrument reference vector; , represents the x coordinate and y coordinate of the pointer endpoint A, , represents the x coordinate and y coordinate of the pointer endpoint B, , represents the x coordinate and y coordinate of the dial screw point C, , represents the x coordinate and y coordinate of the dial screw point D.
2. The method of claim 1, wherein the method is based on deep learning. the loss function is expressed by a formula as follows: In the formula, , , respectively represent different loss coefficients; represents the dial positioning loss of all positive samples; represents the target confidence loss of all positive and negative samples; represents the key point positioning loss of all positive samples.
3. The method of claim 1, wherein the method is based on deep learning. the key point positioning loss is expressed by a formula as follows: In the formula, respectively represent the horizontal and vertical coordinates of the key points in the prediction result, and respectively represent the horizontal and vertical coordinates of the key points in the annotation information; represents the number of key points; represents the Wing loss function.
4. The method of claim 1, wherein the method is based on deep learning. the instrument detection model comprises a backbone network and a head network; the backbone network is used for extracting shallow features, middle features and deep features of the to-be-processed image; the head network is used for performing strengthened feature extraction on the shallow features, the middle features and the deep features of the to-be-processed image, obtaining three feature maps of different scales and performing prediction on the three feature maps respectively, and outputting three prediction results; the prediction result comprises target confidence, predicted box center point coordinates, predicted box width, predicted box height and a plurality of key point coordinates.
5. A deep learning based sulfur hexafluoride (SF6) meter reading recognition device, characterized in that, The device comprises a memory and a processor, and the memory stores instructions adapted to be loaded and executed by the processor to perform the following steps: constructing an instrument detection model; training the instrument detection model: constructing a sample set, the annotation information of the sample comprising dial position information and a plurality of key point position information; the plurality of key points comprising pointer end points and dial screw points; inputting the sample set into the instrument detection model to obtain a prediction result; calculating the loss between the prediction result and the annotation information by using a loss function, the loss comprising target confidence loss, dial positioning loss and key point positioning loss; based on the loss, iteratively updating the instrument detection model parameters; obtaining a to-be-processed image; inputting the to-be-processed image into the trained instrument detection model to obtain the dial position and the plurality of key point positions; calculating the instrument reading according to the relative positional relationship between the pointer end points and the dial screw points; wherein the calculation of the instrument reading is expressed by a formula as follows: wherein, represents an instrument reading; , , are priori knowledge, respectively representing an instrument scale, an angle corresponding to the scale, an instrument reference vector pointing to a reading; represents a direction parameter; represents a pointer line vector and an angle between the pointer line vector and the instrument reference vector represents a pointer line vector; represents an instrument reference vector; , represents an x coordinate and a y coordinate of a pointer endpoint A, , represents an x coordinate and a y coordinate of a pointer endpoint B, , represents an x coordinate and a y coordinate of a dial screw point C, , represents an x coordinate and a y coordinate of a dial screw point D.
6. The device for identifying a sulfur hexafluoride (SF6) instrument reading based on deep learning according to claim 5, characterized in that, the loss function is expressed by a formula as follows: In the formula, , , respectively represent different loss coefficients; represents the dial positioning loss of all positive samples; represents the target confidence loss of all positive and negative samples; represents the key point positioning loss of all positive samples.
7. The device according to claim 5, wherein, the key point positioning loss is expressed by a formula as follows: In the formula, respectively represent the horizontal and vertical coordinates of the key points in the prediction result, and respectively represent the horizontal and vertical coordinates of the key points in the annotation information; represents the number of key points; represents the Wing loss function.
8. The device according to claim 5, wherein, the instrument detection model comprises a backbone network and a head network; the backbone network is used for extracting shallow features, middle features and deep features of the to-be-processed image; the head network is used for performing strengthened feature extraction on the shallow features, the middle features and the deep features of the to-be-processed image, obtaining three feature maps of different scales and performing prediction on the three feature maps respectively, and outputting three prediction results; the prediction result comprises target confidence, predicted box center point coordinates, predicted box width, predicted box height and a plurality of key point coordinates.
Citation Information
Patent Citations
Meter reading recognition method based on image processing
CN110580480B
Water meter pointer reading method based on target detection and key point detection
CN113780273A
Intelligent detection and identification method for pointer type instrument of transformer substation under complex background
CN114863406A
SF6 instrument image reading method based on HRNet network model
CN111582071A
Instrument panel identification method based on super-resolution and key points
CN114863413A