A method for detecting hardware in power inspection images combined with shape attributes
By combining the KL divergence of shape attributes and the characteristics of hardware objects of the same category, the bounding box regression loss function of the Faster R-CNN model is improved, which solves the problem of inaccurate positioning of the hardware target detection frame, improves detection accuracy, and provides safe operation of the power grid. Guaranteed.
Patent Information
- Application Number
- CN202010002183.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-02
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-01-02
AI Technical Summary
In existing power system inspections, when the Faster R-CNN model detects hardware targets, the bounding box position deviates greatly and cannot be effectively corrected in the post-processing stage, resulting in inaccurate detection, especially in the detection of hardware targets under complex backgrounds. The frame positioning is inaccurate and the target structure of some fittings is incompletely displayed.
Combined with the KL divergence of shape attributes and the shape characteristics of hardware objects of the same category, the regression loss function of the Faster R-CNN model is improved, and the classification loss and boundary are calculated through global feature extraction, region of interest acquisition, classification prediction and bounding box distribution prediction. Box regression loss, adding shape constraints to improve the accuracy of bounding box regression.
It significantly improves the accuracy of hardware target detection, ensures the accuracy of detection frame positioning in complex backgrounds, and provides a basic guarantee for the safe operation of the power grid.
Smart Images

Figure CN111179262B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image analysis and relates to a method for detecting hardware of electric power inspection images combining shape attributes. Background Art
[0002] Ensuring the reliability of transmission lines is one of the important contents of the construction of energy internet and smart grid. Hardware is an extremely important and abundant metal component on transmission lines, which plays the role of supporting, fixing, connecting and protecting bare wires and conductors; at the same time, it is also a fault-prone component, and its good condition ensures the safe operation of the power grid. Because transmission lines run outdoors for a long time and are affected by various meteorological environments, especially dancing and vibration, it is inevitable that hardware displacement, breakage, skewness and other fault phenomena will occur. High-accuracy automatic detection of hardware targets in transmission lines is the basis for later hardware fault judgment, so it becomes particularly important to perform high-accuracy automatic detection of hardware targets in transmission lines.
[0003] In the inspection of power system lines, the combination of deep learning methods not only greatly reduces the number of operation and maintenance personnel required for inspection, eliminates false detection and missed detection due to human subjective factors, but also improves work efficiency and makes the assessment of power grid status more accurate and effective. Currently popular target detection frameworks, such as R-CNN (Region-Convolutional Neural Network) model, Fast R-CNN model and Faster R-CNN model, such as the method and system for identifying power widgets in drone inspection images based on Faster R-CNN disclosed in patent application number 201610906708.2.
[0004] The network prediction outputs two types of information: one is the target category information, and the other is the target bounding box information. However, the target position determined by the detection model only through the target bounding box offset is often inaccurate. It is often the case that the target detection score is high but the detection box position offset is large, and the position prediction information cannot be further corrected in the post-processing NMS (Non-maximum suppression) stage.
[0005] In order to achieve high-accuracy automatic detection of hardware targets in transmission line inspection images and make the model's bounding box regression prediction of hardware targets more accurate, it is necessary to explore more effective bounding box regression methods. Summary of the invention
[0006] The purpose of the present invention is to provide a method for detecting hardware fittings in power inspection images combined with shape attributes. By combining the KL divergence and the shape features of hardware fitting targets of the same category to constrain the regression loss function of the Faster R-CNN model, the problems of inaccurate positioning of the detection frame of the hardware fitting targets in complex backgrounds and incomplete structural display of some hardware fitting targets in the image are solved, which provides a basis for further diagnosis of hardware fitting defects and provides a basic guarantee for the safe operation of the power grid.
[0007] To achieve the above object, the technical solution of the present invention includes the following steps:
[0008] (1) Global feature extraction: Use the image classification network VGG-16 to extract global features;
[0009] (2) Region of interest acquisition: The extracted global features are input into the region proposal network;
[0010] (3) Perform classification prediction and bounding box distribution prediction respectively;
[0011] (4) Loss function calculation: classification loss calculation, KL divergence bounding box regression loss calculation combined with shape attributes;
[0012] (5) Model training.
[0013] Furthermore, in step (1), the convolutional neural network for extracting target features uses the image classification network VGG-16 for extraction. The network is trained for prediction on the dataset ImageNet to generate initial network parameters. The original image in the hardware dataset is input into the network to generate a deep feature map. The corresponding convolutional layer activation function of the convolutional neural network for extracting target features is a linear rectified unit function.
[0014] Furthermore, in step (2), a proposed region corresponding to the input image is generated according to a preset anchor box value, and is screened using a non-maximum suppression method.
[0015] Furthermore, in step (2), the anchor box with an IoU value greater than 0.7 is defined as a positive sample, the anchor box with an IoU value less than 0.3 is defined as a negative sample, and other samples are discarded; RoI pooling generates a fixed-size region of interest by block pooling from feature maps of different input sizes, and then inputs the local features of the region of interest into the fully connected layer of the classification network and regression network for classification and positioning.
[0016] Furthermore, in step (3), the method for performing classification prediction is to stretch the obtained local feature map of the region of interest, generate an output value by the fully connected network, and then generate the prediction probability of each category through the softmax function, and the sum of the probabilities is 1, so as to determine the exact category of the target in the anchor box and obtain the corresponding classification score.
[0017] Furthermore, in step (3), the method for predicting the bounding box distribution is to fit the data using a one-dimensional Gaussian distribution, assuming that different coordinate values of the sample are independent of each other. The probability density function of the one-dimensional Gaussian distribution is:
[0018]
[0019] Among them, x represents the sample value, x e The expected value of the distribution is used to estimate the coordinate position of the target, Φ represents the set of network parameters that generate each predicted value, and σ represents the standard deviation of the distribution, which is used to estimate the uncertainty of the predicted position.
[0020] At the same time, the target coordinate distribution with σ value approaching 0 is taken as the distribution of the target coordinate true value in the data set, and the expression of the coordinate true value distribution is obtained, which is shown in formula (2):
[0021] Q D (x) = δ(x g ) (2)
[0022] Among them, x represents the sample value, x g represents the true value of the coordinate, and D represents x g is a set of parameters, δ represents the Dirac function.
[0023] Further, in step (4),
[0024] The classification loss is calculated as a function that maintains the original Faster R-CNN model:
[0025] L cls (p i ,p i * )=-log[p i * p i +(1-p i * )(1-p i )] (3)
[0026] Among them, p i is the category prediction probability of the target in the i-th anchor box, i∈[1,2000]; p i *is the category label of the target in the i-th anchor box.
[0027] Furthermore, in step (4), the KL divergence bounding box regression loss is calculated in combination with the shape attribute:
[0028] The definition of KL divergence is:
[0029]
[0030] Among them, x represents the sample value, and P and Q are two different probability distributions.
[0031] Furthermore, in step (4), the bounding box regression loss is calculated by combining the KL divergence of the shape attribute, and the bounding box regression loss is calculated as:
[0032] The bounding box regression loss function based on KL divergence is defined as:
[0033]
[0034] Among them, x represents the sample value, P Φ (x) represents the predicted coordinate probability distribution, Q D (x) represents the probability distribution of the true label coordinates;
[0035] The closer the predicted coordinate probability distribution is to the true label coordinate probability distribution, the better. That is, the smaller the KL divergence value between the predicted probability distribution of the input sample coordinates and the true label distribution, the better. Further simplifying formula (5) yields:
[0036]
[0037] Among them, x g Represents the true label coordinates, x e Represents the predicted label coordinates;
[0038] For the variable x in formula (6), e And σ are used to find the partial differential. According to formula (7), the variable α is used to replace σ as the output. The loss function after replacement is formula (8).
[0039] α=log(σ 2 ) (7)
[0040]
[0041] Among them, x g Represents the true label coordinates, x e Represents the predicted label coordinates.
[0042] The covariance value is calculated for the width and height of samples of the same category, and the covariance formula is defined as formula (9).
[0043] cov(w,h)=E[wE(w)]E[hE[h]] (9)
[0044] In formula (9), w represents the predicted width value of the sample during the model propagation process, h represents the predicted height value of the sample during the model propagation process, E represents the mathematical expectation function, and cov represents the covariance function. Covariance can represent the linear correlation between random variables. Since formula (9) is the covariance value of discrete random variables, it can be expressed by calculating the sample mean, which is specifically expressed by formula (10).
[0045]
[0046] In formula (10), and They represent the mean width and height of the sample targets respectively. Assuming that the height and width of the target belong to the Euclidean space, they are constrained by the L2 norm, and the shape constraint function is obtained as shown in formula (11):
[0047]
[0048] Among them, w represents the predicted width value of the sample during the model propagation process, h represents the predicted height value of the sample during the model propagation process, represents the sample target width mean, Represents the mean sample target height;
[0049] The shape constraint function is added to the bounding box regression loss function of formula (8) to obtain the final model bounding box regression loss function:
[0050]
[0051] Among them, L reg represents the bounding box regression loss function, L kl represents the bounding box loss function based on KL divergence, and ι represents the shape constraint function.
[0052] Furthermore, in step (5), the constructed model is used to train the transmission line inspection image hardware dataset, wherein the ratio of the training set to the test set is 8:2, the initial learning rate is 0.001, and the number of iterations is 30000; after obtaining the trained hardware target detection model, the image to be detected is input into the model file with the highest number of iterations, and the accurate position information and confidence information of the hardware target are directly obtained through image forward propagation. The positive effects of the present invention are as follows:
[0053] The present invention provides a method for detecting hardware fittings in power inspection images combined with shape attributes. On the basis of the Faster R-CNN model, the KL divergence and the shape features of hardware fitting targets of the same category are combined to constrain the bounding box regression loss function to solve the problems of inaccurate positioning of the detection frame of the hardware fitting targets in complex backgrounds and incomplete structural display of some hardware fitting targets in the image. The detection accuracy is significantly improved, which provides a basis for further diagnosis of hardware fitting defects and provides a basic guarantee for the safe operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flowchart of the method of the present invention.
[0055] Figure 2 This is a diagram of the detection results obtained in Example 2 of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0057] In order to better illustrate the present invention, further examples are given below.
[0058] Example 1
[0059] The Faster R-CNN model is a prior art content. The present invention improves the Faster R-CNN model and proposes a more effective bounding box regression function.
[0060] like Figure 1 As shown, the present invention provides a method for detecting hardware of power inspection images in combination with shape attributes, which comprises the following steps:
[0061] (1) Global feature extraction: Use the image classification network VGG-16 to extract the global features of the hardware image.
[0062] (2) Region of interest acquisition: The extracted global features are input into the RPN network.
[0063] (3) Perform classification prediction and bounding box distribution prediction respectively.
[0064] (4) Loss function calculation: classification loss calculation, KL divergence bounding box regression loss calculation combined with shape attributes; classification loss calculation is performed after classification prediction; KL divergence bounding box regression loss calculation combined with shape attributes is performed after bounding box distribution prediction. The KL divergence bounding box regression loss calculation combined with shape attributes combines the shape attributes of the hardware and the KL divergence loss calculation. In the first step, a bounding box regression loss function based on KL divergence is obtained. Then, the hardware attributes of the same type of hardware with a fixed aspect ratio are combined, and the loss function is changed again to add covariance to obtain the final bounding box regression loss function.
[0065] (5) Model training.
[0066] The following are the steps for each step:
[0067] (1) Global feature extraction: Use the image classification network VGG-16 to extract the global features of the hardware image.
[0068] Specifically, in step (1), the convolutional neural network for extracting target features uses the existing classic image classification network VGG-16 for extraction. The network is trained for prediction on the large public dataset ImageNet to generate initial network parameters. The original image in the hardware dataset is input into the network to generate a deep feature map. The corresponding convolutional layer activation function of the convolutional neural network for extracting target features is the rectified linear unit function (Rectified Linear Unit, ReLU).
[0069] (2) Region of interest acquisition: The extracted global features are input into the region proposal network (RPN).
[0070] Specifically, a proposed region corresponding to the input image is generated according to a preset anchor box value, and is screened using a non-maximum suppression method.
[0071] Specifically, in step (2), the anchor box with an IoU (Intersection over Union) value greater than 0.7 is defined as a positive sample, the anchor box with an IoU value less than 0.3 is defined as a negative sample, and other samples are discarded;
[0072] RoI pooling generates a fixed-size region of interest (ROI) of 7*7 by block pooling feature maps of different input sizes, and then inputs the local features of the region of interest into the fully connected layers of the classification network and regression network for classification and positioning.
[0073] (3) Perform classification prediction and bounding box distribution prediction respectively.
[0074] In step (3), the method for classification prediction is to stretch the local feature map of the region of interest, generate an output value by the fully connected network, and then generate the prediction probability of each category through the softmax function, and the sum of the probabilities is 1, so as to determine the exact category of the target in the anchor box and obtain the corresponding classification score.
[0075] In step (3), the method for predicting the bounding box distribution is to use a one-dimensional Gaussian distribution to fit the data. Assuming that the different coordinate values of the samples are independent of each other, the probability density function of the one-dimensional Gaussian distribution is:
[0076]
[0077] Among them, x represents the sample value, x e The expected value of the distribution is used to estimate the coordinate position of the target, Φ represents the set of network parameters that generate each predicted value, and σ represents the standard deviation of the distribution, which is used to estimate the uncertainty of the predicted position.
[0078] At the same time, the target coordinate distribution with σ value approaching 0 is taken as the distribution of the target coordinate true value in the data set, and the expression of the coordinate true value distribution is obtained, which is shown in formula (2):
[0079] Q D (x) = δ(x g ) (2)
[0080] Among them, x represents the sample value, x g represents the true value of the coordinate, and D represents the expression x g is a set of parameters, δ represents the Dirac function.
[0081] (4) Loss function calculation: classification loss calculation, KL divergence bounding box regression loss calculation combined with shape attributes. Classification loss calculation is performed after classification prediction; KL divergence bounding box regression loss calculation combined with shape attributes is performed after bounding box distribution prediction. The KL divergence bounding box regression loss calculation combined with shape attributes combines the hardware shape attributes and KL divergence loss calculation. In the first step, a bounding box regression loss function based on KL divergence is obtained, and then the hardware attributes of the same type of hardware with a fixed aspect ratio are combined. The loss function is changed again to add covariance to obtain the final bounding box regression loss function.
[0082] In step (4), the classification loss is calculated as a function that maintains the original Faster R-CNN model:
[0083] L cls (p i ,p i * )=-log[p i * pi +(1-p i * )(1-p i )] (3)
[0084] Among them, p i is the category prediction probability of the target in the i-th anchor box, i∈[1,2000]; p i * is the category label of the target in the i-th anchor box.
[0085] In step (4), the KL divergence bounding box regression loss is calculated by combining shape attributes:
[0086] The definition of KL divergence is:
[0087]
[0088] Among them, x represents the sample value, and P and Q are two different probability distributions.
[0089] In step (4), the bounding box loss is calculated by combining the KL divergence of the shape attribute:
[0090] The bounding box regression loss function is defined as:
[0091]
[0092] Among them, x represents the sample value, P Φ (x) represents the predicted coordinate probability distribution, Q D (x) represents the probability distribution of the true label coordinates, and the D KL Obtained by formula (4).
[0093] The closer the predicted coordinate probability distribution is to the true label coordinate probability distribution, the better. That is, the smaller the KL divergence value between the predicted probability distribution of the input sample coordinates and the true label distribution, the better. Further simplifying formula (5) yields:
[0094]
[0095] Among them, x g Represents the true label coordinates, x e Represents the predicted label coordinates. For the variable x in equation (6) e And σ are used to find the partial differential. According to formula (7), the variable α is used to replace σ as the output. The loss function after replacement is formula (8).
[0096] α=log(σ 2 ) (7)
[0097]
[0098] Among them, x g Represents the true label coordinates, x e Represents the predicted label coordinates.
[0099] Whether the loss function is based on the L1 norm or the KL divergence mentioned above, when measuring the bounding box position distribution predicted by the model and the bounding box position distribution of the true value, the correlation between the shapes of the hardware at different positions in the image is ignored. The position coordinates of multiple target samples obtained by the introduced bounding box distribution prediction take into account the similarity in shape distribution of similar hardware targets in the data set, that is, the aspect ratios of similar hardware targets are highly linearly correlated. Based on this feature, the covariance value of the width and height of the samples of the same category is calculated. The covariance formula is defined as formula (9).
[0100] cov(w,h)=E[wE(w)]E[hE[h]] (9)
[0101] In formula (9), w represents the predicted width value of the sample during the model propagation process, h represents the predicted height value of the sample during the model propagation process, E represents the mathematical expectation function, and cov represents the covariance function. Covariance can represent the linear correlation between random variables. Since formula (9) is the covariance value of discrete random variables, it can be expressed by calculating the sample mean, which is specifically expressed by formula (10).
[0102]
[0103] In formula (10), and They represent the mean width and height of the sample targets respectively. Assuming that the height and width of the target belong to the Euclidean space, they are constrained by the L2 norm, and the shape constraint function is obtained as shown in formula (11):
[0104]
[0105] In formula (11), w represents the predicted width value of the sample during the model propagation process, and h represents the predicted height value of the sample during the model propagation process. represents the sample target width mean, Represents the mean sample target height.
[0106] The shape constraint function is added to the bounding box regression loss function in formula (8) to obtain the final model regression loss function:
[0107]
[0108] Among them, L reg represents the bounding box loss function, L klrepresents the bounding box loss function based on KL divergence, and ι represents the shape constraint function.
[0109] (5) Model training.
[0110] In step (5), the constructed model is used to train the transmission line inspection image hardware dataset, where the ratio of training set and test set images is 8:2, the initial learning rate is 0.001, and the number of iterations is 30,000. After obtaining the trained hardware target detection model, the image to be detected is input into the model file with the highest number of iterations, and the accurate location information and confidence information of the hardware target are directly obtained through image forward propagation.
[0111] The method also includes step (6), wherein step (6) is to test the trained model using known data.
[0112] Example 2
[0113] A trained model is obtained according to the method of Example 1, and the image is processed using a pre-trained Faster R-CNN target detection model based on a shape loss function.
[0114] The method of embodiment 1 comprises the following steps,
[0115] (1) Global feature extraction: Use the image classification network VGG-16 to extract global features;
[0116] (2) Region of interest acquisition: The extracted global features are input into the region proposal network;
[0117] (3) Perform classification prediction and bounding box distribution prediction respectively;
[0118] (4) Loss function calculation: classification loss calculation, KL divergence bounding box regression loss calculation combined with shape attributes;
[0119] (5) Model training.
[0120] The basic parameter settings of the Faster R-CNN model are: batch size 64, initial learning rate 0.001, maximum number of iterations 70000, and backbone network Resnet-50. The server GPU model used in the experiment is GTX1080ti, implemented under the Tensorflow deep learning framework. The results are as follows Figure 2 As shown in the figure, it can be seen that the predicted bounding box of the shock-absorbing hammer and the annotated bounding box overlap with each other, there is no serious deformation of the detection box, and too much redundant information is not included in the detection box. The detection box fits the real target.
[0121] The present invention provides a method for detecting hardware in power inspection images combined with shape attributes. The shape features of hardware targets of different categories in the data set are added as constraints to the loss function to solve the problems of inaccurate positioning of the detection frame of hardware targets in complex backgrounds and incomplete display of the structure of some hardware targets in the image. The detection accuracy is significantly improved, providing a basis for further diagnosis of hardware target defects and providing a basic guarantee for the safe operation of the power grid. The invention is feasible and has certain reference significance for the design of solutions to related problems.
Claims
1. A method for detecting hardware in power inspection images combined with shape attributes. Features: It includes the following steps, (1) Global feature extraction: Use the image classification network VGG-16 to extract global features; (2) Obtaining the region of interest: input the extracted global features into the region proposal network; (3) Perform classification prediction and bounding box distribution prediction respectively; (4) Loss function calculation: classification loss calculation, KL divergence bounding box regression loss calculation combined with shape attributes; (5) Model training; In step (4), the KL divergence bounding box regression loss is calculated by combining the shape attributes: The definition of KL divergence is: Among them, x represents the sample value, P and Q are two different probability distributions; In step (4), in the calculation of the bounding box regression loss based on the KL divergence of the shape attribute, the bounding box regression loss is calculated as: The bounding box regression loss function based on KL divergence is defined as: Among them, x represents the sample value, P Φ (x) represents the predicted coordinate probability distribution, Q D (x) represents the probability distribution of the true label coordinates; Simplify equation (5): Among them, x g Represents the true label coordinates, x e Represents the predicted label coordinates; for the variable x in formula (6) e And σ to find the partial differential, according to formula (7), use the variable α to replace σ as the output, the loss function after replacement is formula (8): α=log(σ 2 ) (7) Among them, x g Represents the true label coordinates, x e Represents the predicted label coordinates; the covariance value of the width and height of the samples of the same category is calculated, and the covariance formula is defined as formula (9); cov(w,h)=E[wE(w)]E[hE[h]] (9); In formula (9), w represents the predicted width value of the sample during the model propagation process, h represents the predicted height value of the sample during the model propagation process, E represents the mathematical expectation function, cov represents the covariance function, and covariance represents the linear correlation between random variables; since formula (9) is the covariance value of discrete random variables, it is expressed by calculating the sample mean, which is specifically expressed by formula (10); In formula (10), represents the sample target width mean, represents the mean height of the sample target. Assuming that the height and width of the target belong to the Euclidean space, the L2 norm is used to constrain it, and the shape constraint function is obtained as shown in formula (11): Among them, w represents the predicted width value of the sample during the model propagation process, h represents the predicted height value of the sample during the model propagation process, represents the sample target width mean, represents the mean height of the sample target; the shape constraint function is added to the bounding box regression loss function of formula (8) to obtain the final model bounding box regression loss function: Among them, L reg represents the model bounding box regression loss function, L kl represents the bounding box loss function based on KL divergence, and ι represents the shape constraint function.
2. According to the method for detecting power inspection image hardware combined with shape attributes in claim 1, Features: In step (1), the convolutional neural network for extracting target features uses the image classification network VGG-16 for extraction. The image classification network VGG-16 is trained on the dataset ImageNet to generate initial network parameters. The original image in the hardware dataset is input into the image classification network VGG-16 to generate a deep feature map. The convolutional layer activation function corresponding to the convolutional neural network for extracting target features is a linear corrected unit function.
3. According to the method for detecting electric power inspection image hardware combined with shape attributes in claim 1, Features: In step (2), a proposed region corresponding to the input image is generated according to the preset anchor box value, and is screened using a non-maximum suppression method.
4. According to the method for detecting electric power inspection image hardware combined with shape attributes as described in claim 3, Features: In step (2), the anchor box with an IoU value greater than 0.7 is defined as a positive sample, the anchor box with an IoU value less than 0.3 is defined as a negative sample, and other samples are discarded; RoI pooling generates a fixed-size region of interest by block pooling from feature maps of different input sizes, and then inputs the local features of the region of interest into the fully connected layer of the classification network and regression network for classification and positioning.
5. According to the method for detecting power inspection image hardware combined with shape attributes as described in claim 3, Features: In step (3), the method for classification prediction is to stretch the local feature map of the region of interest, generate an output value by the fully connected network, and then generate the prediction probability of each category through the softmax function, and the sum of the probabilities is 1, so as to determine the exact category of the target in the anchor box and obtain the corresponding classification score.
6. According to the method for detecting power inspection image hardware combined with shape attributes as described in claim 3, Features: In step (3), the method for predicting the bounding box distribution is to use a one-dimensional Gaussian distribution to fit the data. Assuming that the different coordinate values of the samples are independent of each other, the probability density function of the one-dimensional Gaussian distribution is: Among them, x represents the sample value, x e The expected value of the distribution is used to estimate the coordinate position of the target, Φ is the set of network parameters for generating each predicted value, and σ is the standard deviation of the distribution, which is used to estimate the uncertainty of the predicted position. At the same time, the target coordinate distribution with a σ value close to 0 is taken as the distribution of the true value of the target coordinate in the data set, and the expression of the coordinate true value distribution is obtained, as shown in formula (2): Q D (x)=δ(x-x g ) (2) Among them, x represents the sample value, x g represents the true value of the coordinate, and D represents x g is a set of parameters, δ represents the Dirac function.
7. The method for detecting electric power inspection image hardware combining shape attributes according to claim 1, Features: In step (4), the classification loss is calculated as a function that maintains the original Faster R-CNN model: L cls (p i ,p i * )=-log[p i * p i +(1-p i * )(1-p i )] (3) Among them, p i is the category prediction probability of the target in the i-th anchor box, i∈[1, 2000]; p i * is the category label of the target in the i-th anchor box.
8. The method for detecting electric power inspection image hardware combining shape attributes according to claim 1, Features: In step (5), the constructed model is used to train the transmission line inspection image hardware dataset, where the ratio of training set and test set images is 8:2, the initial learning rate is 0.001, and the number of iterations is 30,000. After obtaining the trained hardware target detection model, the image to be detected is input into the model file with the highest number of iterations, and the accurate location information and confidence information of the hardware target are directly obtained through image forward propagation.
