A method and system for identifying image defects of substation equipment
Through the hierarchical recognition model and sliding window cutting technology, the detection accuracy of hardware defect recognition in substation equipment is improved, the problem of insufficient sample size and low detection accuracy is solved, and a more efficient recognition effect is achieved.
Patent Information
- Application Number
- CN202310581658.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-05-22
AI Technical Summary
In the existing technology, the defect identification of connecting fittings and small fittings in substation equipment has problems such as insufficient training samples and low detection accuracy.
A hierarchical recognition model is used for detection. The first recognition model performs preliminary detection on the original inspection pictures. After generating candidate location areas, an enhanced training subset is generated through sliding window cropping, and then the second recognition model performs detection, combined with the PPYOLOE algorithm. and ResNeXt101 module to improve detection accuracy.
It significantly improves the detection accuracy of substation equipment image defect recognition, solves the problem of insufficient sample size, reduces the loss of extracting effective image information, and improves the computing speed.
Smart Images

Figure CN116596895B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transformer substation hardware defect detection, and in particular to a transformer substation image defect recognition method and system. Background Art
[0002] In power transmission lines, substation equipment often needs to be inspected. According to statistics from inquiries, the proportion of small-sized hardware defects is as high as over 60%. The defect identification of connecting hardware and small hardware in substation equipment is currently mainly achieved through image recognition technology.
[0003] In the prior art, when using deep learning neural networks to identify and process connecting hardware and small hardware, there are situations where training samples are insufficient and the detection accuracy is low.
[0004] In view of this, this application is hereby filed. Summary of the invention
[0005] The purpose of the present invention is to provide a method and system for identifying image defects in substation equipment. The method and system adopt a hierarchical recognition model for detection, which can greatly improve the detection accuracy. At the same time, a network training model based on sliding window clipping is adopted in the second level, which solves the problem of insufficient sample size and further improves the detection accuracy of the model.
[0006] The embodiment of the present invention is achieved as follows:
[0007] In a first aspect, a method for identifying image defects of substation equipment includes the following steps: obtaining a drone inspection image set, dividing the drone inspection image set into a first training set and a second training set, the first training set being an original inspection image set, and the second training set being an image set obtained by random sampling of the first training set; using a first recognition model to detect each sample in the first training set to obtain a first recognition result, the first recognition result including the location information of at least one first target, the first target referring to a component to be inspected of the substation equipment; the first recognition model is a pre-trained model obtained based on the first training set; merging and generating a candidate location area of the sample based on the location information of at least one first target, cropping the candidate location area, and obtaining a cropped result image; performing sliding window cropping on each cropped result image to obtain a plurality of cropped sub-images, adding the plurality of cropped sub-images to the second training set to obtain an enhanced training subset; using a second recognition model to detect a plurality of cropped sub-images corresponding to the sample represented by the first recognition result to obtain a second recognition result, wherein the second recognition model is a pre-trained model obtained based on the enhanced training subset; merging the first recognition result and the second recognition result for output.
[0008] In an optional implementation, after using the second recognition model to detect multiple cropped sub-images corresponding to the samples in the first training set, the following steps are also included: determining the original inspection image represented by the sample and all corresponding cropped sub-images, and recording the border coordinate position of each cropped sub-image in the original inspection image; obtaining the detection frame coordinate position of the cropped sub-image; wherein the detection frame coordinate position refers to the coordinate position of the detection frame in the second recognition result; and obtaining the detection result of the cropped sub-image on the original inspection image based on the border coordinate position and the detection frame coordinate position as the adjusted second recognition result.
[0009] In an optional implementation, the detection result of the cropped sub-image on the original inspection image is obtained by adding the coordinates of the upper left corner of the frame coordinate position and the detection frame coordinate position.
[0010] In an optional embodiment, after the first recognition result and the second recognition result are merged, a post-processing step is also included, wherein the post-processing is one of non-maximum suppression, large-scale non-maximum suppression or non-maximum fusion.
[0011] In an optional implementation manner, the second training set is a set of pictures obtained by randomly sampling the first training set according to a first ratio, and the first ratio is 0.125, 0.25 or 0.5.
[0012] In an optional implementation manner, performing sliding window cropping on each cropping result image includes the following steps: determining the size of the sliding window, and cropping each cropping result image from left to right and from top to bottom using the sliding window.
[0013] In an optional implementation, the sliding step size of the sliding window is 0.125, 0.25 or 0.5 of the sliding window size.
[0014] In an optional implementation, the PPYOLOE algorithm is used in the second recognition model, wherein in the head network of the algorithm, the ESE block is used to replace the layer attention.
[0015] In an optional implementation, in the first recognition model, the feature extraction network uses the ResNeXt101 module, and the enhanced training subset is simultaneously input into the ResNeXt101 module and the CSPRepResNet module in the PPYOLOE algorithm to obtain the first feature Feature res And the second feature Feature csp Based on the first recognition result, mark the first feature Feature res And the second feature Feature csp The coordinate information of the first marker Feature is obtained res-objAnd the second mark Feature csp-obj ; The first mark Feature res-obj And the second mark Feature csp-obj Feature fusion is performed and the fusion results are input into the CSPPAN module for training the PPYoloE network.
[0016] In a second aspect, a substation equipment image defect recognition system is provided, characterized in that it comprises:
[0017] A first acquisition module is used to acquire a UAV inspection image set, and divide the UAV inspection image set into a first training set and a second training set, wherein the first training set is an original inspection image set, and the second training set is an image set obtained by random sampling of the first training set;
[0018] A first detection module, which is used to detect each sample in the first training set using a first recognition model to obtain a first recognition result, wherein the first recognition result includes location information of at least one first target, and the first target refers to a component to be inspected of the substation equipment; the first recognition model is a pre-trained model obtained based on the first training set;
[0019] A first cropping module, which is used to generate a candidate position area of the sample based on the position information of at least one first target, and to crop the candidate position area to obtain a cropping result image;
[0020] A second cropping module is used to perform sliding window cropping on each cropping result image to obtain multiple cropped sub-images, and add the multiple cropped sub-images to the second training set to obtain an enhanced training subset;
[0021] A second detection module, which is used to detect multiple cropped sub-images corresponding to the samples represented by the first recognition result using a second recognition model to obtain a second recognition result, wherein the second recognition model is a pre-trained model obtained based on the enhanced training subset;
[0022] The first output module is used to combine the first recognition result and the second recognition result and then output them.
[0023] The beneficial effects of the embodiments of the present invention are:
[0024] The substation equipment image defect recognition method and system provided by the embodiment of the present invention utilizes a first recognition model and a second recognition model to respectively recognize connecting fittings and small fittings in the inspection image, extracts candidate positions containing connecting fittings and small fittings in the first recognition model, and further recognizes the extracted high-precision position frame using the second recognition model to predict the defect category and coordinate position of the small fittings, which can greatly improve the accuracy of the entire recognition result and reduce the loss of effective information extracted from the image; at the same time, by combining the sliding window cropping method in the stage of the second recognition model, the problem of insufficient samples during neural network training can be solved, and when the obtained cropped sub-image is detected, the detection accuracy can be further improved.
[0025] In general, the substation equipment image defect recognition method and system provided in the embodiments of the present invention adopt a double-layer recognition model for detection compared to a single-layer model, which can greatly improve the detection accuracy. At the same time, the network training mode based on sliding window clipping and the improved network algorithm are adopted in the second layer, which can also solve the problem of insufficient sample size and improve the calculation speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 A flowchart of the main steps of the defect identification method provided by an embodiment of the present invention;
[0028] Figure 2 A schematic diagram of the principle of a defect identification method provided by an embodiment of the present invention;
[0029] Figure 3 An exemplary module diagram of a defect identification system provided by an embodiment of the present invention;
[0030] Figure 4 This is a diagram of the defect identification results of small metal fittings provided in an embodiment of the present invention.
[0031] Icons: 700 - defect recognition system; 710 - first acquisition module; 720 - first detection module; 730 - first cutting module; 740 - second cutting module; 750 - second detection module; 760 - first output module. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0033] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] It should be understood that the "system", "device" and / or "module" used in the present invention is a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0035] As shown in the present invention and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular, but also include the plural. In general, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list, and the method or device may also include other steps or elements.
[0036] Flowcharts are used in the present invention to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, the various steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.
[0037] Example
[0038] See also Figure 1 and Figure 2 The present embodiment provides a method for identifying defects in substation equipment images, comprising the following steps:
[0039] S100: Obtain a drone inspection image set, and divide the drone inspection image set into a first training set and a second training set, wherein the first training set is an original inspection image set, and the second training set is an image set obtained by randomly sampling the first training set; this step means taking the inspection image set taken during drone inspection as the first training set, and then randomly sampling a part of the first training set as the second training set, and the first training set is used to train neural networks at different levels.
[0040] Among them, the second training set is a set of pictures obtained by randomly sampling the first training set according to the first ratio, and the first ratio is 0.125, 0.25 or 0.5, which means that the training set of the sampling ratio can account for 0.125, 0.25 or 0.5 of the original inspection picture set, etc. The number of the second training set is further determined according to the demand for the number of samples. If the number of original samples is small, the ratio can be expanded to 0.5. If the number of original samples is relatively sufficient, the ratio can be selected as 0.25. Of course, in other implementations, other ratios can also be selected, such as 0.3, 0.16, etc., the purpose is to select the number of samples that need to be increased according to the actual situation.
[0041] S200: Use the first recognition model to detect each sample in the first training set to obtain a first recognition result, that is, the first recognition model is used as the first layer in the two-layer model to perform preliminary detection on the original inspection picture set, in order to detect the connection hardware area that can be attached with small hardware, and the connection hardware area contains at least one place, that is, the first recognition result obtained by the detection contains the location information of at least one first target, and the first target refers to the component to be inspected (connection hardware) of the substation equipment.
[0042] The first recognition model is a pre-trained model obtained based on the first training set; the algorithm used in the training process is mainly a two-stage algorithm (the characteristic of this type of algorithm is that a region proposal box is first generated, and then the generated proposal box is classified), such as FastR-CNN, FasterR-CNN, R-FCN, CascadeR-CNN, etc. In this embodiment, for example, the FasterR-CNN algorithm is used.
[0043] In the FasterR-CNN algorithm, the Region Proposal Network (RPN) was first proposed, abandoning the traditional sliding window and selective search method to generate candidate boxes, and directly using RPN to generate candidate boxes, greatly improving the accuracy of the target detection algorithm. The FasterR-CNN algorithm is a two-stage target detector, with the feature extraction network backbone ResNeXt101 and the network structure reorganization neck Feature Pyramid Networks (FPN).
[0044] The loss of Faster R-CNN is mainly divided into the loss of RPN and Fast R-CNN, and both losses include classification loss (CLS Loss) and regression loss (Bbox Regression Loss), namely
[0045] (1-1)
[0046] In formula (1-1): i represents the index of the anchor in each batch; p i is the probability that there is no target in the anchor. When there is a target, p i =1 otherwise p i =0; ti represents the four parameters of the predicted bounding box; t i * is the coordinate parameter of the real bounding box corresponding to the anchor containing the target; p i * L reg Indicates that the anchor containing the target has regression loss; {pi} represents the output of the classification layer; {ti} represents the output of the regression layer, using Ncls and N reg And weight λ is normalized. Formula (1-1) contains two parts: classification loss and regression loss, where the classification loss function is:
[0047] (1-2)
[0048] The loss function for regression is:
[0049] (1-3)
[0050] The parameter R in formula (1-3) is the smoothing function, that is
[0051] (1-4)
[0052] For the bounding box regression operation, the method used is:
[0053] (1-5)
[0054] In formula (1-5), x, y represent the center coordinates of the bounding box; w is the width of the bounding box; h is the height of the bounding box; x, x a , x * They are the predicted bounding box, anchor box, and true bounding box respectively.
[0055] Through the above technical solution, the faster R-CNN algorithm is applied to extract the position of at least one effective component (connection hardware component) of the distribution network drone inspection image, and then step S300 is performed: based on the position information of at least one of the first targets, a candidate position area of the sample is generated, and the candidate position area is cropped to obtain a cropped result image; this step means that the position information of at least one first target is obtained for image splicing and merging to obtain the candidate position area of the sample, and the candidate position area is the candidate area in the original image waiting for further identification, and the second-level network can be used for further identification (that is, a two-level recognition mode), and the input for further identification is the cropped result image obtained after cropping the image with the candidate position area, wherein the purpose of cropping is to reduce the noise of the input parameters and ensure the accuracy of the second-stage recognition.
[0056] Before further identification, considering the problem of insufficient samples in the drone inspection images acquired by the drone, it is easy for the accuracy of the trained neural network model to be insufficient, that is, step S400 is performed: each of the cropped result images is subjected to sliding window cropping to obtain multiple cropped sub-images, and the multiple cropped sub-images are added to the second training set to obtain an enhanced training subset; this step represents sample amplification for the cropped result image obtained for each sample, and each cropped result image is further cropped in combination with the sliding window cropping method, each cropped result image can obtain multiple cropped sub-images, and all the cropped sub-images are added to the second training set, which can greatly increase the number of samples in the second training set.
[0057] The above-mentioned sliding window cropping is to use a rectangular window for sliding cropping, which can crop a picture into more sub-images of smaller sizes. In this embodiment, the sliding window cropping of each of the cropped result images includes the following steps: determining the size of the sliding window (window), the size of the sliding window can be 0.125, 0.25 or 0.5 of the short side of the cropped result image, the sliding step of the sliding window can be 0.125, 0.25 or 0.5 of the sliding window size, and each of the cropped result images is cropped from left to right and from top to bottom using the sliding window of the parameter, so as to obtain multiple cropped sub-images of the cropped result image, and the cropped sub-images are added to the second training set to construct an enhanced training subset (enhanced training subset).
[0058] It should be noted that the samples in the above-mentioned second training set include both original inspection pictures and result pictures extracted based on the first-level recognition. When the second training set is used for neural network training, the recognition accuracy can be higher because the input parameter noise is smaller, thereby ensuring the recognition accuracy of the second-level model and obtaining a more accurate final detection result.
[0059] S500: Using a second recognition model to detect the plurality of cropped sub-images corresponding to the samples represented by the first recognition result, to obtain a second recognition result, wherein the second recognition result mainly refers to the type and quantity of small metal defects. The second recognition model is a pre-trained model obtained based on the enhanced training subset; in this embodiment, the algorithm used in the training process of the second recognition model is, for example, the PPYOLOE algorithm.
[0060] Compared with the traditional PPYOLOE algorithm, due to its scalable backbone and neck, we designed CSPRepResNet as the backbone, and the neck part also adopted the newly designed CSPPAN structure. The backbone and neck are based on the CSPRepResStage we proposed. The new backbone and neck enhance the model's representation capabilities while improving the model's reasoning speed, and the model size can be flexibly configured through the width multiplier and depth multiplier.
[0061] ■TAL (Task Alignment Learning)
[0062] In order to further improve the accuracy of the model, the dynamic matching algorithm strategy TAL in TOOD was selected. TAL considers both classification and regression, so that the matching results can obtain the optimal classification and positioning accuracy at the same time.
[0063] ■Efficient Task-aligned head
[0064] In terms of detection head, we improve on the T-head of TOOD.
[0065] First, we used ESE block to replace the time-consuming layer attention in the original text, which improved the speed of the model while ensuring the accuracy. Secondly, since T-head uses a deformable convolution operator, it is not friendly to hardware deployment. We used shortcut to replace the cls-align module in the classification branch, and used the integral layer in the regression branch to replace the reg-align module containing deformable convolution. The above two improvements make the head more efficient, concise and easy to deploy. The above technical solutions can improve the computing speed of the entire second-level network.
[0066] S600: The first recognition result and the second recognition result are combined and then output. Since the input original atlas corresponding to the first recognition result and the second recognition result may be repeated or crossed (the second training set is part of the first training set), there may also be repeated or crossed in the first recognition result and the second recognition result. In this case, the intersection can be combined and then output.
[0067] Through the above technical scheme, taking into account the shortage of original samples of UAV inspection images, in the two-level recognition mode, part of the original inspection image is randomly extracted as the input of the second stage further training. On the whole, not only the high-precision mode of the two-level recognition is utilized, but also the input noise of the second-level mode is smaller, the recognition accuracy is further improved, and the problem of insufficient samples can be solved. Overall, this defect recognition method is particularly suitable for the scenario of defect detection of substation equipment (since UAVs are all high-altitude inspections, the images obtained are all high-definition pictures, and it is necessary to locate and identify the defects of small hardware from the high-definition pictures), that is, it is necessary to obtain smaller target recognition on the specified target. The collected samples are fully utilized and the recognition accuracy is higher.
[0068] As described above, due to the use of a sliding window cropping method, the sliding step length of each window is a certain proportion of the window size, and each cropped sub-image will overlap with an adjacent cropped sub-image. When the cropped sub-image is restored to the detection result on the original large image, it is necessary to offset the overlapping part to obtain a more accurate detection result. In some embodiments, the step S500: using the second recognition model to detect the multiple cropped sub-images corresponding to the samples in the first training set also includes the following steps:
[0069] S510: Determine the original inspection image represented by the sample and all corresponding cropped sub-images, and record the frame coordinate position of each cropped sub-image in the original inspection image;
[0070] S520: Obtaining a detection frame coordinate position of the cropped sub-image; wherein the detection frame coordinate position refers to a detection frame coordinate position in the second recognition result;
[0071] S530: Based on the border coordinate position and the detection frame coordinate position, the detection result of the cropped sub-image on the original inspection image is obtained. For example, in this embodiment, the border coordinate position is added to the upper left corner coordinates of the detection frame coordinate position to obtain the detection result of the cropped sub-image on the original inspection image, and the detection result is used as the adjusted second recognition result.
[0072] Through the above technical solution, the offset is corrected by adding the coordinate position of the border to the coordinate position of the detection frame, thereby obtaining a more accurate detection result. In addition, after merging the first recognition result and the second recognition result, a post-processing step is also included, wherein the post-processing is one of non-maximum suppression, large-scale non-maximum suppression or non-maximum fusion, thereby obtaining the final detection result.
[0073] In some embodiments, in order to enable the target information detected in the recognition stage of the first recognition model to provide more regional information around the small hardware defect target, it has a more effective auxiliary effect on the detection of the small hardware defect target. The first recognition result identified by the first recognition model is recorded. The feature extraction network of the first recognition model adopts the ResNeXt101 module, and the ResNeXt101 module is retained and prepared for feature extraction in the second recognition model of the second stage. Specifically, when training the second recognition model, the training data is simultaneously input into the feature extraction network ResNeXt101 of the first stage and the feature extraction network CSPRepResNet of PPYoloE, and a series of features are obtained, which are recorded as Feature res and Feature csp , the coordinate information of the target is obtained by detecting the current training image data in the first recognition model, and the corresponding position of the features extracted by ResNeXt101 and CSPRepResNet is obtained according to the coordinates and recorded as Feature res-obj and Feature csp-obj , the features obtained at this time are the target information of the first stage. res-obj With Feature csp-obj Perform feature fusion, for example, give weights of 0.6 and 0.4 respectively, and get a new feature map denoted as Feature res-csp-obj , the fused new feature map is input into the subsequent CSPPAN structure to train the PPYoloE network.
[0074] In summary, in order to further improve the detection network's ability to detect small hardware defects and solve the problem of insufficient samples during network training, this defect recognition method, based on image processing technology, proposes a network training fine-tuning and reasoning detection module based on sliding window cropping, which crops the original high-resolution inspection images taken by drones into small sub-images for fine-tuning and reasoning detection during network training. Figure 2 As shown in Figure 1, the network training fine-tuning and inference detection module based on sliding window clipping is mainly divided into two parts.
[0075] Specifically, the first part is the training fine-tuning module. During training, the objective function of the network is first optimized using the constructed original high-resolution large-image training set. When the number of training iterations reaches the preset number of iterations N1, the training is stopped to obtain a pre-trained detection model. A portion of the images are randomly sampled from the large-image training set to construct a fine-tuning training subset. Then, the image processing technology is used to perform a "sliding window" cropping from left to right and from top to bottom on each image in the training subset. Adding the cropped sub-image to the fine-tuning training subset can be used to construct an enhanced training subset. Using the enhanced training subset, the pre-training model obtained from the original large image can be further used to adjust the learning rate of the network to continue training the objective function of the optimization network. When the preset number of iterations N2 is reached, the fine-tuning training is stopped to obtain the final optimized detection model.
[0076] The second part is the inference detection module. During detection, the original large-scale inspection image and the sub-image cropped by sliding window are used for inference detection based on the trained optimal model. When performing cropped sub-image detection, the upper left corner and lower right corner coordinate positions of each cropped sub-image on the original large image are first recorded during cropping. For example, if there are n cropped sub-images after cropping, the coordinate frame positions (referring to the frame coordinate positions) of all cropped sub-images (i.e. n sub-images) are listed as For the detection result of each cropped sub-image, the coordinate position of the detection result box (referring to the coordinate position of the detection box) can be determined based on the cropped sub-image detection result box. And the coordinate border position of the clipped sub-image Adjust the detected result to the position relative to the original image box , box The calculation formula is as follows:
[0077]
[0078] That is, the detection box is added to the coordinate position box of the upper left corner of the cropped sub-image to obtain the detection result on the original large image. Finally, the large image detection result and the sub-image detection result are merged and post-processed, such as non-maximum suppression (NMS), large-scale non-maximum suppression (LSNMS) or non-maximum fusion (NMM), to filter or fuse the merged overlapping detection boxes to obtain the final detection result.
[0079] In summary, for the defect detection of connecting fittings and small fittings of substation equipment, the two-stage single model algorithm is better than the one-stage single model algorithm, and this method adopts a two-level model for recognition, and the recall rate and precision rate are significantly improved. The following is the sample set used, which contains original inspection images under different regions, voltages, and shooting conditions, with features such as clear and bright, blurred and dim, or distant shooting targets. Figure 4 This is the result of identifying defects in small metal fittings. It can be seen that the two-level recognition model proposed in this embodiment can effectively detect defective areas from the original inspection pictures for identifying defects in small metal fittings, and it still performs well for large scenes and small targets. During the model training process, the image brightness enhancement processing is added to improve the recognition effect of low-brightness images. However, due to the low shooting quality and blurred images of some images, the model and even the human eye cannot accurately determine whether the pins in the target exist, resulting in the model tending to identify such blurred targets as missing pins.
[0080] See also Figure 3 In this embodiment, a substation equipment image defect recognition system 700 is also provided, which is mainly used to divide the substation equipment image defect recognition system 700 into functional modules according to the embodiment of the above method. For example, each functional module can be divided, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the present invention is schematic, which is only a logical function division, and there may be other division methods in actual implementation. Among them, the substation equipment image defect recognition system 700 may include a first acquisition module 710, a first detection module 720, a first cropping module 730, a second cropping module 740, a second detection module 750 and a first output module 760. The functions of each unit module are explained below.
[0081] A first acquisition module 710, which is used to acquire a drone inspection image set, and divide the drone inspection image set into a first training set and a second training set, wherein the first training set is an original inspection image set, and the second training set is an image set obtained by randomly sampling the first training set;
[0082] A first detection module 720, which is used to detect each sample in the first training set using a first recognition model to obtain a first recognition result, wherein the first recognition result includes location information of at least one first target, and the first target refers to a component to be inspected of a substation; the first recognition model is a pre-trained model obtained based on the first training set;
[0083] A first cropping module 730, which is used to generate a candidate position area of the sample based on the position information of at least one of the first targets, and to crop the candidate position area to obtain a cropping result image;
[0084] A second cropping module 740, which is used to perform sliding window cropping on each of the cropping result images to obtain multiple cropped sub-images, and add the multiple cropped sub-images to the second training set to obtain an enhanced training subset;
[0085] The second detection module 750 is used to detect the multiple cropped sub-images corresponding to the sample represented by the first recognition result using a second recognition model to obtain a second recognition result, wherein the second recognition model is a pre-trained model obtained based on the enhanced training subset; in some embodiments, the second detection module 750 is also used to determine the original inspection image represented by the sample and all corresponding cropped sub-images, record the border coordinate position of each cropped sub-image in the original inspection image; obtain the detection frame coordinate position of the cropped sub-image; wherein the detection frame coordinate position refers to the coordinate position of the detection frame in the second recognition result; based on the border coordinate position and the detection frame coordinate position, obtain the detection result of the cropped sub-image on the original inspection image as the adjusted second recognition result.
[0086] The first output module 760 is used to combine the first recognition result and the second recognition result and then output them.
[0087] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk (sol-identified state disk, SSD)), etc.
[0088] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0089] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0090] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0091] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for identifying defects in substation equipment images, characterized in that: The steps include: Acquire a drone inspection image set, and divide the drone inspection image set into a first training set and a second training set, wherein the first training set is an original inspection image set, and the second training set is an image set obtained by random sampling of the first training set; Using a first recognition model to detect each sample in the first training set, to obtain a first recognition result, wherein the first recognition result includes location information of at least one first target, wherein the first target refers to a component to be inspected of a substation equipment; The first recognition model is a pre-trained model obtained based on the first training set; Based on the position information of at least one of the first targets, a candidate position area of the sample is generated, and the candidate position area is cropped to obtain a cropping result image; Perform sliding window cropping on each of the cropped result images to obtain a plurality of cropped sub-images, and add the plurality of cropped sub-images to the second training set to obtain an enhanced training subset; Using a second recognition model to detect the plurality of cropped sub-images corresponding to the samples represented by the first recognition result, to obtain a second recognition result, wherein the second recognition model is a pre-trained model obtained based on the enhanced training subset; Combining the first recognition result and the second recognition result and outputting the result; The second recognition model uses the PPYOLOE algorithm, in which the ESE block is used to replace the layer attention in the head network of the algorithm; In the first recognition model, the feature extraction network uses the ResNeXt101 module, and the enhanced training subset is simultaneously input into the ResNeXt101 module and the CSPRepResNet module in the PPYOLOE algorithm to obtain the first feature Feature res And the second feature Feature csp ; Based on the first recognition result, the first feature is marked res And the second feature Feature csp The coordinate information of the first marker Feature is obtained res-obj And the second mark Feature csp-obj ; The first marked feature res-obj And the second mark Feature csp-obj Feature fusion is performed and the fusion results are input into the CSPPAN module for training the PPYoloE network.
2. The method for identifying defects in substation equipment images according to claim 1, characterized in that: After detecting the plurality of cropped sub-images corresponding to the samples in the first training set using the second recognition model, the following steps are also included: Determine the original inspection image represented by the sample and all corresponding cropped sub-images, and record the coordinate position of the frame of each cropped sub-image in the original inspection image; Obtaining a detection frame coordinate position of the cropped sub-image; wherein the detection frame coordinate position refers to the coordinate position of the detection frame in the second recognition result; A detection result of the cropped sub-image on the original inspection image is obtained based on the frame coordinate position and the detection frame coordinate position as the adjusted second recognition result.
3. The method for identifying defects in substation equipment images according to claim 2, characterized in that: The detection result of the cropped sub-image on the original inspection image is obtained by adding the upper left corner coordinates of the frame coordinate position and the detection frame coordinate position.
4. The method for identifying defects in substation equipment images according to claim 1, characterized in that: After merging the first recognition result and the second recognition result, a post-processing step is also included, wherein the post-processing is one of non-maximum suppression, large-scale non-maximum suppression or non-maximum fusion.
5. The method for identifying image defects of substation equipment according to claim 1, characterized in that: The second training set is a set of pictures obtained by randomly sampling the first training set according to a first ratio, and the first ratio is 0.125, 0.25 or 0.
5.
6. The method for identifying image defects of substation equipment according to claim 1 or 5, characterized in that: The step of performing sliding window cropping on each of the cropping result images comprises the following steps: determining the size of the sliding window, and using the sliding window to crop each of the cropping result images in a sequence from left to right and from top to bottom.
7. The method for identifying defects in substation equipment images according to claim 6, characterized in that: The sliding step size of the sliding window is 0.125, 0.25 or 0.5 of the sliding window size.
8. A substation equipment image defect recognition system, characterized in that: include: A first acquisition module, which is used to acquire a UAV inspection image set, and divide the UAV inspection image set into a first training set and a second training set, wherein the first training set is an original inspection image set, and the second training set is an image set obtained by random sampling of the first training set; A first detection module, which is used to detect each sample in the first training set using a first recognition model to obtain a first recognition result, wherein the first recognition result includes location information of at least one first target, and the first target refers to a component to be inspected of a substation device; The first recognition model is a pre-trained model obtained based on the first training set; A first cropping module, which is used to generate a candidate position area of the sample based on the position information of at least one of the first targets, and to crop the candidate position area to obtain a cropping result image; A second cropping module, which is used to perform sliding window cropping on each of the cropping result images to obtain multiple cropped sub-images, and add the multiple cropped sub-images to the second training set to obtain an enhanced training subset; A second detection module, which is used to detect the plurality of cropped sub-images corresponding to the samples represented by the first recognition result using a second recognition model to obtain a second recognition result, wherein the second recognition model is a pre-trained model obtained based on the enhanced training subset; A first output module, which is used to combine the first recognition result and the second recognition result and then output them; The second recognition model uses the PPYOLOE algorithm, in which the ESE block is used to replace the layer attention in the head network of the algorithm; In the first recognition model, the feature extraction network uses the ResNeXt101 module, and the enhanced training subset is simultaneously input into the ResNeXt101 module and the CSPRepResNet module in the PPYOLOE algorithm to obtain the first feature Feature res And the second feature Feature csp ; Based on the first recognition result, the first feature is marked res And the second feature Feature csp The coordinate information of the first marker Feature is obtained res-obj And the second mark Feature csp-obj ; The first marked feature res-obj And the second mark Feature csp-obj Feature fusion is performed and the fusion results are input into the CSPPAN module for training the PPYoloE network.
