Method and device for detecting defects of small hardware fittings of power transmission line and storage medium

文档序号:1125594 发布日期:2020-10-02 浏览:10次 中文

阅读说明:本技术 一种输电线路小金具缺陷检测方法、装置及存储介质 (Method and device for detecting defects of small hardware fittings of power transmission line and storage medium ) 是由 陈玉权 王红星 宋煜 沈杰 黄郑 黄祥 张欣 吴媚 高小伟 于 2020-06-18 设计创作,主要内容包括:本发明提供一种输电线路小金具缺陷检测方法、装置及存储介质,方法包括:通过拍摄设备获得多个原始输电线巡检图片,并对多个原始输电线巡检图片质量预处理得到多个输电线巡检图片,并集合多个输电线巡检图片得到输电线巡检数据集,并将输电线巡检数据集分为输电线巡检训练集和输电线巡检测试集;对输电线巡检训练集的数据增强处理得到输电线巡检增强训练集;构建Libra R-CNN模型,并对Libra R-CNN模型的优化处理得到Libra R-CNN优化模型;根据输电线巡检增强训练集对Libra R-CNN优化模型进行训练得到小金具检测模型。本发明较人工巡检更为便捷、安全和高效,且可以适应多种类型及尺度的输电线路航拍图像小金具缺陷,检测精度高,模型泛化能力强。(The invention provides a method, a device and a storage medium for detecting defects of small hardware fittings of a power transmission line, wherein the method comprises the following steps: the method comprises the steps that a plurality of original power transmission line inspection pictures are obtained through shooting equipment, the quality of the original power transmission line inspection pictures is preprocessed to obtain a plurality of power transmission line inspection pictures, the power transmission line inspection pictures are collected to obtain a power transmission line inspection data set, and the power transmission line inspection data set is divided into a power transmission line inspection training set and a power transmission line inspection testing set; enhancing the data of the power transmission line inspection training set to obtain a power transmission line inspection enhanced training set; constructing a Libra R-CNN model, and optimizing the Libra R-CNN model to obtain a Libra R-CNN optimized model; and training the Libra R-CNN optimization model according to the power transmission line inspection enhancement training set to obtain a small hardware detection model. Compared with manual routing inspection, the method is more convenient, safer and more efficient, can adapt to the defects of small hardware fittings of aerial images of power transmission lines with various types and scales, and has high detection precision and strong model generalization capability.)

1. A method for detecting defects of small hardware fittings of a power transmission line is characterized by comprising the following steps:

the method comprises the steps that a plurality of original power transmission line inspection pictures are obtained through shooting equipment, picture quality preprocessing is conducted on the original power transmission line inspection pictures to obtain a plurality of power transmission line inspection pictures, the power transmission line inspection pictures are collected to obtain a power transmission line inspection data set, and the power transmission line inspection data set is divided into a power transmission line inspection training set and a power transmission line inspection testing set;

performing data enhancement processing on the power transmission line inspection training set to obtain a power transmission line inspection enhancement training set;

constructing a Libra R-CNN model, and optimizing the Libra R-CNN model to obtain a Libra R-CNN optimized model;

training the Libra R-CNN optimization model according to the power transmission line inspection enhancement training set to obtain a small hardware fitting detection model;

and detecting the power transmission line inspection test set according to the small hardware fitting detection model to obtain a small hardware fitting defect detection result.

2. The method for detecting the defects of the small fittings of the power transmission lines according to claim 1, wherein the step of preprocessing the quality of the original power transmission line inspection pictures to obtain the power transmission line inspection pictures comprises the following steps:

reading each original power transmission line inspection picture by using an OpenCV tool to obtain a plurality of power transmission line inspection pictures;

and marking the power transmission line inspection pictures by using a LabelImg tool to obtain a label file, wherein the power transmission line inspection pictures carry the label file until the marking of the power transmission line inspection pictures is completed, so that a plurality of power transmission line inspection pictures carrying the label file are obtained.

3. The method for detecting the defects of the small hardware fittings of the power transmission line according to claim 1, wherein the step of performing data enhancement processing on the power transmission line inspection training set to obtain the power transmission line inspection enhancement training set comprises the following steps:

carrying out color enhancement processing on the power transmission line inspection training set to obtain a plurality of power transmission line inspection color enhancement pictures;

rotating the power transmission line inspection training set to obtain a plurality of power transmission line inspection rotating pictures;

carrying out mirror image processing on the power transmission line inspection training set to obtain a plurality of power transmission line inspection mirror image pictures; and carrying out noise adding treatment on the power transmission line inspection training set to obtain a plurality of power transmission line inspection noise adding pictures, and collecting the plurality of power transmission line inspection pictures in the power transmission line inspection training set with the plurality of power transmission line inspection color enhancement pictures, the plurality of power transmission line inspection mirror images and the plurality of power transmission line inspection noise adding pictures to obtain the power transmission line inspection enhancement training set.

4. The method for detecting the defects of the small fittings of the electric transmission line according to any one of claims 1 to 3, wherein the process of optimizing the library R-CNN model to obtain the library R-CNN optimized model comprises the following steps:

setting a feature extraction network ResNext101, wherein the feature extraction network ResNext101 comprises a convolutional layer and a Relu activation function;

performing convolutional layer replacement processing on the convolutional layer through a deformable convolutional layer DCNV2 to obtain an optimized convolutional layer;

performing activation function replacement processing on the Relu activation function through a Mish activation function to obtain an optimized activation function;

obtaining an optimized feature extraction network ResNext101 according to the optimized convolutional layer and the optimized activation function;

and performing network replacement processing on ResNet50 in the Libra R-CNN model through the optimization feature extraction network ResNext101 to obtain the Libra R-CNN optimization model.

5. The utility model provides a little gold utensil defect detecting device of transmission line which characterized in that includes:

the picture processing module is used for obtaining a plurality of original power transmission line inspection pictures through shooting equipment, carrying out picture quality preprocessing on the original power transmission line inspection pictures to obtain a plurality of power transmission line inspection pictures, collecting the power transmission line inspection pictures to obtain a power transmission line inspection data set, and dividing the power transmission line inspection data set into a power transmission line inspection training set and a power transmission line inspection testing set;

the training set processing module is used for performing data enhancement processing on the power transmission line inspection training set to obtain a power transmission line inspection enhancement training set;

the model optimization module is used for constructing a Libra R-CNN model and optimizing the Libra R-CNN model to obtain a Libra R-CNN optimization model;

the model training module is used for training the Libra R-CNN optimization model according to the power transmission line inspection enhancement training set to obtain a small hardware fitting detection model;

and the detection result obtaining module is used for detecting the power transmission line inspection test set according to the small hardware fitting detection model to obtain a small hardware fitting defect detection result.

6. The device for detecting the small hardware defect of the power transmission line according to claim 5, wherein the image processing module is specifically configured to:

reading each original power transmission line inspection picture by using an OpenCV tool to obtain a plurality of power transmission line inspection pictures;

and marking the power transmission line inspection pictures by using a LabelImg tool to obtain a label file, wherein the power transmission line inspection pictures carry the label file until the marking of the power transmission line inspection pictures is completed, so that a plurality of power transmission line inspection pictures carrying the label file are obtained.

7. The device for detecting the defects of the small hardware fittings of the power transmission line according to claim 5, wherein the training set processing module is specifically configured to:

carrying out color enhancement processing on the power transmission line inspection training set to obtain a plurality of power transmission line inspection color enhancement pictures;

rotating the power transmission line inspection training set to obtain a plurality of power transmission line inspection rotating pictures;

carrying out mirror image processing on the power transmission line inspection training set to obtain a plurality of power transmission line inspection mirror image pictures;

and carrying out noise adding treatment on the power transmission line inspection training set to obtain a plurality of power transmission line inspection noise adding pictures, and collecting the plurality of power transmission line inspection pictures in the power transmission line inspection training set with the plurality of power transmission line inspection color enhancement pictures, the plurality of power transmission line inspection mirror images and the plurality of power transmission line inspection noise adding pictures to obtain the power transmission line inspection enhancement training set.

8. The device for detecting the defects of the small hardware fittings of the power transmission line according to any one of claims 5 to 7, wherein the model optimization module is specifically configured to:

setting a feature extraction network ResNext101, wherein the feature extraction network ResNext101 comprises a convolutional layer and a Relu activation function;

performing convolutional layer replacement processing on the convolutional layer through a deformable convolutional layer DCNV2 to obtain an optimized convolutional layer;

performing activation function replacement processing on the Relu activation function through a Mish activation function to obtain an optimized activation function;

obtaining an optimized feature extraction network ResNext101 according to the optimized convolutional layer and the optimized activation function;

and performing network replacement processing on ResNet50 in the Libra R-CNN model through the optimization feature extraction network ResNext101 to obtain the Libra R-CNN optimization model.

9. An electric transmission line small hardware defect detection device, comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein when the processor executes the computer program, the electric transmission line small hardware defect detection method according to any one of claims 1 to 4 is realized.

10. A computer-readable storage medium storing a computer program, wherein the computer program is configured to implement the method for detecting hardware faults of a power transmission line according to any one of claims 1 to 4 when the computer program is executed by a processor.

Technical Field

The invention mainly relates to the technical field of equipment detection, in particular to a method and a device for detecting defects of small hardware fittings of a power transmission line and a storage medium.

Background

With the rapid development of the power grid construction in China, the scale of the power grid in China has leaped the top of the world at present. By 2020, the total mileage of the transmission line in our country will exceed 159 ten thousand kilometers. In order to find the defect and fault of the hardware in the power transmission line in time so as to effectively eliminate potential safety hazard and further ensure normal operation of the power transmission line, an electric power department needs to carry out routing inspection on the power line regularly or irregularly. The current main power line inspection modes comprise manual inspection, robot inspection, manned helicopter inspection, unmanned aerial vehicle inspection and the like. The traditional manual inspection method has the advantages of poor effect, high labor cost, low working efficiency and the like, is outstanding in problem, and cannot meet the requirement of power grid inspection. Moreover, some power transmission lines are located in mountainous and mountainous areas far away from towns, far away from main traffic lines and rare people, and the power transmission lines are high in operation and inspection difficulty and high in quality requirement. With the development of unmanned aerial vehicle technology and the decline of unmanned aerial vehicle manufacturing cost, more and more power companies begin to carry out unmanned aerial vehicle power line and patrol. The defects of the small hardware parts of the power transmission line play an important role in the safety of the power transmission line, and therefore more and more attention is paid to related personnel.

Disclosure of Invention

The invention aims to solve the technical problem of the prior art and provides a method and a device for detecting the defects of small hardware fittings of a power transmission line and a storage medium.

The technical scheme for solving the technical problems is as follows: a method for detecting defects of small hardware fittings of a power transmission line comprises the following steps:

the method comprises the steps that a plurality of original power transmission line inspection pictures are obtained through shooting equipment, picture quality preprocessing is conducted on the original power transmission line inspection pictures to obtain a plurality of power transmission line inspection pictures, the power transmission line inspection pictures are collected to obtain a power transmission line inspection data set, and the power transmission line inspection data set is divided into a power transmission line inspection training set and a power transmission line inspection testing set;

performing data enhancement processing on the power transmission line inspection training set to obtain a power transmission line inspection enhancement training set;

constructing a Libra R-CNN model, and optimizing the Libra R-CNN model to obtain a Libra R-CNN optimized model;

training the Libra R-CNN optimization model according to the power transmission line inspection enhancement training set to obtain a small hardware fitting detection model;

and detecting the power transmission line inspection test set according to the small hardware fitting detection model to obtain a small hardware fitting defect detection result.

Another technical solution of the present invention for solving the above technical problems is as follows: a transmission line small hardware defect detection device comprises:

the picture processing module is used for obtaining a plurality of original power transmission line inspection pictures through shooting equipment, carrying out picture quality preprocessing on the original power transmission line inspection pictures to obtain a plurality of power transmission line inspection pictures, collecting the power transmission line inspection pictures to obtain a power transmission line inspection data set, and dividing the power transmission line inspection data set into a power transmission line inspection training set and a power transmission line inspection testing set;

the training set processing module is used for performing data enhancement processing on the power transmission line inspection training set to obtain a power transmission line inspection enhancement training set;

the model optimization module is used for constructing a Libra R-CNN model and optimizing the Libra R-CNN model to obtain a Libra R-CNN optimization model;

the model training module is used for training the Libra R-CNN optimization model according to the power transmission line inspection enhancement training set to obtain a small hardware fitting detection model;

and the detection result obtaining module is used for detecting the power transmission line inspection test set according to the small hardware fitting detection model to obtain a small hardware fitting defect detection result.

Another technical solution of the present invention for solving the above technical problems is as follows: the device for detecting the defects of the small fittings of the power transmission line comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein when the processor executes the computer program, the method for detecting the defects of the small fittings of the power transmission line is realized.

Another technical solution of the present invention for solving the above technical problems is as follows: a computer-readable storage medium, which stores a computer program, which, when executed by a processor, implements the transmission line hardware fault detection method as described above.

The invention has the beneficial effects that: the method comprises the steps of preprocessing the picture quality of a plurality of original power transmission line inspection pictures to obtain a plurality of power transmission line inspection pictures, collecting the plurality of power transmission line inspection pictures to obtain a power transmission line inspection data set, dividing the power transmission line inspection data set into a power transmission line inspection training set and a power transmission line inspection testing set, performing data enhancement processing on the power transmission line inspection training set to obtain a power transmission line inspection enhancement training set, constructing a Libra R-CNN model, performing optimization processing on the Libra R-CNN model to obtain a Libra R-CNN optimization model, performing training on the Libra R-CNN optimization model according to the power transmission line inspection enhancement training set to obtain a small hardware detection model, and obtaining a small hardware defect detection result according to the detection of the small hardware detection model on the power transmission line inspection testing set, wherein the method is more convenient, safer and more efficient than manual inspection and can adapt to the small hardware defects of various power transmission line inspection pictures, the detection precision is high, and the generalization capability of the model is strong.

Drawings

Fig. 1 is a schematic flow chart of a method for detecting defects of small hardware fittings of a power transmission line according to an embodiment of the present invention;

fig. 2 is a block diagram of a device for detecting defects of small hardware fittings of a power transmission line according to an embodiment of the present invention.

Detailed Description

The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.

Fig. 1 is a schematic flow chart of a method for detecting defects of small hardware fittings of a power transmission line according to an embodiment of the present invention.

As shown in fig. 1, a method for detecting a defect of a small hardware of a power transmission line includes the following steps:

the method comprises the steps that a plurality of original power transmission line inspection pictures are obtained through shooting equipment, picture quality preprocessing is conducted on the original power transmission line inspection pictures to obtain a plurality of power transmission line inspection pictures, the power transmission line inspection pictures are collected to obtain a power transmission line inspection data set, and the power transmission line inspection data set is divided into a power transmission line inspection training set and a power transmission line inspection testing set;

performing data enhancement processing on the power transmission line inspection training set to obtain a power transmission line inspection enhancement training set;

constructing a Libra R-CNN model, and optimizing the Libra R-CNN model to obtain a Libra R-CNN optimized model;

training the Libra R-CNN optimization model according to the power transmission line inspection enhancement training set to obtain a small hardware fitting detection model;

and detecting the power transmission line inspection test set according to the small hardware fitting detection model to obtain a small hardware fitting defect detection result.

It should be appreciated that the power line patrol data set is as follows 7: and 3, dividing the power transmission line inspection training set into a power transmission line inspection training set and a power transmission line inspection testing set.

It should be understood that the power line inspection training set and the power line inspection testing set are both in the VOC format.

Specifically, firstly, a docker environment is built under a Linux environment, and a PyTorch deep learning development environment is configured; secondly, obtaining a plurality of original power line inspection pictures through shooting equipment, manually marking the original power line inspection pictures by using a LabelImg tool, preprocessing the original power line inspection pictures to obtain a high-quality power line inspection data set, and manufacturing a power line inspection training set and a power line inspection testing set in a VOC (volatile organic compound) (visual Object classes) format; secondly, performing data enhancement on the power transmission line inspection training set, optimizing the Libra R-CNN model by adopting ResNext101, DCN v2 and Mish to obtain a Libra R-CNN optimization model, and training the Libra R-CNN optimization model according to the power transmission line inspection enhancement training set to obtain the small hardware detection model; and finally, detecting the small hardware fitting detection model by using a test set to obtain a small hardware fitting defect detection result.

In the embodiment, a plurality of power transmission line inspection pictures are obtained by preprocessing the picture quality of a plurality of original power transmission line inspection pictures, a power transmission line inspection data set is obtained by collecting the plurality of power transmission line inspection pictures, the power transmission line inspection data set is divided into a power transmission line inspection training set and a power transmission line inspection testing set, the power transmission line inspection training set is obtained by performing data enhancement processing on the power transmission line inspection training set, a LibraR-CNN model is constructed, the LibraR-CNN optimization model is obtained by performing optimization processing on the LibraR-CNN model, a small hardware detection model is obtained by performing training on the LibraR-CNN optimization model according to the power transmission line inspection enhancement training set, a small hardware defect detection result is obtained according to the detection of the small hardware detection model on the power transmission line inspection testing set, and the method is more convenient, safer and more efficient than manual inspection and can adapt to the small hardware defects of various power transmission line inspection pictures and scales, the detection precision is high, and the generalization capability of the model is strong.

Optionally, as an embodiment of the present invention, the preprocessing the quality of the plurality of original power line inspection pictures to obtain a plurality of power line inspection pictures includes:

reading each original power transmission line inspection picture by using an OpenCV tool to obtain a plurality of power transmission line inspection pictures;

and marking the power transmission line inspection pictures by using a LabelImg tool to obtain a label file, wherein the power transmission line inspection pictures carry the label file until the marking of the power transmission line inspection pictures is completed, so that a plurality of power transmission line inspection pictures carrying the label file are obtained.

It should be understood that the marking process is a manual marking.

Specifically, each original power line inspection picture is read by using the imread of the OpenCV tool, and if the original power line inspection picture cannot be read, the original power line inspection picture is a damaged picture.

In the embodiment, a plurality of power transmission line inspection pictures to be marked are obtained by reading each original power transmission line inspection picture by using an OpenCV tool; the method comprises the steps of utilizing a LabelImg tool to mark the power transmission line inspection pictures to obtain tag files, wherein the power transmission line inspection pictures carry the tag files until the power transmission line inspection pictures are marked, so that the power transmission line inspection pictures carrying the tag files are obtained, data support is provided for subsequent processing, and compared with manual inspection, the method is more convenient, safer and more efficient, can adapt to the defects of small hardware fittings of power transmission line aerial images of various types and scales, and is high in detection precision and strong in model generalization capability.

Optionally, as an embodiment of the present invention, the performing data enhancement processing on the power line inspection training set to obtain a power line inspection enhancement training set includes:

carrying out color enhancement processing on the power transmission line inspection training set to obtain a plurality of power transmission line inspection color enhancement pictures;

rotating the power transmission line inspection training set to obtain a plurality of power transmission line inspection rotating pictures;

carrying out mirror image processing on the power transmission line inspection training set to obtain a plurality of power transmission line inspection mirror image pictures;

and carrying out noise adding treatment on the power transmission line inspection training set to obtain a plurality of power transmission line inspection noise adding pictures, and collecting the plurality of power transmission line inspection pictures in the power transmission line inspection training set with the plurality of power transmission line inspection color enhancement pictures, the plurality of power transmission line inspection mirror images and the plurality of power transmission line inspection noise adding pictures to obtain the power transmission line inspection enhancement training set.

It should be understood that the power transmission line inspection training set is augmented by applying four methods of color enhancement, rotation, mirror image and noise, so that the data volume of small hardware defects is increased.

Specifically, in the deep learning image processing, under the condition that the training set samples are insufficient or some types of samples are few, in order to prevent overfitting, a data enhancement method can be adopted to enable the model to learn richer feature information, and therefore the effects of improving the accuracy rate of the model and enhancing the robustness of the model are achieved; the method adopts four methods of color enhancement, rotation, mirror image and noise to respectively enhance the power transmission line inspection training set; the defects of the power transmission line inspection training set after the data enhancement method are divided into four types: the bolt lacks the nut, and the pin is outstanding, and the bolt installation is not standard.

In the embodiment, the power transmission line inspection training set is subjected to color enhancement processing to obtain a plurality of power transmission line inspection color enhancement pictures; rotating the power transmission line inspection training set to obtain a plurality of power transmission line inspection rotating pictures; carrying out mirror image processing on the power transmission line inspection training set to obtain a plurality of power transmission line inspection mirror image pictures; the noise adding processing of the power transmission line inspection training set is carried out to obtain a plurality of power transmission line inspection noise adding pictures, the power transmission line inspection noise adding pictures and the power transmission line inspection color enhancement pictures, the power transmission line inspection mirror image pictures and the power transmission line inspection noise adding pictures are collected to obtain a power transmission line inspection enhancement training set, the data volume of small hardware defects is increased, and a foundation is provided for improving the detection precision and enhancing the model generalization capability.

Optionally, as an embodiment of the present invention, the process of performing optimization processing on the Libra R-CNN model to obtain the Libra R-CNN optimization model includes:

setting a feature extraction network ResNext101, wherein the feature extraction network ResNext101 comprises a convolutional layer and a Relu activation function;

performing convolutional layer replacement processing on the convolutional layer through a deformable convolutional layer DCNV2 to obtain an optimized convolutional layer;

performing activation function replacement processing on the Relu activation function through a Mish activation function to obtain an optimized activation function;

obtaining an optimized feature extraction network ResNext101 according to the optimized convolutional layer and the optimized activation function;

and performing network replacement processing on ResNet50 in the Libra R-CNN model through the optimization feature extraction network ResNext101 to obtain the Libra R-CNN optimization model.

Specifically, the detection principle of the Libra R-CNN model is as follows:

A. the input picture is subjected to feature extraction through CNN, and then hard negative is uniformly sampled on IoU through an IoU Balanced sampling method, so that the imbalance among samples is solved.

B. Performing four operations of recalling (size adjustment), integrating (Feature fusion), refining (Feature refinement) and strenggthening (Feature enhancement) on the Feature map by using a Balanced Feature Pyramid method. And enhancing the multi-level features by utilizing the balanced semantic features of deep integration.

C. Balanced L1 loss is used to balance Llcs (classification) and Lloc (localization) loss functions, promote the regression gradient with larger influence, and balance the included samples and tasks thereof, thereby carrying out balance training in classification, coarse localization and fine localization.

It should be understood that the feature extraction network ResNext101 is improved based on resnet, and resnet has the advantages of mainly proposing the idea of residual network learning, avoiding the problems of gradient explosion and disappearance of the network to some extent by splicing the input data directly with the output data, and simplifying the learning process and difficulty. The feature extraction network ResNext101 replaces the original three-layer convolution block of the resnet with blocks which are stacked in parallel and have the same topological structure, so that the model accuracy can be improved under the condition that the complexity of network parameters is not increased, and the number of hyper-parameters (params) is reduced.

Specifically, as the locking pins in the aerial image of the power transmission line have different size ratios and variable rotation angles, the traditional convolutional neural network cannot adapt to the target well, while the Deformable constraint structure is added in the DCN (Deformable constraint networks) method, an offset is added to each point on the receptive field, and the receptive field after DCN is not square any more but becomes matched with the actual shape of the target, so that the convoluted receptive field always covers around the target shape no matter how the target deforms. And the Deformable Convolution layer DCNV2 uses more Deformable contribution, so that the Convolution layer can not only learn the offset by self but also learn the weight of each sampling point, and more accurate feature extraction can be realized by distributing the learned weights to the region corrected by the offset, thereby effectively improving the training effect.

It should be understood that the Relu activation function equation is a primary equation:

f(x)=max(0,x),

the formula of the Mish activation function is a second formula, and the second formula is as follows:

Mish=x*tanh(ln(1+e^x)),

the Relu activation function is 0 when the input value is negative, however, the slight allowance of the negative value theoretically has better gradient flow, and experiments prove that the smooth activation function allows better information to enter a neural network, and the Mish activation function not only allows the negative gradient flow to exist but also is a smooth activation function, so that the Mish activation function can obtain better accuracy and generalization.

Specifically, the ResNet50 in the Libra R-CNN model is replaced by the feature extraction network ResNext101, so that the model detection accuracy is improved; replacing the convolution layer of the feature extraction network ResNext101 with the deformable convolution layer DCNV2, so that a detection frame of a model can adapt to target deformation; and replacing a Relu activation function in ResNext101 by the Mish activation function, so that the generalization capability of the model is improved.

In the above embodiment, a feature extraction network ResNext101 is set, where the feature extraction network ResNext101 includes a convolutional layer and a Relu activation function; carrying out replacement processing on the convolutional layer of the convolutional layer through a deformable convolutional layer DCNV2 to obtain an optimized convolutional layer, so that a detection frame of the model can be adaptive to the deformation of a target; the activation function of the Relu activation function is replaced by the Mish activation function to obtain an optimized activation function, so that the generalization capability of the model is improved; obtaining an optimized feature extraction network ResNext101 according to the optimized convolutional layer and the optimized activation function; and performing network replacement processing on ResNet50 in the Libra R-CNN model through the optimization feature extraction network ResNext101 to obtain the Libra R-CNN optimization model, so that the detection accuracy of the model is improved.

Fig. 2 is a block diagram of a device for detecting defects of small hardware fittings of a power transmission line according to an embodiment of the present invention.

Optionally, as another embodiment of the present invention, as shown in fig. 2, a device for detecting a small hardware defect of a power transmission line includes:

the picture processing module is used for obtaining a plurality of original power transmission line inspection pictures through shooting equipment, carrying out picture quality preprocessing on the original power transmission line inspection pictures to obtain a plurality of power transmission line inspection pictures, collecting the power transmission line inspection pictures to obtain a power transmission line inspection data set, and dividing the power transmission line inspection data set into a power transmission line inspection training set and a power transmission line inspection testing set;

the training set processing module is used for performing data enhancement processing on the power transmission line inspection training set to obtain a power transmission line inspection enhancement training set;

the model optimization module is used for constructing a Libra R-CNN model and optimizing the Libra R-CNN model to obtain a Libra R-CNN optimization model;

the model training module is used for training the Libra R-CNN optimization model according to the power transmission line inspection enhancement training set to obtain a small hardware fitting detection model;

and the detection result obtaining module is used for detecting the power transmission line inspection test set according to the small hardware fitting detection model to obtain a small hardware fitting defect detection result.

Optionally, as an embodiment of the present invention, the image processing module is specifically configured to:

reading each original power transmission line inspection picture by using an OpenCV tool to obtain a plurality of power transmission line inspection pictures;

and marking the power transmission line inspection pictures by using a LabelImg tool to obtain a label file, wherein the power transmission line inspection pictures carry the label file until the marking of the power transmission line inspection pictures is completed, so that a plurality of power transmission line inspection pictures carrying the label file are obtained.

Optionally, as an embodiment of the present invention, the training set processing module is specifically configured to:

carrying out color enhancement processing on the power transmission line inspection training set to obtain a plurality of power transmission line inspection color enhancement pictures;

rotating the power transmission line inspection training set to obtain a plurality of power transmission line inspection rotating pictures;

carrying out mirror image processing on the power transmission line inspection training set to obtain a plurality of power transmission line inspection mirror image pictures;

and carrying out noise adding treatment on the power transmission line inspection training set to obtain a plurality of power transmission line inspection noise adding pictures, and collecting the plurality of power transmission line inspection pictures in the power transmission line inspection training set with the plurality of power transmission line inspection color enhancement pictures, the plurality of power transmission line inspection mirror images and the plurality of power transmission line inspection noise adding pictures to obtain the power transmission line inspection enhancement training set.

Optionally, as an embodiment of the present invention, the model optimization module is specifically configured to:

setting a feature extraction network ResNext101, wherein the feature extraction network ResNext101 comprises a convolutional layer and a Relu activation function;

performing convolutional layer replacement processing on the convolutional layer through a deformable convolutional layer DCNV2 to obtain an optimized convolutional layer;

performing activation function replacement processing on the Relu activation function through a Mish activation function to obtain an optimized activation function;

obtaining an optimized feature extraction network ResNext101 according to the optimized convolutional layer and the optimized activation function;

and performing network replacement processing on ResNet50 in the Libra R-CNN model through the optimization feature extraction network ResNext101 to obtain the Libra R-CNN optimization model.

Optionally, another embodiment of the present invention provides a device for detecting defects of small hardware fittings of a power transmission line, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the method for detecting defects of small hardware fittings of a power transmission line is implemented. The device may be a computer or the like.

Optionally, another embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for detecting a hardware fault of a power transmission line is implemented.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.

Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. It will be understood that the technical solution of the present invention essentially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种深井裂缝检测装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!