Double-pointer meter reading identification method and system based on images shot by unmanned aerial vehicle
By taking images with a drone and using a specific model to identify the readings of the double-pointer meter, the difficulty in identifying the readings of the double-pointer meter in the substation environment is solved, the recognition accuracy is improved and the error is reduced, achieving efficient identification in complex environments. .
Patent Information
- Application Number
- CN202410540068.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-09-06
AI Technical Summary
In the intelligent inspection of substations, it is difficult to identify the readings of dual-pointer meters, especially in complex environments. Multiple angles, light and occlusion factors lead to problems of missed detection and false detection. It is difficult to improve the accuracy of existing methods.
By taking images from drones and using the meter extraction model, reading recognition model and pointer recognition model, the images and readings of the dual-pointer meter are obtained respectively, and accurate readings are output through difference verification and mean calculation, and alarm information is issued to reduce Mis-segmentation error.
It improves the recognition accuracy of dual-pointer meter readings, reduces reading errors caused by mis-segmentation, issues alarms in a timely manner, and improves the accuracy of recognition.
Smart Images

Figure CN118609128A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of meter readings, and in particular to a method, system, computer equipment and readable storage medium for identifying double-pointer meter readings based on images taken by an unmanned aerial vehicle. Background Art
[0002] At present, in the sensitive area of intelligent inspection of substations, as time goes by, the meter readings at different times under the substation may be damaged. At this time, drone inspections equipped with visible light cameras are deployed in sensitive key areas. The system automatically captures visible light images of the equipment in the area in real time, and then through manual screening, the background interface of the remote monitoring center will pop up pictures of the corresponding equipment, and determine whether it belongs to the meter equipment, and finally determine the meter readings.
[0003] It is very difficult to judge whether there are pointer meters in the substation, whether it is a manual inspection method or a method combining drones with visible light cameras, and then judging the meter readings by manual screening. The biggest problem is that the substation environment is complex and screening is difficult; that is, the pointer meters in the substation environment have multiple angles, light, occlusion and other factors, which bring great challenges to the intelligent inspection of substations, resulting in a certain degree of missed detection and false detection. In the specific implementation process, the method of drone and artificial intelligence image recognition is adopted. First, the route is planned, and the drone is used to fly according to the established route to collect meter pictures. Secondly, the meter picture is recognized by the artificial intelligence image recognition algorithm and returns to the location of the target device, and the area where the meter picture exists is intercepted. Finally, the meter pointer and scale area are segmented by the artificial intelligence segmentation algorithm, and the meter reading is calculated after post-processing. This can greatly reduce the possibility of false alarms and save manpower. Most of the existing ones are single-image single meter single pointer readings. However, for example, the oil temperature meter is a double-pointer meter reading, which is more difficult. Summary of the invention
[0004] Based on this, the purpose of the present invention is to provide a method, system, computer equipment and readable storage medium for identifying dual-pointer meter readings based on images taken by drones, which has the advantages of improving the accuracy of dual-pointer meter readings and eliminating the possibility of mis-segmentation.
[0005] A method for identifying double-pointer meter readings based on images taken by a drone comprises the following steps:
[0006] Acquire a target image including a dual-pointer meter in a target area photographed by a drone;
[0007] Inputting the target image into a meter extraction model to obtain a double-pointer meter image;
[0008] Inputting the dual-pointer meter image into a meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer;
[0009] Input the dual-pointer meter image into a first pointer recognition model to obtain a third reading corresponding to the first pointer, and input the dual-pointer meter image into a second pointer recognition model to obtain a fourth reading corresponding to the second pointer;
[0010] If the difference between the first reading and the third reading is lower than the preset first difference, and the difference between the second reading and the fourth reading is lower than the preset second difference, the average of the first reading and the third reading is calculated, the first pointer reading is obtained, the average of the second reading and the fourth reading is calculated, the second pointer reading is obtained, and the first pointer reading and the second pointer reading are output as the target readings of the dual pointer meter; otherwise, an alarm message is issued.
[0011] A dual pointer meter reading recognition system based on images taken by a drone, comprising:
[0012] A target image acquisition module, used to acquire a target image including a dual-pointer meter in a target area photographed by a drone;
[0013] A meter image acquisition module, used for inputting the target image into a meter extraction model to acquire a dual-pointer meter image;
[0014] a reading acquisition module, used for inputting the dual-pointer meter image into the meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer; inputting the dual-pointer meter image into the first pointer recognition model to obtain a third reading corresponding to the first pointer; inputting the dual-pointer meter image into the second pointer recognition model to obtain a fourth reading corresponding to the second pointer;
[0015] The target reading output module is used to calculate the average of the first reading and the third reading, obtain the first pointer reading, calculate the average of the second reading and the fourth reading, obtain the second pointer reading, and output the first pointer reading and the second pointer reading as the target readings of the dual pointer meter if the difference between the first reading and the third reading is lower than the preset first difference, and the difference between the second reading and the fourth reading is lower than the preset second difference, otherwise, issue an alarm message.
[0016] A computer device comprises: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned method for identifying double-pointer meter readings based on images taken by a drone are implemented.
[0017] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for identifying double-pointer meter readings based on images taken by an unmanned aerial vehicle are implemented.
[0018] The dual-pointer meter reading recognition method based on drone-photographed images described in the present application obtains a target image including a dual-pointer meter in a target area photographed by a drone, inputs the target image into a meter extraction model, obtains a dual-pointer meter image, and then inputs the dual-pointer meter image into the meter reading recognition model, the first pointer reading recognition model, and the second pointer reading recognition model, respectively, to obtain a first reading and a third reading corresponding to the first pointer, and a second reading and a fourth reading corresponding to the second pointer. When the difference between the first reading and the third reading is less than a preset first difference and the difference between the second reading and the fourth reading is less than a preset second difference, the first pointer reading is obtained by calculating the average of the first reading and the third reading, the second pointer reading is obtained by calculating the average of the second reading and the fourth reading, and the first pointer reading and the second pointer reading are output as target readings of the dual-pointer meter. Otherwise, an alarm message is issued.
[0019] The dual-pointer meter reading recognition method based on drone-photographed images described in the present application recognizes the dual-pointer meter image in the target image through the meter recognition model, the first pointer recognition model and the second pointer recognition model, thereby improving the accuracy of dual-pointer meter reading recognition, reducing the occurrence of reading errors caused by missegmentation, and promptly issuing an alarm message when the reading is abnormal, thereby improving the accuracy of dual-pointer meter reading recognition.
[0020] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a schematic diagram of the steps of a method for identifying readings of a dual-pointer meter based on images taken by a drone in one embodiment of the present application;
[0022] Figure 2 A flowchart of the steps of obtaining a dual-pointer meter image in one embodiment of the present application;
[0023] Figure 3 A flowchart of the steps of obtaining a first reading corresponding to a first pointer and a second reading corresponding to a second pointer in one embodiment of the present application;
[0024] Figure 4 A flowchart of the steps of obtaining a third reading corresponding to the first pointer in one embodiment of the present application;
[0025] Figure 5 A flowchart of the steps of training the meter segmentation model in one embodiment of the present application;
[0026] Figure 6 This is a structural schematic diagram of a dual-pointer meter reading recognition system based on images taken by a drone in one embodiment of the present application;
[0027] Figure 7 Schematic diagram of computer equipment for a method for identifying dual-pointer meter readings based on images taken by a drone in an embodiment of the present application. DETAILED DESCRIPTION
[0028] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0029] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0030] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" / "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".
[0031] See also Figure 1 , Figure 1 The following is a flow chart of the steps of a method for identifying the reading of a dual-pointer meter based on an image taken by a drone in one embodiment of the present application. A method for identifying the reading of a dual-pointer meter based on an image taken by a drone comprises the following steps:
[0032] S101, obtaining a target image including a dual-pointer meter in a target area photographed by a drone;
[0033] S102, inputting the target image into a meter extraction model to obtain a double-pointer meter image;
[0034] S103, inputting the dual-pointer meter image into a meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer;
[0035] S104, inputting the dual-pointer meter image into a first pointer recognition model to obtain a third reading corresponding to the first pointer, and inputting the dual-pointer meter image into a second pointer recognition model to obtain a fourth reading corresponding to the second pointer;
[0036] S105, if the difference between the first reading and the third reading is lower than the preset first difference, and the difference between the second reading and the fourth reading is lower than the preset second difference, then the average of the first reading and the third reading is calculated, the first pointer reading is obtained, the average of the second reading and the fourth reading is calculated, the second pointer reading is obtained, and the first pointer reading and the second pointer reading are output as the target readings of the dual pointer meter; otherwise, an alarm message is issued.
[0037] The dual-pointer meter reading recognition method based on drone-photographed images described in the present application obtains a target image including a dual-pointer meter in a target area photographed by a drone, inputs the target image into a meter extraction model, obtains a dual-pointer meter image, and then inputs the dual-pointer meter image into the meter reading recognition model, the first pointer reading recognition model, and the second pointer reading recognition model, respectively, to obtain a first reading and a third reading corresponding to the first pointer, and a second reading and a fourth reading corresponding to the second pointer. When the difference between the first reading and the third reading is less than a preset first difference and the difference between the second reading and the fourth reading is less than a preset second difference, the first pointer reading is obtained by calculating the average of the first reading and the third reading, the second pointer reading is obtained by calculating the average of the second reading and the fourth reading, and the first pointer reading and the second pointer reading are output as target readings of the dual-pointer meter. Otherwise, an alarm message is issued.
[0038] The dual-pointer meter reading recognition method based on drone-photographed images described in the present application recognizes the dual-pointer meter image in the target image through the meter recognition model, the first pointer recognition model and the second pointer recognition model, thereby improving the accuracy of dual-pointer meter reading recognition, reducing the occurrence of reading errors caused by missegmentation, and promptly issuing an alarm message when the reading is abnormal, thereby improving the accuracy of dual-pointer meter reading recognition.
[0039] In step S101, a target image including a dual-pointer meter in a target area photographed by a drone is obtained;
[0040] The target area is a pre-set area that needs to be inspected. In one embodiment, the target area is set to be an area in a substation that needs to be inspected. The dual-pointer meter is a meter with two reading pointers, and the target image is an image of a dual-pointer meter that needs to be read and identified in the target area.
[0041] In this embodiment, a target image including a dual-pointer meter in the target area is acquired to perform dual-pointer meter reading.
[0042] In one embodiment, obtaining a target image including a dual-pointer meter in a target area photographed by a drone includes the following steps:
[0043] Using the preset route planning software, the route is planned for the target area to obtain the route of the drone;
[0044] According to the UAV route, a UAV equipped with a camera device is controlled to inspect the target area and take a target image including the dual pointer meter.
[0045] Among them, the route planning software is software used to plan the route of the drone according to the flight area, and the drone route is the flight route of the drone generated by analyzing the target area through the route planning software.
[0046] The camera device is a device arranged on the drone for taking pictures within the target area. In the present embodiment, when the drone inspects the target area according to the drone route, the camera device is controlled to take pictures of the area within the target area including the dual-pointer meter to obtain the target image.
[0047] In this embodiment, a route is planned for the target area through a preset route planning software, a drone route is obtained, and a drone equipped with a camera device is controlled to patrol the target area according to the drone route, and the target image including the dual-pointer meter is captured by the camera device.
[0048] In step S102, the target image is input into a meter extraction model to obtain a double-pointer meter image;
[0049] The meter extraction model is a model for extracting the image of the dual-pointer meter from the target image. The dual-pointer meter image is an image corresponding to the dual-pointer meter in the target image.
[0050] See also Figure 2 , Figure 2This is a flowchart of the steps of obtaining a dual-pointer meter image in one embodiment of the present application. In one embodiment, the target image is input into a meter extraction model to obtain a dual-pointer meter image, including the following steps:
[0051] S201, inputting the target image into the meter extraction model to obtain position information of a double-pointer meter in the target image;
[0052] S202, according to the position information, intercepting the image corresponding to the dual-pointer meter in the target image to obtain the dual-pointer meter image.
[0053] For steps S201 to S202, the meter extraction model is set to the YOLOv5-7.0 meter extraction model, and the position information is used to express the corresponding position of the dual-pointer meter in the target image. In one embodiment, the position information is set to the corresponding position coordinates of the dual-pointer meter in the target image.
[0054] In this embodiment, the target image is input into the meter extraction model to identify the position information of the double-pointer meter in the target image, and the double-pointer meter image is intercepted from the target image according to the position information. By acquiring the double-pointer meter image, the interference of the non-double-pointer meter area in the target image on the double-pointer meter reading is reduced, and the accuracy of double-pointer meter reading recognition is improved.
[0055] In step S103, the dual-pointer meter image is input into a meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer;
[0056] The meter reading recognition model is a model used to recognize the dual-pointer meter image and obtain the pointer reading. In this embodiment, the meter reading recognition model is:
[0057] The first pointer is one of the pointers of the dual-pointer meter, the second pointer is the other pointer of the dual-pointer meter, the first reading is the reading corresponding to the first pointer obtained by inputting the dual-pointer meter into the meter reading identification model, and the second reading is the reading corresponding to the second pointer obtained by inputting the dual-pointer meter into the meter reading identification model.
[0058] In this embodiment, the dual-pointer meter image is input into the meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer.
[0059] See also Figure 3 , Figure 3A flowchart of the steps of obtaining a first reading corresponding to a first pointer and a second reading corresponding to a second pointer in one embodiment of the present application. In one embodiment, the dual-pointer meter image is input into a meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer, including the following steps:
[0060] S301, segmenting the dual-pointer meter image into a first pointer image, a second pointer image and a scale image through a meter segmentation model;
[0061] S302, removing the connected area of the first pointer image, the second pointer image and the scale image through an erosion operation;
[0062] S303: Calculate a first reading corresponding to the first pointer and a second reading corresponding to the second pointer by using concentric circle sampling according to the first pointer image, the second pointer image and the scale image.
[0063] Regarding steps S301 to S302, the meter segmentation model is a model for segmenting the dual-pointer meter image. In this embodiment, the dual-pointer meter image is segmented into a first pointer image, a second pointer image and a scale image by the meter segmentation model.
[0064] The erosion operation is to erode the first pointer image, the second pointer image and the scale image by using a convolution kernel to remove the connected areas in the first pointer image, the second pointer image and the scale image, thereby improving the efficiency of obtaining the readings of the dual pointer meter. In one embodiment, the first pointer image, the second pointer image and the scale image are eroded by using a 4*4 convolution kernel.
[0065] In step S303, according to the first pointer image, the second pointer image and the scale image, a first reading corresponding to the first pointer and a second reading corresponding to the second pointer are calculated by using a concentric circle sampling method;
[0066] In one embodiment, according to the first pointer image, the second pointer image and the scale image, a first reading corresponding to the first pointer and a second reading corresponding to the second pointer are calculated by concentric circle sampling, including the following steps:
[0067] Calculating the two side lengths and the geometric center of the first pointer image, the second pointer image and the scale image obtained in the meter segmentation model, taking the shorter side length of the two side lengths as the diameter of the initial concentric circle, and taking the geometric center as the center of the initial concentric circle;
[0068] Specify the initial rotation angle and the width and height of the flattened rectangular area. The initial rotation angle is used to generate the initial sampling point of each concentric circle. The width of the flattened rectangular area corresponds to the number of samplings on each concentric circle. The height of the flattened rectangular area corresponds to the number of sampled concentric circles. A rectangular coordinate system is established with the center of the initial concentric circle as the origin. The angle between the starting scale line and the positive direction of the x-axis is the starting angle, and the angle between the ending scale line and the positive direction of the x-axis is the ending angle. The initial rotation angle is between the starting angle and the ending angle.
[0069] Starting from the initial sampling point of the concentric circle, the pixel values are uniformly sampled on the circumference of the concentric circle in a clockwise direction, and the number of samplings corresponds to the width of the flattened rectangular area;
[0070] With the center of the concentric circle as the center, the radius is shortened by 1 pixel unit to generate a new concentric circle, and the above steps are repeated to obtain the flattened rectangular area corresponding to the first pointer image, the second pointer image and the scale image;
[0071] Acquire a first pointer position in the first pointer image, a second pointer position in the second pointer image, a start scale position and a start scale value, and an end scale position and an end scale value in the scale image;
[0072] According to the flattened rectangular area, calculating a first distance between the first pointer position and the scale starting position, a second distance between the scale starting position and the scale ending position, and a third distance between the second pointer position and the scale starting position;
[0073] The ratio of the first distance to the second distance is multiplied by the difference between the starting scale value and the ending scale value to obtain a first reading corresponding to the first pointer, and the ratio of the third distance to the second distance is multiplied by the difference between the starting scale value and the ending scale value to obtain a second reading corresponding to the second pointer.
[0074] In one embodiment, when the first pointer and the second pointer in the dual-pointer meter image coincide with each other, and the dual-pointer meter image is recognized by the meter segmentation model, but the first pointer or the second pointer is not recognized, then a first reading corresponding to the first pointer is output as 0 or a second reading corresponding to the second pointer is output as 0. For example, when the dual-pointer meter image is input into the meter segmentation model, the first pointer image and the scale image are segmented, and the second pointer image is not recognized, then according to steps S302 to S303, the first reading corresponding to the first pointer is obtained, and the second reading corresponding to the second pointer is output as 0.
[0075] In this embodiment, the dual-pointer meter image is segmented into a first pointer image, a second pointer image and a scale image by using a meter segmentation model, and a erosion operation is used to remove connected areas in the first pointer image, the second pointer image and the scale image, and a first reading corresponding to the first pointer and a second reading corresponding to the second pointer are obtained by concentric circle sampling.
[0076] In step S104, the dual-pointer meter image is input into the first pointer recognition model to obtain a third reading corresponding to the first pointer, and the dual-pointer meter image is input into the second pointer recognition model to obtain a fourth reading corresponding to the second pointer;
[0077] The first pointer recognition model is a model for recognizing and reading the first pointer in the dual-pointer meter image, and the second pointer recognition model is a model for recognizing and reading the second pointer in the dual-pointer meter image. The third reading is the reading corresponding to the first pointer obtained by inputting the dual-pointer meter image into the first pointer recognition model, and the fourth reading is the reading corresponding to the second pointer obtained by inputting the dual-pointer meter image into the second pointer recognition model.
[0078] In this embodiment, the third reading corresponding to the first pointer and the fourth reading corresponding to the second pointer are obtained by inputting the dual-pointer meter image into the first pointer recognition model and the second pointer recognition model respectively.
[0079] See also Figure 4 , Figure 4 This is a flowchart of the steps of obtaining the third reading corresponding to the first pointer in one embodiment of the present application. In one embodiment, the dual-pointer meter image is input into the first pointer recognition model to obtain the third reading corresponding to the first pointer, including the following steps:
[0080] S401, segmenting the dual-pointer meter image into a first pointer image and a scale image through a first pointer meter segmentation model;
[0081] S402, removing the connected area between the first pointer image and the scale image through an erosion operation;
[0082] S403: Calculate a third reading corresponding to the first pointer according to the first pointer image and the scale image by adopting a concentric circle sampling method.
[0083] Regarding steps S401 to S403, the first pointer meter segmentation model is a model for performing image segmentation on the dual-pointer meter image. In this embodiment, the dual-pointer meter image is segmented into a first pointer image and a scale image by the first meter segmentation model.
[0084] In this embodiment, the dual-pointer meter image is segmented into a first pointer image and a scale image by using the first pointer meter segmentation model, a erosion operation is used to remove the connected area between the first pointer image and the scale image, and a concentric circle sampling method is used to obtain a third reading corresponding to the first pointer.
[0085] In one embodiment, if the first pointer and the second pointer in the dual-pointer meter image overlap, and the first pointer image is not recognized after being input into the first pointer recognition model, the third reading corresponding to the first pointer is output as 0.
[0086] In one embodiment, the dual-pointer meter image is input into a second pointer recognition model to obtain a fourth reading corresponding to the second pointer, including the following steps:
[0087] The dual-pointer meter image is segmented into a second pointer image and a scale image by using a second pointer meter segmentation model;
[0088] Removing the connected area between the second pointer image and the scale image through an erosion operation;
[0089] According to the second pointer image and the scale image, a fourth reading corresponding to the second pointer is calculated by adopting a concentric circle sampling method.
[0090] The second pointer meter segmentation model is a model for performing image segmentation on the dual-pointer meter image. In this embodiment, the dual-pointer meter image is segmented into a second pointer image and a scale image by the second meter segmentation model.
[0091] In this embodiment, the dual-pointer meter image is segmented into a second pointer image and a scale image by using the second pointer meter segmentation model, a erosion operation is used to remove the connected area between the second pointer image and the scale image, and a concentric circle sampling method is used to obtain a fourth reading corresponding to the second pointer.
[0092] In one embodiment, if the first pointer and the second pointer in the dual-pointer meter image overlap, and the second pointer image is not recognized after being input into the second pointer recognition model, a fourth reading corresponding to the second pointer is output as 0.
[0093] S105, if the difference between the first reading and the third reading is lower than the preset first difference, and the difference between the second reading and the fourth reading is lower than the preset second difference, then the average of the first reading and the third reading is calculated, the first pointer reading is obtained, the average of the second reading and the fourth reading is calculated, the second pointer reading is obtained, and the first pointer reading and the second pointer reading are output as the target readings of the dual pointer meter; otherwise, an alarm message is issued.
[0094] Among them, the first difference is the difference of the readings corresponding to the first pointer set in advance, the second difference is the difference of the readings corresponding to the second pointer set in advance, the alarm information is information used to alarm the reading error, in one embodiment, the alarm information is set to "meter reading error, please conduct manual review", the target reading is the final reading of the dual-pointer meter, in this embodiment, the target reading includes the first pointer reading and the second pointer reading.
[0095] In this embodiment, by comparing the difference between the first reading and the third reading with the first difference, and comparing the difference between the second reading and the fourth reading with the second difference, it is determined whether to output the target reading. When the difference between the first reading and the third reading is less than the first difference and the difference between the second reading and the fourth reading is less than the second difference, the first pointer reading is obtained by calculating the average of the first reading and the third reading, and the second pointer reading is obtained by calculating the average of the second reading and the fourth reading. Finally, the first pointer reading and the second pointer reading are output as the target readings of the dual pointer meter.
[0096] When the difference between the first reading and the third reading is not less than the first difference, or the difference between the second reading and the fourth reading is not less than the second difference, an alarm message is issued to notify the staff that the double-pointer meter reading is abnormal and to conduct manual review.
[0097] See also Figure 5 , Figure 5 The flowchart of the steps of training the meter segmentation model in one embodiment of the present application. In one embodiment, the dual-pointer meter reading recognition method based on drone-photographed images further includes training the meter segmentation model, including the following steps:
[0098] S501, obtaining sample images of dual-pointer meters in different time periods and under different weather conditions;
[0099] S502, using a label marking tool, marking a first pointer sample, a second pointer sample, and a scale sample in the dual-pointer meter sample image;
[0100] S503, taking the meter sample image as input and the first pointer sample, the second pointer sample and the scale sample as output, training the meter segmentation model.
[0101] Regarding steps S501 to S503, the label marking tool is a tool for marking the sample image of the dual-pointer meter. In one embodiment, the label marking tool is Lableme labeling software.
[0102] In this embodiment, by using sample images of dual-pointer meters at different times and in different weather conditions, the first pointer sample, the second pointer sample and the scale sample are annotated by a label annotation tool, and finally the meter sample images are used as input, and the first pointer sample, the second pointer sample and the scale sample are used as output to train the meter segmentation model. This improves the accuracy of the meter segmentation model and the accuracy of the dual-pointer meter readings.
[0103] In one embodiment, the method for identifying dual-pointer meter readings based on images taken by a drone further includes training the first pointer meter segmentation model, including the following steps:
[0104] Obtain sample images of dual-pointer meters in different time periods and weather conditions;
[0105] Using a label marking tool, marking a first pointer sample and a scale sample in the dual-pointer meter sample image;
[0106] The first pointer meter segmentation model is trained by taking the meter sample image as input and the first pointer sample and scale sample as output.
[0107] In this embodiment, by using sample images of dual-pointer meters at different times and in different weather conditions, the first pointer samples and scale samples are labeled by a labeling tool, and finally the first pointer meter segmentation model is trained with the meter sample images as input and the first pointer samples and scale samples as output, thereby improving the accuracy of the meter segmentation model and the accuracy of the dual-pointer meter readings.
[0108] In one embodiment, the dual-pointer meter reading recognition method based on drone-photographed images further includes training the second pointer meter segmentation model, including the following steps:
[0109] Obtain sample images of dual-pointer meters in different time periods and weather conditions;
[0110] Using a label marking tool, marking a second pointer sample and a scale sample in the dual-pointer meter sample image;
[0111] The second pointer meter segmentation model is trained by taking the meter sample image as input and the second pointer sample and scale sample as output.
[0112] In this embodiment, by using sample images of dual-pointer meters at different times and in different weather conditions, the second pointer samples and scale samples are annotated by a label annotation tool, and finally the second pointer meter segmentation model is trained with the meter sample images as input and the second pointer samples and scale samples as output, thereby improving the accuracy of the meter segmentation model and the accuracy of the dual-pointer meter readings.
[0113] The dual-pointer meter reading recognition method based on drone-photographed images described in the present application plans a route for the target area using a preset route planning software, obtains a drone route, and controls a drone equipped with a camera to inspect the target area, obtains a target image including a dual-pointer meter in the target area, inputs the target image into a meter extraction model, obtains the position information of the dual-pointer meter in the target image, obtains a dual-pointer meter image from the target image according to the position information, and then inputs the dual-pointer meter image into the meter reading recognition model, the first pointer reading recognition model, and the second pointer reading recognition model, respectively, to obtain a first reading and a third reading corresponding to the first pointer, and a second reading and a fourth reading corresponding to the second pointer. When the difference between the first reading and the third reading is less than a preset first difference and the difference between the second reading and the fourth reading is less than a preset second difference, the first pointer reading is obtained by calculating the average of the first reading and the third reading, the second pointer reading is obtained by calculating the average of the second reading and the fourth reading, and the first pointer reading and the second pointer reading are output as the target readings of the dual pointer meter. Otherwise, an alarm message is issued.
[0114] The dual-pointer meter reading recognition method based on drone-photographed images described in the present application recognizes the dual-pointer meter image in the target image through the meter recognition model, the first pointer recognition model and the second pointer recognition model, thereby improving the accuracy of dual-pointer meter reading recognition, reducing the occurrence of reading errors caused by missegmentation, and promptly issuing an alarm message when the reading is abnormal, thereby improving the accuracy of dual-pointer meter reading recognition.
[0115] See also Figure 6 , Figure 6 The following is a schematic diagram of a dual-pointer meter reading recognition system based on images taken by a drone in one embodiment of the present application. A dual-pointer meter reading recognition system based on images taken by a drone includes:
[0116] The target image acquisition module 11 is used to acquire the target image including the dual pointer meter in the target area photographed by the drone;
[0117] A meter image acquisition module 12, used for inputting the target image into a meter extraction model to acquire a dual-pointer meter image;
[0118] The reading acquisition module 13 is used to input the dual-pointer meter image into the meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer; input the dual-pointer meter image into the first pointer recognition model to obtain a third reading corresponding to the first pointer; input the dual-pointer meter image into the second pointer recognition model to obtain a fourth reading corresponding to the second pointer;
[0119] The target reading output module 14 is used to calculate the average of the first reading and the third reading, obtain the first pointer reading, calculate the average of the second reading and the fourth reading, obtain the second pointer reading, and output the first pointer reading and the second pointer reading as the target readings of the dual pointer meter if the difference between the first reading and the third reading is lower than the preset first difference, and the difference between the second reading and the fourth reading is lower than the preset second difference, otherwise, issue an alarm message.
[0120] It should be noted that the dual-pointer meter reading recognition system based on drone-photographed images provided in the above-mentioned embodiment only uses the division of the above-mentioned functional modules as an example when executing the dual-pointer meter reading recognition method based on drone-photographed images. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The dual-pointer meter reading recognition system based on drone-photographed images provided in the above-mentioned embodiment is used to execute the dual-pointer meter reading recognition method based on drone-photographed images described in the above-mentioned embodiment. Its operation method and principle are the same as the dual-pointer meter reading recognition method based on drone-photographed images recorded above, that is, the dual-pointer meter reading recognition system based on drone-photographed images provided in the above-mentioned embodiment and the dual-pointer meter reading recognition method based on drone-photographed images belong to the same concept. The implementation process is detailed in the above-mentioned method embodiment, which will not be repeated here.
[0121] See also Figure 7 , Figure 7The computer device schematic diagram of the dual-pointer meter reading recognition method based on drone-photographed images in the embodiment of the present application is shown. The computer device 21 includes: a control device 211, a memory 212, and a computer program 213 stored in the memory 212 and executable on the control device 211, such as a dual-pointer meter reading program; the control device 211 executes the computer program 213 to implement the dual-pointer meter reading recognition method based on drone-photographed images described in the above embodiment.
[0122] Among them, the control device 211 includes a processor, and the processor may include one or more processing cores. The processor uses various interfaces and lines to connect various parts in the computer device 21, and executes various functions and processes data of the computer device 21 by running or executing instructions, programs, code sets or instruction sets stored in the memory 212, and calling the data in the memory 212. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch display; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented by a single chip.
[0123] Among them, the memory 212 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 212 includes a non-transitory computer-readable storage medium. The memory 212 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 212 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 212 may also be optionally at least one storage device located away from the aforementioned processor.
[0124] An embodiment of the present application also provides a computer-readable storage medium, which can store multiple instructions. The instructions are suitable for loading and executing the method steps of the above embodiment by a control device. The specific execution process can be found in the specific description of the above embodiment, which will not be repeated here.
[0125] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
[0126] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A method for identifying double-pointer meter readings based on images taken by drones, characterized in that: The following steps are involved: Acquire a target image including a dual-pointer meter in a target area photographed by a drone; Inputting the target image into a meter extraction model to obtain a double-pointer meter image; Inputting the dual-pointer meter image into a meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer; Input the dual-pointer meter image into a first pointer recognition model to obtain a third reading corresponding to the first pointer, and input the dual-pointer meter image into a second pointer recognition model to obtain a fourth reading corresponding to the second pointer; If the difference between the first reading and the third reading is lower than the preset first difference, and the difference between the second reading and the fourth reading is lower than the preset second difference, the average of the first reading and the third reading is calculated, the first pointer reading is obtained, the average of the second reading and the fourth reading is calculated, the second pointer reading is obtained, and the first pointer reading and the second pointer reading are output as the target readings of the dual pointer meter; otherwise, an alarm message is issued.
2. The method for identifying double-pointer meter readings based on images taken by drones according to claim 1 is characterized in that: Inputting the target image into a meter extraction model to obtain a dual-pointer meter image includes the following steps: Inputting the target image into the meter extraction model to obtain the position information of the double-pointer meter in the target image; According to the position information, an image corresponding to the dual-pointer meter in the target image is intercepted to obtain the dual-pointer meter image.
3. The method for identifying double-pointer meter readings based on images taken by drones according to claim 1 is characterized in that: Inputting the dual-pointer meter image into a meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer includes the following steps: The dual-pointer meter image is segmented into a first pointer image, a second pointer image and a scale image through a meter segmentation model; By means of an erosion operation, the connected area of the first pointer image, the second pointer image and the scale image is removed; According to the first pointer image, the second pointer image and the scale image, a first reading corresponding to the first pointer and a second reading corresponding to the second pointer are calculated by adopting a concentric circle sampling method.
4. The method for identifying double-pointer meter readings based on images taken by drones according to claim 3 is characterized in that: Also included is training the meter segmentation model, comprising the following steps: Obtain sample images of dual-pointer meters in different time periods and weather conditions; Using a label marking tool, marking the first pointer sample, the second pointer sample and the scale sample in the dual-pointer meter sample image; The meter segmentation model is trained by taking the meter sample image as input and the first pointer sample, the second pointer sample and the scale sample as output.
5. The method for identifying double-pointer meter readings based on images taken by drones according to claim 1, characterized in that: Inputting the dual-pointer meter image into a first pointer recognition model to obtain a third reading corresponding to the first pointer includes the following steps: The dual-pointer meter image is segmented into a first pointer image and a scale image by using a first pointer meter segmentation model; By means of an erosion operation, a connected area between the first pointer image and the scale image is removed; According to the first pointer image and the scale image, a third reading corresponding to the first pointer is calculated by adopting a concentric circle sampling method.
6. The method for identifying double-pointer meter readings based on images taken by drones according to claim 5 is characterized in that: Also included is training the first pointer meter segmentation model, including the following steps: Obtain sample images of dual-pointer meters in different time periods and weather conditions; Using a label marking tool, marking a first pointer sample and a scale sample in the dual-pointer meter sample image; The first pointer meter segmentation model is trained by taking the meter sample image as input and the first pointer sample and scale sample as output.
7. The method for identifying double-pointer meter readings based on images taken by drones according to claim 1, characterized in that: Acquiring a target image including a dual-pointer meter in a target area photographed by a drone includes the following steps: Using the preset route planning software, the route is planned for the target area to obtain the route of the drone; According to the UAV route, the UAV equipped with a camera device is controlled to inspect the target area and take target images including the dual pointer meter.
8. A dual pointer meter reading recognition system based on drone-photographed images, characterized in that: include: A target image acquisition module, used to acquire a target image including a dual-pointer meter in a target area photographed by a drone; A meter image acquisition module, used for inputting the target image into a meter extraction model to acquire a dual-pointer meter image; a reading acquisition module, used for inputting the dual-pointer meter image into the meter reading recognition model to obtain a first reading corresponding to the first pointer and a second reading corresponding to the second pointer; inputting the dual-pointer meter image into the first pointer recognition model to obtain a third reading corresponding to the first pointer; inputting the dual-pointer meter image into the second pointer recognition model to obtain a fourth reading corresponding to the second pointer; The target reading output module is used to calculate the average of the first reading and the third reading, obtain the first pointer reading, calculate the average of the second reading and the fourth reading, obtain the second pointer reading, and output the first pointer reading and the second pointer reading as the target readings of the dual pointer meter if the difference between the first reading and the third reading is lower than the preset first difference, and the difference between the second reading and the fourth reading is lower than the preset second difference, otherwise, issue an alarm message.
9. A computer device comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of a dual-pointer meter reading recognition method based on images taken by an unmanned aerial vehicle as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for identifying dual-pointer meter readings based on images taken by a drone as described in any one of claims 1 to 7 are implemented.
