A method for detecting damage to the viewing window of an electricity meter box
By constructing an image dataset and training a window detection model, and optimizing the output resolution of the window detection model, the problem of difficulty in identifying damaged windows in electric meter boxes was solved, achieving more accurate window position and boundary detection, and improving the accuracy of identifying damaged windows in electric meter boxes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2026-04-03
AI Technical Summary
Existing visual recognition technologies for damaged meter box windows face challenges in recognizing meter images, especially due to factors such as improper meter installation, environmental influences like ambient light, and the rapid pace of meter upgrades leading to diverse meter sizes.
By constructing an image dataset, labeling the window position, size, and damage information, and training a window detection model, and using the window detection model and the window damage recognition model, combined with convolutional layers, max pooling layers, dense layers, transformation layers, and fully connected layers, the output resolution of the window detection model is optimized to accurately locate the window region and identify the damage.
It improves the accuracy and precision of identifying damaged meter box windows, reduces the difficulty of recognizing complex meter images, and adapts to the detection needs of meters of different sizes.
Smart Images

Figure CN117237311B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power equipment monitoring technology, and in particular to a method for detecting damage to the viewing window of an electric meter box. Background Technology
[0002] Electricity meters are one of the most important electricity metering devices. Understanding the safety status of electricity meters is crucial for the safe use of electricity by every household.
[0003] Assessing the safety of electricity meters includes detecting damage to the meter box window. Currently, existing visual recognition technologies typically involve first processing the image in grayscale, then using edge detection algorithms to identify the contour points of various targets in the image, and finally locating the target object based on the contour features, followed by parameter detection and recognition. However, due to factors such as improper meter installation, environmental influences like ambient light, and the rapid pace of meter upgrades and diverse meter sizes, the difficulty of model recognition of captured meter images has increased.
[0004] Regarding the aforementioned technologies, the inventors discovered that existing visual recognition technologies for damaged meter box windows have the problem of difficulty in recognizing meter images. Summary of the Invention
[0005] To reduce the difficulty of model recognition of electricity meter images, this application provides a method for detecting damage to the viewing window of an electricity meter box.
[0006] In one aspect, this application provides a method for detecting damage to the viewing window of an electric meter box.
[0007] This application is achieved through the following technical solution:
[0008] A method for detecting damage to the viewing window of an electricity meter box includes the following steps:
[0009] Acquire photos of various types of meter boxes with lighting characteristics and construct an image dataset;
[0010] Label the viewport position, viewport size, and damage status of each meter box photo in the image dataset;
[0011] The labeled image dataset is divided into a training set and a test set;
[0012] Based on the training set, a window detection model is trained, wherein the window detection model includes a convolutional layer for extracting feature maps of the input image; a max-pooling layer connected to the convolutional layer for reducing the size of the feature maps; a Dense layer connected to the max-pooling layer for dimensionality reduction of the feature maps; a transformation layer connected to the Dense layer for feature fusion and at least three resolution transformations; and a fully connected layer connected to the transformation layer for outputting a window at the target resolution.
[0013] The window detection model is tested using the test set until the accuracy of the output result of the window detection model reaches a preset value;
[0014] The photo of the meter box to be inspected is obtained and input into the window detection model with a preset accuracy. The window image with a label indicating whether it is damaged is identified and cropped.
[0015] The window image with the "whether it is damaged" label is input into a preset window damage recognition model to obtain the damage result of the meter box window.
[0016] In a preferred embodiment, the present application may be further configured such that: the Dense layer includes four residual blocks with the number of layers 6, 12, 12 and 12 respectively, the residual block is composed of 6 or 12 substructures, the substructures are combined by dense connection, and the substructure includes a first convolutional layer with a size of 1×1 and a second convolutional layer with a size of 3×3.
[0017] In a preferred embodiment, this application can be further configured to include the following steps:
[0018] Define the detection target for each residual block, including:
[0019] The residual block with 6 layers and the residual block with 12 layers are used to detect feature maps of small target sizes;
[0020] Another layer of 12 residual blocks is used to detect the feature map of the target size;
[0021] The residual block with 12 remaining layers is used to detect feature maps of large target sizes.
[0022] In a preferred embodiment, this application may be further configured such that: the number of transformation layers is three, the input of each transformation layer is connected to the output of the residual block with 12 layers, and each transformation layer includes a 1×1 convolution, a 3×3 convolution, a 1×1 convolution, a 3×3 convolution and a 1×1 convolution connected in series.
[0023] In a preferred embodiment, this application can be further configured such that the step of testing the window detection model using the test set includes:
[0024] The test set is input into the window detection model to obtain the output result;
[0025] The accuracy of the output results is statistically analyzed, and the window detection model is iteratively trained until the accuracy of the output results of the window detection model reaches a preset first threshold.
[0026] In a preferred embodiment, this application can be further configured such that the training steps of the window damage recognition model include,
[0027] Crop window portions of images from the labeled image dataset to construct a window dataset;
[0028] The window dataset is input into a deep learning model for object detection, and the number of damaged windows identified is counted.
[0029] If the number of damaged windows is greater than 0, the meter box window is determined to have a damage defect;
[0030] Repeat the above steps until the accuracy of the window damage recognition model reaches the preset second threshold.
[0031] In a preferred example, this application can be further configured such that the deep learning model is either a VGG19 model or a ResNet-18 model.
[0032] In a preferred embodiment, this application can be further configured such that: the step of acquiring photos of various meter boxes with illumination characteristics includes,
[0033] An auxiliary light source is used to illuminate the meter box.
[0034] In a preferred embodiment, the present application may be further configured such that the meter box includes a single meter box, multiple meter boxes, a damaged meter box, and a normal meter box.
[0035] Secondly, this application provides a device for detecting damage to the viewing window of an electricity meter box.
[0036] This application is achieved through the following technical solution:
[0037] A device for detecting damage to the viewing window of an electricity meter box, comprising,
[0038] The image acquisition module is used to acquire photos of various meter boxes with lighting characteristics and build an image dataset;
[0039] The image annotation module is used to annotate the window position, window size, and damage information of each meter box photo in the image dataset;
[0040] An image segmentation module is used to divide the labeled image dataset into a training set and a test set;
[0041] A window detection training module is used to train a window detection model based on the training set. The window detection model includes a convolutional layer for extracting feature maps from the input image; a max-pooling layer connected to the convolutional layer for reducing the size of the feature maps; a Dense layer connected to the max-pooling layer for dimensionality reduction of the feature maps; a transformation layer connected to the Dense layer for feature fusion and at least three resolution transformations; and a fully connected layer connected to the transformation layer for outputting a window at the target resolution.
[0042] The window detection testing module is used to test the window detection model using the test set until the accuracy of the output result of the window detection model reaches a preset value.
[0043] The detection module is used to acquire a photo of the meter box to be inspected and input it into the window detection model with a preset accuracy, identify the window image with a label indicating whether it is damaged, and crop it.
[0044] The damage identification module is used to input the window image with a damage label into a preset window damage identification model to obtain the damage result of the meter box window.
[0045] In summary, compared with the prior art, the beneficial effects of the technical solution provided in this application include at least the following:
[0046] This process involves acquiring photos of various meter boxes with lighting characteristics to construct an image dataset. Improving the brightness of these photos helps to clearly display the detailed features of the meter boxes. The viewport position, size, and damage status of each meter box photo in the image dataset are labeled for model construction. The labeled image dataset is divided into training and testing sets. A viewport detection model is trained based on the training set and tested using the testing set until the accuracy of the model's output reaches a preset value. Compared to the resolution output of existing fully connected layers, the viewport detection model learns the average size of the viewports in the image dataset to allow for at least three different output resolutions and optimization. The output resolution of the window detection model enables more accurate detection of the window's position and boundaries when the size of the meter box window changes, improving the model's accuracy in detecting the meter. Furthermore, by acquiring a photo of the meter box to be detected and inputting it into the window detection model with a preset accuracy, the model identifies and crops window images with damage labels, accurately locating the window area in the meter image. The window images with damage labels are then input into a preset window damage recognition model to obtain the damage result of the meter box window. Through image preprocessing operations using the window detection model, the difficulty of recognizing complex meter images by the window damage recognition model is reduced, and the accuracy of meter box window damage recognition is improved. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating a method for detecting damage to a meter box window, provided as an exemplary embodiment of this application.
[0048] Figure 2 This is a schematic diagram of the network structure of a window detection model for a method of detecting window damage in an electric meter box, provided as another exemplary embodiment of this application.
[0049] Figure 3 This is a schematic diagram of a method for detecting damage to the viewing window of an electric meter box, provided as another exemplary embodiment of this application.
[0050] Figure 4 This is a structural block diagram of an apparatus for detecting damage to a meter box window, provided as an exemplary embodiment of this application. Detailed Implementation
[0051] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they fall within the scope of the claims of this application.
[0052] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0053] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0054] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0055] Reference Figure 1 This application provides a method for detecting damage to the viewing window of an electricity meter box. The main steps of the method are described below.
[0056] S1: Obtain photos of various types of meter boxes with lighting characteristics and construct an image dataset;
[0057] S2: Label the window position, window size, and whether the image is damaged for each photo of the meter box in the image dataset;
[0058] S3: Divide the labeled image dataset into a training set and a test set;
[0059] S4: Based on the training set, train a window detection model, wherein the window detection model includes a convolutional layer for extracting feature maps of the input image; a max-pooling layer connected to the convolutional layer for reducing the size of the feature maps; a Dense layer connected to the max-pooling layer for dimensionality reduction of the feature maps; a transformation layer connected to the Dense layer for feature fusion and at least three resolution transformations; and a fully connected layer connected to the transformation layer for outputting a window at the target resolution.
[0060] S5: Test the window detection model using the test set until the accuracy of the output result of the window detection model reaches a preset value;
[0061] S6: Obtain a photo of the meter box to be tested and input it into the window detection model with a preset accuracy, identify the window image with a label indicating whether it is damaged and crop it;
[0062] S7: Input the window image with the damage label into the preset window damage recognition model to obtain the damage result of the meter box window.
[0063] In one embodiment, the Dense layer includes four residual blocks with the numbers 6, 12, 12 and 12 respectively. Each residual block is composed of 6 or 12 substructures, which are connected by dense connections. Each substructure includes a first convolutional layer with a size of 1×1 and a second convolutional layer with a size of 3×3.
[0064] In one embodiment, the following steps are also included:
[0065] Define the detection target for each residual block, including:
[0066] The residual block with 6 layers and the residual block with 12 layers are used to detect feature maps of small target sizes;
[0067] Another layer of 12 residual blocks is used to detect the feature map of the target size;
[0068] The residual block with 12 remaining layers is used to detect feature maps of large target sizes.
[0069] In one embodiment, the number of conversion layers is three, and the input of each conversion layer is connected to the output of the substructure with 12 layers. Each conversion layer includes a 1×1 convolution, a 3×3 convolution, a 1×1 convolution, a 3×3 convolution, and a 1×1 convolution connected in series.
[0070] In one embodiment, the step of testing the window detection model using the test set includes,
[0071] The test set is input into the window detection model to obtain the output result;
[0072] The accuracy of the output results is statistically analyzed, and the window detection model is iteratively trained until the accuracy of the output results of the window detection model reaches a preset first threshold.
[0073] In one embodiment, the training steps of the window damage recognition model include,
[0074] Crop window portions of images from the labeled image dataset to construct a window dataset;
[0075] The window dataset is input into a deep learning model for object detection, and the number of damaged windows identified is counted.
[0076] If the number of damaged windows is greater than 0, the meter box window is determined to have a damage defect;
[0077] Repeat the above steps until the accuracy of the window damage recognition model reaches the preset second threshold.
[0078] In one embodiment, the deep learning model is either the VGG19 model or the ResNet-18 model.
[0079] In a preferred embodiment, this application can be further configured such that: the step of acquiring photos of various meter boxes with illumination characteristics includes,
[0080] An auxiliary light source is used to illuminate the meter box.
[0081] In one embodiment, the meter box includes a single meter box, multiple meter boxes, a damaged meter box, and a normal meter box.
[0082] The specific descriptions of the above embodiments are as follows.
[0083] First, auxiliary light sources are used to illuminate the meter boxes to increase their brightness and make the photos clearer. Photos of various meter boxes with lighting characteristics are collected, such as 5,000 photos. These include single meter boxes, multi-meter boxes, damaged meter boxes, and normal meter boxes, and an image dataset is constructed.
[0084] Label all windows on each photo of the meter box, including their location, size, and whether they are damaged.
[0085] The labeled image dataset was divided into training and test sets in a 5:1 ratio.
[0086] The window detection model is trained based on the training set.
[0087] Reference Figure 2 The window detection model consists of one convolutional layer (Conv), one max pooling layer (Maxpool), a dense layer, a conversion layer (Conv Set), and one fully connected layer from top to bottom. The convolutional layer, max pooling layer, dense layer, and conversion layer form the basic network of the window detection model, while the fully connected layer is used for subsequent detection.
[0088] Convolutional layers are used to extract feature maps from training set images.
[0089] Max pooling layers are used to reduce the size of the extracted feature maps.
[0090] Dense layers are used to reduce the dimensionality of scaled feature maps, thereby reducing the computational cost of subsequent layers. Taking three resolution transformations as examples, the dense layer consists of four Dense Blocks with the same structure but different layer counts: 6, 12, 12, and 12. Each Dense Block contains 6 or 12 substructures, which are connected by dense connections. The first layer of each substructure is a 1×1 convolution, and the second layer is a 3×3 convolution.
[0091] A residual block with 6 layers and a residual block with 12 layers are used to detect feature maps of small target sizes. Another residual block with 12 layers is used to detect feature maps of medium-sized targets. The remaining residual block with 12 layers is used to detect feature maps of large target sizes.
[0092] Three resolutions are designed based on the average size obtained from the window sizes in the statistical image dataset. The average size of small windows is calculated using the sizes of small windows in the statistical image dataset, and this is used to design the resolution of small windows, thus matching the number of layers in the Dense block. Similarly, the average size of medium-sized windows is calculated using the sizes of medium-sized windows in the statistical image dataset, and this is used to design the resolution of medium-sized windows, thus matching the number of layers in the Dense block. Finally, the average size of large windows is calculated using the sizes of large windows in the statistical image dataset, and this is used to design the resolution of large windows, thus matching the number of layers in the Dense block.
[0093] The number of layers in each Dense block is optimized based on window data to achieve high accuracy and speed in window target detection with fewer layers in a network structure. At the same time, it can effectively detect windows of different sizes, improve the model's generalization ability, and make it more applicable.
[0094] There are three transformation layers, which are used to connect residual blocks to achieve feature map fusion and resolution transformation, and there are at least three resolution transformations. Each transformation layer consists of a 1×1 convolution, a 3×3 convolution, a 1×1 convolution, a 3×3 convolution, and a 1×1 convolution in sequence.
[0095] The fully connected layer is used to output a viewport at the target resolution. In this embodiment, the fully connected layer supports outputting three resolutions.
[0096] Compared to the resolution supported by the fully connected layers of existing object detection models, the resolution output by the window detection model in this application is optimized based on the window data in the image dataset. The window detection model sets three different resolutions as the numerical range of the target resolution, corresponding to small-sized windows, medium-sized windows and large-sized windows, based on the average size of windows of different sizes. This allows for more accurate detection of the position and boundary of the window when the window size changes, thereby improving the detection accuracy.
[0097] Next, the window detection model is tested using a test set, and the window detection results are output. The accuracy of the window detection results is then verified. If the accuracy of the window detection results is less than a preset value, the window detection model is iteratively trained until the accuracy of the output results of the window detection model reaches the preset value. In this embodiment, the preset value can be 90%.
[0098] Once a window detection model with preset accuracy is obtained, a photo of the meter box to be inspected is acquired again and input into the window detection model to detect the position, size, and damage status of the window in the photo. The model then outputs a window image with a damage label and crops it. The photo of the meter box to be inspected is a photo of various meter boxes illuminated by an auxiliary light source.
[0099] In this embodiment, the window image in the photo of the meter box to be tested is automatically cropped based on the detection results of the window detection model.
[0100] The window image with the "whether it is damaged" label is input into a preset window damage recognition model to obtain the damage result of the meter box window.
[0101] Furthermore, the training steps for the window damage recognition model include:
[0102] Based on the cropped window images, construct a window image dataset with labels indicating whether they are damaged;
[0103] The window image dataset was divided into a damaged training set and a damaged test set in a 5:1 ratio.
[0104] The damaged training set of the aforementioned window dataset is input into a deep learning model for object detection to count the number of identified damaged windows and train the window damage recognition model.
[0105] If the number of damaged windows is greater than 0, the meter box window is determined to be damaged; if the number of damaged windows is equal to 0, the meter box window is determined to be undamaged.
[0106] The damage test set of the aforementioned window dataset is input into the deep learning model to obtain the damage results of the meter box window and to statistically analyze the recognition accuracy.
[0107] Repeat the above steps until the accuracy of the window damage recognition model reaches the preset value.
[0108] In this embodiment, the ResNet-18 model is selected as the deep learning model.
[0109] When the accuracy of the window damage recognition model reaches 80%, the training of the window damage recognition model is completed, and a window damage recognition model with the accuracy of the preset value is obtained. This model is used to detect window images with whether they are damaged or not, so as to output the damage result of the meter box window.
[0110] Reference Figure 3 This application collects various meter box images with illumination characteristics, inputs them into a window detection model to detect the position, size, and damage status of windows in the images, and automatically crops images containing windows to obtain window images with damage labels. These images are then input into a window damage recognition model to identify whether the windows are damaged, thus obtaining the damage result of the meter box windows.
[0111] In summary, a method for detecting broken windows in electric meter boxes involves acquiring various electric meter box photos with lighting characteristics to construct an image dataset, thereby improving the brightness of the photos and facilitating clearer display of the meter box's detailed features. The method annotates the window position, size, and whether it is broken in each photo of the electric meter box in the image dataset for model construction. The annotated image dataset is divided into training and testing sets. A window detection model is trained based on the training set. The model is then tested using the testing set until the accuracy of its output reaches a preset value. Compared to the resolution output of fully connected layers in existing models, this method learns the average size of windows in the image dataset through the window detection model, allowing for the setting of at least three... By optimizing the output resolution of the window detection model to achieve different resolutions, the model can more accurately detect the position and boundaries of the window when the size of the meter box window changes, thus improving the model's accuracy in detecting the meter. Furthermore, by acquiring a photo of the meter box to be detected and inputting it into the window detection model with a preset accuracy, the model identifies and crops window images with damage labels, accurately locating the window area in the meter image. Then, the window images with damage labels are input into a preset window damage recognition model to obtain the damage result of the meter box window. Through image preprocessing operations of the window detection model, the difficulty of recognizing complex meter images by the window damage recognition model is reduced, and the accuracy of meter box window damage recognition is improved.
[0112] The number of layers in each Dense block of the window detection model is optimized based on the window data to achieve high accuracy and fast speed of window target detection in a network structure with fewer layers. At the same time, it can effectively detect windows of different sizes, improve the model's generalization ability, and make it more applicable.
[0113] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0114] Reference Figure 4 This application also provides a device for detecting damage to a meter box window, which corresponds one-to-one with the method for detecting damage to a meter box window described in the above embodiments. The device for detecting damage to a meter box window includes...
[0115] The image acquisition module is used to acquire photos of various meter boxes with lighting characteristics and build an image dataset;
[0116] The image annotation module is used to annotate the window position, window size, and damage information of each meter box photo in the image dataset;
[0117] An image segmentation module is used to divide the labeled image dataset into a training set and a test set;
[0118] A window detection training module is used to train a window detection model based on the training set. The window detection model includes a convolutional layer for extracting feature maps from the input image; a max-pooling layer connected to the convolutional layer for reducing the size of the feature maps; a Dense layer connected to the max-pooling layer for dimensionality reduction of the feature maps; a transformation layer connected to the Dense layer for feature fusion and at least three resolution transformations; and a fully connected layer connected to the transformation layer for outputting a window at the target resolution.
[0119] The window detection testing module is used to test the window detection model using the test set until the accuracy of the output result of the window detection model reaches a preset value.
[0120] The detection module is used to acquire a photo of the meter box to be inspected and input it into the window detection model with a preset accuracy, identify the window image with a label indicating whether it is damaged, and crop it.
[0121] The damage identification module is used to input the window image with a damage label into a preset window damage identification model to obtain the damage result of the meter box window.
[0122] For specific limitations regarding a device for detecting damage to a meter box window, please refer to the limitations of a method for detecting damage to a meter box window mentioned above, which will not be repeated here.
[0123] The various modules in the aforementioned device for detecting damage to the viewing window of an electricity meter box can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0124] In one embodiment, a computer device is provided, which may be a server. The computer device includes a processor, memory, a network interface, and a database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements any of the above-described methods for detecting damage to the meter box window.
[0125] In one embodiment, a computer-readable storage medium is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0126] S1: Obtain photos of various types of meter boxes with lighting characteristics and construct an image dataset;
[0127] S2: Label the window position, window size, and whether the image is damaged for each photo of the meter box in the image dataset;
[0128] S3: Divide the labeled image dataset into a training set and a test set;
[0129] S4: Based on the training set, train a window detection model, wherein the window detection model includes a convolutional layer for extracting feature maps of the input image; a max-pooling layer connected to the convolutional layer for reducing the size of the feature maps; a Dense layer connected to the max-pooling layer for dimensionality reduction of the feature maps; a transformation layer connected to the Dense layer for feature fusion and at least three resolution transformations; and a fully connected layer connected to the transformation layer for outputting a window at the target resolution.
[0130] S5: Test the window detection model using the test set until the accuracy of the output result of the window detection model reaches a preset value;
[0131] S6: Obtain a photo of the meter box to be tested and input it into the window detection model with a preset accuracy, identify the window image with a label indicating whether it is damaged and crop it;
[0132] S7: Input the window image with the damage label into the preset window damage recognition model to obtain the damage result of the meter box window.
[0133] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. When executed, the computer program may include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0134] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
Claims
1. A method for detecting damage to the viewing window of an electricity meter box, characterized in that, Includes the following steps, Acquire photos of various types of meter boxes with lighting characteristics and construct an image dataset; Label the viewport position, viewport size, and damage status of each meter box photo in the image dataset; The labeled image dataset is divided into a training set and a test set; Based on the training set, a window detection model is trained, wherein the window detection model includes a convolutional layer for extracting feature maps of the input image; a max-pooling layer connected to the convolutional layer for reducing the size of the feature maps; a Dense layer connected to the max-pooling layer for dimensionality reduction of the feature maps; a transformation layer connected to the Dense layer for feature fusion and at least three resolution transformations; and a fully connected layer connected to the transformation layer for outputting a window at the target resolution. The Dense layer includes four residual blocks with 6, 12, 12, and 12 layers respectively. Each residual block consists of 6 or 12 substructures, which are connected by dense connections. Each substructure includes a first convolutional layer with a size of 1×1 and a second convolutional layer with a size of 3×3. Define the detection target for each residual block, including: The residual block with 6 layers and the residual block with 12 layers are used to detect feature maps of small target sizes; Another layer of 12 residual blocks is used to detect the feature map of the target size; The residual block with 12 remaining layers is used to detect feature maps of large target sizes; The number of conversion layers is three, and the input of each conversion layer is connected to the output of the residual block with 12 layers. Each conversion layer includes a 1×1 convolution, a 3×3 convolution, a 1×1 convolution, a 3×3 convolution and a 1×1 convolution connected in series. The window detection model is tested using the test set until the accuracy of the output result of the window detection model reaches a preset value; The photo of the meter box to be inspected is obtained and input into the window detection model with a preset accuracy. The window image with a label indicating whether it is damaged is identified and cropped. The window image with the "whether it is damaged" label is input into a preset window damage recognition model to obtain the damage result of the meter box window.
2. The method for detecting damage to the viewing window of an electricity meter box according to claim 1, characterized in that, The steps for testing the window detection model using the test set include: The test set is input into the window detection model to obtain the output result; The accuracy of the output results is statistically analyzed, and the window detection model is iteratively trained until the accuracy of the output results of the window detection model reaches a preset first threshold.
3. The method for detecting damage to the viewing window of an electricity meter box according to claim 1, characterized in that, The training steps of the window damage recognition model include: Crop window portions of images from the labeled image dataset to construct a window dataset; The window dataset is input into a deep learning model for object detection, and the number of damaged windows identified is counted. If the number of damaged windows is greater than 0, the meter box window is determined to have a damage defect; Repeat the above steps until the accuracy of the window damage recognition model reaches the preset second threshold.
4. The method for detecting damage to the viewing window of an electricity meter box according to claim 3, characterized in that, The deep learning model used is either the VGG19 model or the ResNet-18 model.
5. The method for detecting damage to the viewing window of an electric meter box according to any one of claims 1-4, characterized in that, When acquiring photos of various types of meter boxes with illumination characteristics, include, An auxiliary light source is used to illuminate the meter box.
6. The method for detecting damage to the viewing window of an electricity meter box according to claim 5, characterized in that, The meter boxes include single meter boxes, multiple meter boxes, damaged meter boxes, and normal meter boxes.
7. A device for detecting damage to the viewing window of an electricity meter box, characterized in that, include, The image acquisition module is used to acquire photos of various meter boxes with lighting characteristics and build an image dataset; The image annotation module is used to annotate the window position, window size, and damage information of each meter box photo in the image dataset; An image segmentation module is used to divide the labeled image dataset into a training set and a test set; A window detection training module is used to train a window detection model based on the training set. The window detection model includes a convolutional layer for extracting feature maps from the input image; a max-pooling layer connected to the convolutional layer for reducing the size of the feature maps; a Dense layer connected to the max-pooling layer for dimensionality reduction of the feature maps; a transformation layer connected to the Dense layer for feature fusion and at least three resolution transformations; and a fully connected layer connected to the transformation layer for outputting a window at the target resolution. The Dense layer includes four residual blocks with 6, 12, 12, and 12 layers respectively. Each residual block consists of 6 or 12 substructures connected by dense inter-layer connections. The connection method is combined, and the substructure includes a first convolutional layer of size 1×1 and a second convolutional layer of size 3×3; the detection target of each residual block is set, including a residual block of layer 6 and a residual block of layer 12 for detecting feature maps of small target size; another residual block of layer 12 for detecting feature maps of medium target size; and the remaining residual blocks of layer 12 for detecting feature maps of large target size; the number of transformation layers is three, and the input of each transformation layer is connected to the output of the residual block of layer 12, and each transformation layer includes a 1×1 convolution, a 3×3 convolution, a 1×1 convolution, a 3×3 convolution and a 1×1 convolution in sequence; The window detection testing module is used to test the window detection model using the test set until the accuracy of the output result of the window detection model reaches a preset value. The detection module is used to acquire a photo of the meter box to be inspected and input it into the window detection model with a preset accuracy, identify the window image with a label indicating whether it is damaged, and crop it. The damage identification module is used to input the window image with a damage label into a preset window damage identification model to obtain the damage result of the meter box window.
Citation Information
Patent Citations
Method and device for identifying whether electrical meter is damaged or not
CN114782795A