A power inspection image recognition model training method and a storage medium

By constructing and expanding the negative sample set, and optimizing the model using the ResNet-50 network structure and cross-entropy loss function, the problem of imbalance between positive and negative samples in the power inspection image recognition model was solved, and the accuracy of defect detection was improved.

CN116682030BActive Publication Date: 2025-12-19NORTH CHINA ELECTRIC POWER UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310790256.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2025-12-19
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

The image recognition model for power line inspection suffers from an imbalance between positive and negative samples, resulting in insufficient accuracy in defect detection.

Method used

Positive and negative image sample sets are constructed, and the positive and negative samples are balanced by generating simulated images that enhance texture defects. The feature extraction sub-model of the ResNet-50 network structure is used for training, and the model is optimized by using the cross-entropy loss function. The defect recognition results are generated by combining the feature extraction and post-processing sub-models.

Benefits of technology

By expanding the negative sample set with simulated images, a balance between positive and negative samples was achieved, which improved the model's accuracy in identifying defects in power equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116682030B_ABST
    Figure CN116682030B_ABST
Patent Text Reader

Abstract

The application provides a training method of a power inspection image recognition model and a storage medium. The method comprises the following steps: constructing a positive image sample set and a negative image sample set for training. The positive image sample set comprises a plurality of standard images of power equipment collected by an inspection unmanned aerial vehicle. The negative image sample set comprises a plurality of defect images of power equipment formed with structural defects or texture defects collected by the inspection unmanned aerial vehicle and a plurality of simulation images of enhanced texture defects generated based on the positive image sample set. A standard image recognition model is determined, and the image samples in the constructed positive image sample set and negative image sample set are respectively input into the standard image recognition model for training. The standard image recognition model outputs a defect recognition result corresponding to the image sample, so as to obtain the power inspection image recognition model and improve the accuracy of the power inspection image recognition model in identifying the defects of the power equipment in the power industry.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image recognition, in particular to a power inspection image recognition model training method and a storage medium. BACKGROUND

[0002] The power industry introduces unmanned aerial vehicle (UAV) power inspection technology, and combines image processing and deep learning algorithms for defect detection. UAV inspection can quickly cover a large area of power equipment and obtain image data through a camera. However, power inspection image defect detection still faces challenges, especially in terms of data labeling and training samples. There is an imbalance between positive and negative samples. Compared with normal samples, abnormal samples are usually rare and less in number, which leads the model to be more inclined to identify normal samples, affecting the recognition accuracy of the model. SUMMARY

[0003] Therefore, the purpose of the present application is to provide a power inspection image recognition model training method and a storage medium to improve the accuracy of the power inspection image recognition model in identifying defects of power equipment in the power industry.

[0004] In a first aspect, the present application provides a power inspection image recognition model training method, which comprises: constructing a positive image sample set and a negative image sample set for training, the positive image sample set comprising a plurality of standard images of power equipment collected by an inspection UAV, and the negative image sample set comprising a plurality of defect images of power equipment formed with structural defects or texture defects collected by the inspection UAV, and a plurality of simulated images with enhanced texture defects generated based on the positive image sample set; determining a standard image recognition model, and inputting the image samples in the constructed positive image sample set and negative image sample set into the standard image recognition model for training, so that the standard image recognition model outputs a defect recognition result corresponding to the image sample, to obtain a power inspection image recognition model.

[0005] Preferably, for any standard image in the positive image sample set, the simulated image corresponding to the standard image is generated by the following method: a noise image is randomly generated, and the noise image is binarized; the binarized standard image is filtered based on the binarized noise image to obtain a foreground noise binarized image; the foreground noise binarized image is filtered based on a texture defect feature sample image to obtain a texture defect noise binarized image; and the texture defect noise binarized image and the standard image are superimposed to serve as the simulated image corresponding to the standard image.

[0006] Preferably, the step of filtering the binarized standard image based on the binarized noise image to obtain the foreground noise binarized image comprises: obtaining a first pixel matrix of the binarized noise image and a second pixel matrix of the binarized standard image; and multiplying the first pixel matrix and the second pixel matrix to obtain a third pixel matrix of the foreground noise binarized image.

[0007] Preferably, before the step of inputting the image sample into the standard image recognition model, the method further comprises: for each pixel point of the image sample, subtracting a first pixel value on each channel of the pixel point from a corresponding pixel mean value to obtain a second pixel value on each channel of the pixel point; and for each pixel point of the image sample, dividing the second pixel value on each channel of the pixel point by a corresponding pixel standard deviation to obtain a third pixel value on each channel of the pixel point, to update the pixel value of each pixel point of the image sample; wherein the pixel mean value is an average value between all first pixel values on the corresponding channel of the image sample, and the pixel standard deviation is a standard deviation value between all first pixel values on the corresponding channel of the image sample.

[0008] Preferably, the power inspection image recognition model comprises a feature extraction sub-model and a post-processing sub-model, an input of the feature extraction sub-model is an inspection image to be recognized, and an output of the feature extraction sub-model is a first image feature vector corresponding to the inspection image to be recognized, and the feature extraction sub-model at least comprises a first convolutional layer, a normalization layer, an activation layer, a maximum pooling layer, a first residual unit, a second residual unit, a third residual unit and a mean pooling layer connected in sequence.

[0009] Preferably, the positive sample memory bank comprises a plurality of second image feature vectors corresponding to the standard image and stored in association with the classes, a compressed second image feature vector in each class is configured as a cluster center of the class, the compressed second image feature vector is obtained according to decomposition of the corresponding second image feature vector, and after the post-processing sub-model obtains the first image feature vector corresponding to the inspection image to be recognized, the corresponding defect recognition result is generated and output by the following manner: determining a target class based on a matching relationship between the first image feature vector and the compressed second image feature vector corresponding to each class in the positive sample memory bank; determining a target second image feature vector based on a distance value between the first image feature vector and all second image feature vectors in the target class, and a distance value between the first image feature vector and the target second image feature vector; and determining the defect recognition result according to a size relationship between the distance value and a preset value.

[0010] Preferably, the positive sample memory library is constructed by: inputting a standard image into a feature extraction sub-model to output a second image feature vector corresponding to the standard image; compressing each second image feature vector into a plurality of compressed second image features; and clustering all the compressed second image features to determine a plurality of cluster centers and corresponding second image features.

[0011] Preferably, the method further comprises: obtaining a to-be-identified image of a power equipment in a target area collected by the inspection unmanned aerial vehicle; inputting the to-be-identified image into the power inspection image recognition model to output a defect identification result corresponding to the to-be-identified image; and determining whether the power equipment collected by the to-be-identified image has a defect according to the defect identification result.

[0012] In a second aspect, the present application also provides an electronic device, comprising: a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps of the training method of the power inspection image recognition model.

[0013] In a third aspect, the present application also provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to perform the steps of the training method of the power inspection image recognition model.

[0014] The training method of the power inspection image recognition model and the storage medium provided by the present application comprise: constructing a positive image sample set and a negative image sample set for training, the positive image sample set comprising a plurality of standard images of power equipment collected by an inspection unmanned aerial vehicle, and the negative image sample set comprising a plurality of defect images of power equipment collected by the inspection unmanned aerial vehicle and a plurality of simulation images of enhanced texture defects generated based on the positive image sample set; determining a standard image recognition model, and inputting the image samples in the constructed positive image sample set and negative image sample set into the standard image recognition model for training, so that the standard image recognition model outputs a defect identification result corresponding to the image sample, to obtain a power inspection image recognition model. By simulating the texture defects in the inspection image, the negative image sample set is expanded, the balance between the positive and negative samples is ensured, and the power inspection image recognition model trained in this way can better learn the texture defects and the structural defects, and the recognition effect is more accurate.

[0015] In order to make the above objectives, characteristics and advantages of the present application more apparent and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are referred to. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0017] Figure 1 The flow chart of the training method of the power inspection image recognition model provided by the embodiments of the present application;

[0018] Figure 2 The flow chart of the step of generating simulated images provided by the embodiments of the present application;

[0019] Figure 3 The flow chart of the step of generating defect recognition results provided by the embodiments of the present application;

[0020] Figure 4 The flow chart of a specific embodiment provided by the embodiments of the present application;

[0021] Figure 5 The structural schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, every other embodiment obtained by those skilled in the art without creative labor belongs to the scope of the present application.

[0023] Firstly, the application scenarios applicable to the present application are introduced. The present application can be applied to the construction of a power inspection image recognition model in the power industry.

[0024] The power industry introduces a UAV power inspection technology, and combines image processing and deep learning algorithms for defect detection. The UAV inspection can quickly cover a large area of power equipment, and obtain image data by carrying a camera. However, the power inspection image defect detection still faces challenges, especially in data labeling and training samples. There is an imbalance between positive and negative samples. Compared with normal samples, abnormal samples are usually rare and less in number, which makes the model more inclined to identify as a normal sample, affecting the identification accuracy of the model.

[0025] Based on this, the embodiment of the application provides a training method of a power inspection image recognition model and a storage medium to improve the identification accuracy of the model.

[0026] Please refer to Figure 1 , Figure 1 The flowchart of the training method of the power inspection image recognition model provided by the embodiment of the application is shown in the following figure. Figure 1 The training method of the power inspection image recognition model provided by the embodiment of the application includes the following steps:

[0027] S101, construct a positive image sample set and a negative image sample set for training, the positive image sample set includes a plurality of standard images of power equipment collected by an inspection UAV, and the negative image sample set includes a plurality of defect images of power equipment formed with structural defects or texture defects collected by the inspection UAV, and a plurality of simulated images with enhanced texture defects generated based on the positive image sample set.

[0028] The defect types in power inspection mainly include structural defects and texture defects. The structural defects are mainly the loosening and falling of pins, that is, the damage of the structure or components of the power equipment such as power poles and wires, while the texture defects are the corrosion, rust and arc burn on the surface of the power equipment.

[0029] The positive image sample set and the negative image sample set here can be constructed by using historical images collected by the UAV.

[0030] Due to the danger and difficulty of manual inspection, the number of negative samples that can be collected is rare, so in step S101, the existing collected positive samples are subjected to texture defect enhancement processing to generate negative samples with texture defects, so as to ensure the balance of positive and negative samples. The ratio of the number of positive samples to the number of all negative samples is not greater than 10:1.

[0031] Please refer to Figure 2 , Figure 2 The flowchart of the step of generating a simulated image provided by the embodiment of the application is shown in the following figure. Specifically, for any standard image in the positive image sample set, the simulated image corresponding to the standard image is generated by the following method:

[0032] S201, a noise image is randomly generated, and the noise image is binarized.

[0033] Here, the randomly generated can be Berlin noise, and it is converted into a binary image. When binarization is performed in this application, the gray value of the pixel can be compared with the preset threshold value, and then the corresponding 0, 1 binary value is obtained. Illustratively, if the gray value is greater than the threshold value, it is 1, and if the gray value is less than the threshold value, it is 0.

[0034] S202, based on the binarized noise image, the binarized standard image is filtered to obtain a foreground noise binary image.

[0035] The standard image here can be any image in the positive image sample set. For the image to be identified, defect detection is required on the basis of removing the background, so the standard image also needs to be binarized to obtain the corresponding binary image, and the foreground and background are distinguished, where white is the foreground part and black is the background part.

[0036] Based on the binarized noise image, the binarized standard image is filtered to obtain a foreground noise binary image, which specifically includes:

[0037] Obtain the first pixel matrix of the binarized noise image and the second pixel matrix of the binarized standard image; multiply the first pixel matrix and the second pixel matrix to obtain the third pixel matrix of the foreground noise binary image.

[0038] Here, only the multiplication of the two binary images can filter out the Berlin noise on the target foreground to obtain the foreground noise binary image. The white pixel represents a defect or a noise point, and the black pixel represents a background or a normal area.

[0039] S203, based on the texture defect feature sample image, the foreground noise binary image is filtered to obtain a texture defect noise binary image.

[0040] Similar to step S202, a texture defect feature data can be randomly determined here, which can be selected from a network public texture data set (such as a DTD texture recognition data set) or a self-constructed image set with rich texture features. The texture defect feature here is used to represent rust, cracks and other texture defects on the surface of the power equipment.

[0041] Multiplying the texture defect feature sample image and the foreground noise binary image can obtain a texture defect noise binary image, and the texture defect noise binary image here forms a texture defect feature with Berlin noise.

[0042] S204, superimpose the foreground noise binary image and the standard image as a simulation image corresponding to the standard image.

[0043] The generated image with texture defects is superimposed on the standard image to generate a simulation image with texture defects, thereby simulating the existence of texture changes and defects in the real world. The generated texture defect sample and the real structure defect sample together constitute all the negative samples required for training.

[0044] S102, determine the standard image recognition model, and input the image samples in the constructed positive image sample set and negative image sample set into the standard image recognition model for training, so that the standard image recognition model outputs a defect recognition result corresponding to the image sample, to obtain a power inspection image recognition model.

[0045] The power inspection image recognition model includes a feature extraction sub-model and a post-processing sub-model. The input of the feature extraction sub-model is an inspection image to be recognized, and the output is a first image feature vector corresponding to the inspection image to be recognized. The feature extraction sub-model at least includes a first convolutional layer, a normalization layer, an activation layer, a maximum pooling layer, a first residual unit, a second residual unit, a third residual unit and a mean pooling layer connected in turn.

[0046] The training here is mainly to learn and train the feature extraction sub-model, so that the feature extraction sub-model outputs an image feature vector. The standard image recognition model here uses the network structure of ResNet-50. The fifty convolutional layers in the ResNet-50 structure generally constitute five residual units, and the feature extraction sub-model here intercepts the part from the input to the third residual unit of the trained ResNet-50, and takes the output feature of the third residual unit as the image feature to be used. This is to extract the middle layer feature of the image. Compared with low-level features and high-level features, middle-level features can capture important semantic information in data, and have good robustness to resist noise, occlusion and deformation and other interference. By using middle-level features for classification, detection or recognition, the influence of interference in the input data can be reduced, and the anti-interference ability of the model can be improved, so the middle-level features are selected here for the subsequent training steps.

[0047] Before inputting the image sample into the model for training, the image sample needs to be preprocessed. Specifically, for any image sample, before the step of inputting it into the standard image recognition model, it further includes:

[0048] For each pixel point of the image sample, the first pixel value on each channel of the pixel point is subtracted from the corresponding pixel mean value to obtain the second pixel value on each channel of the pixel point. For each pixel point of the image sample, the second pixel value on each channel of the pixel point is divided by the corresponding pixel standard deviation to obtain the third pixel value on each channel of the pixel point, so as to update the pixel value of each pixel point of the image sample. The pixel mean value is the average value between all first pixel values on the corresponding channel of the image sample, and the pixel standard deviation is the standard deviation value between all first pixel values on the corresponding channel of the image sample.

[0049] Here, the image sample needs to be subjected to mean normalization and standard deviation normalization operations. For each channel, the pixel value is subtracted from the corresponding mean value mean to eliminate the overall brightness offset of the image, and the pixel value is divided by the corresponding standard deviation std to make the pixel value of the image have a uniform scale and range, so as to better adapt to the input requirements of the model. The normalization operation of the picture can keep the brightness and contrast of the data consistent, reduce the sensitivity of the model to the brightness and contrast changes of the input image, thereby improving the robustness of the model to images under different lighting conditions, making it perform more stably and reliably in different environments, and helping to improve the generalization ability and training effect of the model. The pixel mean value mean = [x1, x2, x3], wherein x1, x2, and x3 represent the mean values of the red channel, the green channel, and the blue channel of the image sample, respectively. Similarly, the standard deviation std = [y1, y2, y3] is set, wherein y1, y2, and y3 represent the standard deviations of the red channel, the green channel, and the blue channel of the image sample, respectively.

[0050] Further, in the training process, a standard image recognition model is trained using a cross-entropy loss function. The formula of the cross-entropy loss function is:

[0051]

[0052] Wherein, N represents the total number of training samples, θ i represents the true label of the i-th sample, p i represents the prediction value of the network for the i-th image.

[0053] The prediction value here is the prediction result obtained after the classifier in the standard image recognition model classifies the feature vector extracted by the five residual units.

[0054] The cross-entropy loss function measures the difference between the true probability θ i and the predicted probability p i of the model, and the optimization goal is to minimize the Loss value, that is, to make the predicted probability distribution of the model as close as possible to the true probability distribution. When θ i= 1 means that the sample belongs to the positive class, and the loss function is -log(p i ), where p i is the probability that the model predicts the positive class, and the closer to 1 the more accurate. Similarly, when θ i = 0 means that the sample belongs to the negative class, and the loss function is -log(1-p i ), where 1-p i is the probability that the model predicts the negative class, and the closer to 1 the more accurate.

[0055] The post-processing sub-model is used to generate a corresponding heat map according to the image feature vector extracted by the feature extraction sub-model.

[0056] Specifically, a positive sample memory library of a query index structure needs to be constructed. It includes a plurality of second image feature vectors corresponding to standard images stored in association with classes, and a compressed second image feature vector in each class is configured as a cluster center of the class. The compressed second image feature vector is obtained according to the decomposition of the corresponding second image feature vector, and the positive sample cluster library positive sample memory library is constructed in the following way:

[0057] A standard image is input into the feature extraction sub-model to output a second image feature vector corresponding to the standard image. Each second image feature vector is compressed into a plurality of compressed second image features. Clustering is performed on all compressed second image features to determine a plurality of cluster centers and their corresponding second image features.

[0058] The feature extraction sub-model after training extracts the features of the positive samples to generate a positive sample memory library as a reference object for subsequent testing and application. Here, the second image feature vector is a middle layer feature extracted based on the third residual unit of the trained ResNet-50. In order to speed up the testing process, an index structure is adopted to create the positive sample memory library. First, the Product Quantization (PQ) method is used to divide the input vector set into a series of non-overlapping subspaces. Then, the k-means method is used to cluster each subspace to generate a set of cluster centers (centroids), each vector is associated with the nearest cluster center, and is added to the corresponding list. In this way, the search range of the feature vector in the testing process can be reduced, and the focus of the search can be concentrated in the cluster represented by the cluster center with high similarity to the target feature vector. When searching, only the distance between the target feature vector and the cluster center needs to be compared, and all vectors in the positive sample memory library do not need to be compared, which can provide fast nearest neighbor search and reduce time cost.

[0059] Please refer to Figure 3 , Figure 3A flowchart of a step of generating a defect recognition result provided by an embodiment of the present application. After the post-processing sub-model obtains the first image feature vector corresponding to the inspection image to be recognized, it generates and outputs the corresponding defect recognition result in the following manner:

[0060] S301, based on the matching relationship between the first image feature vector and the compressed second image feature vector corresponding to each class in the positive sample memory library, the target class is determined.

[0061] S302, based on the distance value between the first image feature vector and all second image feature vectors in the target class, the target second image feature vector and the distance value matrix between the first image feature vector and the target second image feature vector are determined.

[0062] S303, according to the distance value matrix, the defect recognition result is generated by mapping.

[0063] For the inspection image to be recognized, the image feature vector thereof is extracted by using the feature extraction sub-model, and then the cosine similarity between the image feature vector and the clustering center in the index is compared to determine the closest clustering center, and the calculation formula can be expressed as:

[0064]

[0065] Where (u·v) refers to the dot product of vectors u and v, ||u|| represents the Euclidean norm of the image feature vector, and ||v|| represents the Euclidean norm of the clustering center (target low-dimensional image feature). The higher the score of the cosine similarity, the higher the similarity between the feature vector and the corresponding clustering center.

[0066] After determining the clustering center of the feature vector, further search is performed in the determined cluster, the L2 distance between the feature vector and each second image feature in the class is calculated, and the maximum distance is selected as the anomaly score. If the anomaly score exceeds the threshold S, it is considered to be a defect. The formula for determining the anomaly score can be expressed as:

[0067] L2 = max i ||x-y i ||2;

[0068] Where L2 is the distance value, x is the first image feature vector of the image to be recognized, and y i is the i-th second image feature in the target class.

[0069] In step S303, the size between the distance value and the pre-designed preset value is compared, and if the distance value is greater than the preset value, it is determined that the corresponding image has a defect.

[0070] The training method of the power inspection image recognition model provided in the embodiments of the present application ensures the balance between positive samples and negative samples, and thus the power inspection image recognition model trained can better learn texture defects and structural defects, and the recognition effect is more accurate.

[0071] Please refer to Figure 4 , Figure 4 The flowchart of a specific embodiment provided in the embodiments of the present application. In one specific embodiment of the present application, it further includes:

[0072] S401, acquiring an image to be recognized of a power equipment in a target area collected by an inspection unmanned aerial vehicle.

[0073] S402, inputting the image to be recognized into a power inspection image recognition model to output a defect recognition result corresponding to the image to be recognized.

[0074] S403, determining whether the power equipment collected by the image to be recognized has defects according to the defect recognition result.

[0075] The defect recognition result here can be 0 or 1, 0 means no defect, and 1 means defect.

[0076] Please refer to Figure 5 , Figure 5 The structural schematic diagram of an electronic device provided in the embodiments of the present application. As shown in Figure 5 , the electronic device 500 includes a processor 510, a memory 520 and a bus 530.

[0077] The memory 520 stores machine readable instructions executable by the processor 510, when the electronic device 500 is running, the processor 510 and the memory 520 communicate through the bus 530, and the machine readable instructions executed by the processor 510 can execute the steps of the training method of the power inspection image recognition model in the method embodiment as described above Figure 1 The specific implementation can be referred to the method embodiment, which will not be repeated here.

[0078] The embodiments of the present application also provide a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program can execute the steps of the training method of the power inspection image recognition model in the method embodiment as described above Figure 1 The specific implementation can be referred to the method embodiment, which will not be repeated here.

[0079] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0080] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. The above described device embodiments are merely schematic, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0081] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. In actual implementation, some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.

[0082] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated in one unit.

[0083] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0084] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any skilled person in the art can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features, within the technical scope disclosed by the present application. The modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A training method for a power line inspection image recognition model, characterized in that, The method comprises: constructing a positive image sample set and a negative image sample set for training, the positive image sample set comprising a plurality of standard images of power equipment collected by a patrol unmanned aerial vehicle, and the negative image sample set comprising a plurality of defect images of the power equipment formed with structural defects or texture defects collected by the patrol unmanned aerial vehicle and a plurality of simulated images of enhanced texture defects generated based on the positive image sample set; determining a standard image recognition model, inputting the images in the constructed positive image sample set and negative image sample set into the standard image recognition model respectively for training, and enabling the standard image recognition model to output a defect recognition result corresponding to the image sample, so as to obtain a power patrol image recognition model; for any standard image in the positive image sample set, the corresponding simulated image of the standard image is generated in the following manner: randomly generating a noise image and performing binaryzation processing on the noise image; filtering the binaryzation-processed standard image based on the binaryzation-processed noise image to obtain a foreground noise binaryzation image; filtering the foreground noise binaryzation image based on a texture defect feature sample image to obtain a texture defect noise binaryzation image; superimposing the texture defect noise binaryzation image and the standard image to serve as the simulated image corresponding to the standard image; for any image sample, before the step of inputting the image sample into the standard image recognition model, the method further comprises: for each pixel point of the image sample, subtracting a first pixel value on each channel in the pixel point from a corresponding pixel average value to obtain a second pixel value on each channel of the pixel point; for each pixel point of the image sample, dividing the second pixel value on each channel in the pixel point by a corresponding pixel standard deviation to obtain a third pixel value on each channel of the pixel point, so as to update the pixel value of each pixel point of the image sample; wherein the pixel average value is an average value between all first pixel values on the corresponding channel of the image sample, and the pixel standard deviation is a standard deviation value between all first pixel values on the corresponding channel of the image sample; the power patrol image recognition model comprises a feature extraction sub-model and a post-processing sub-model, an input of the feature extraction sub-model is a patrol image to be recognized, and an output of the feature extraction sub-model is a first image feature vector corresponding to the patrol image to be recognized, and the feature extraction sub-model at least comprises a first convolutional layer, a normalization layer, an activation layer, a maximum pooling layer, a first residual unit, a second residual unit, a third residual unit and a mean pooling layer connected in sequence.

2. The method of claim 1, wherein, the step of filtering the binaryzation-processed standard image based on the binaryzation-processed noise image to obtain a foreground noise binaryzation image specifically comprises: obtaining a first pixel matrix of the binaryzation-processed noise image and a second pixel matrix of the binaryzation-processed standard image; multiplying the first pixel matrix and the second pixel matrix to serve as a third pixel matrix of the foreground noise binaryzation image.

3. The method of claim 1, wherein, The positive sample memory library includes a plurality of second image feature vectors corresponding to standard images and stored in association with categories, a compressed second image feature vector in each category is configured as a cluster center of the category, and the compressed second image feature vector is obtained according to decomposition of a corresponding second image feature vector. After the post-processing sub-model obtains a first image feature vector corresponding to an inspection image to be identified, the following steps are performed to generate and output a corresponding defect identification result: Based on a matching relationship between the first image feature vector and the compressed second image feature vector corresponding to each category in the positive sample memory library, a target category is determined; Based on distance values between the first image feature vector and all second image feature vectors in the target category, a target second image feature vector and a distance value between the first image feature vector and the target second image feature vector are determined; According to a size relationship between the distance value and a preset value, a defect identification result is determined.

4. The method of claim 3, wherein, The positive sample memory library is constructed in the following manner: A standard image is input into the feature extraction sub-model to output a second image feature vector corresponding to the standard image; Each second image feature vector is compressed into a plurality of compressed second image features; All compressed second image features are clustered to determine a plurality of cluster centers and corresponding second image features.

5. The method of claim 1, wherein, Further comprising: Obtaining an image to be identified of a power equipment in a target region collected by an inspection unmanned aerial vehicle; Inputting the image to be identified into the power inspection image recognition model to output a defect identification result corresponding to the image to be identified; According to the defect identification result, determining whether the power equipment collected by the image to be identified has a defect.

6. An electronic device, comprising: Comprising: A processor, a memory, and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, the processor executes the machine readable instructions to perform the steps of the training method of the power inspection image recognition model according to any one of claims 1 to 5.

7. A computer readable storage medium characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to perform the steps of the training method of the power inspection image recognition model according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Convolutional neural network model training method and device and computer readable storage medium

    CN110288082A

  • Image recognition model training method and device, image recognition method and device, and electronic equipment

    CN111476284A