CN115147383A - A fast detection method of insulator state based on lightweight YOLOv5 model - Google Patents

A fast detection method of insulator state based on lightweight YOLOv5 model Download PDF

Info

Publication number
CN115147383A
CN115147383A CN202210816209.XA CN202210816209A CN115147383A CN 115147383 A CN115147383 A CN 115147383A CN 202210816209 A CN202210816209 A CN 202210816209A CN 115147383 A CN115147383 A CN 115147383A
Authority
CN
China
Prior art keywords
lightweight
yolov5
model
insulator
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210816209.XA
Other languages
Chinese (zh)
Inventor
赵昌新
李军
丁祖善
王一丁
曹闯
霍福广
孙锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Xuzhou Power Supply Co
Original Assignee
State Grid Xuzhou Power Supply Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Xuzhou Power Supply Co filed Critical State Grid Xuzhou Power Supply Co
Priority to CN202210816209.XA priority Critical patent/CN115147383A/en
Publication of CN115147383A publication Critical patent/CN115147383A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method for rapidly detecting the state of an insulator based on a lightweight YOLOv5 model, and aims to solve the problems of low accuracy rate of insulator state detection and large detection network parameter quantity and calculated quantity. The insulator defect detection algorithm comprises the steps of collecting insulator images to form a data set; marking the insulator and the defect image thereof by using a Labelimg tool, and expanding a data set through data enhancement processing; introducing a lightweight network ShuffleNet V2-Stem to carry out lightweight improvement on the YOLOv5 model to form a YOLOv5-ShuffleNet V2S model; adding a small target detection layer; a CIoU loss function is adopted; training a lightweight improved YOLOv5 model; applying the improved model to an insulator defect data set; experimental results show that the lightweight YOLOv5 model enhances the capability of extracting image characteristic information, realizes the lightweight of the detection model on the premise of keeping the detection precision, and is more suitable for being deployed on an unmanned aerial vehicle platform to detect the state of the insulator.

Description

一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法A rapid detection method of insulator state based on lightweight YOLOv5 model

技术领域technical field

本发明属于深度学习图像处理领域,涉及一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法。The invention belongs to the field of deep learning image processing, and relates to a method for rapidly detecting the state of an insulator based on a lightweight YOLOv5 model.

背景技术Background technique

在国家电网“西电东送,北电南供”的战略格局下,以及我国特高压、高压输电等级的不断提高,输电线路长度和架设区域的扩大,电网的安全、稳定、可靠运行就显得尤为重要。而输电网的安全正常运行又是电网安全至关重要的环节。由于输电线路所在的环境复杂且多变,线路中的电力器件常年暴露在自然环境中,受外部因素影响易产生腐蚀、断股、磨损等故障。绝缘子是输电线路重要器件之一,据统计绝缘子故障引发的事故超过一半,为输电线路的稳定运行带来了很大的安全隐患。根据国网公司对输电线路故障划分,绝缘子缺陷按危害程度分为一般、严重、危急三种不同危害等级,共83种缺陷类型。因此,及时监控输电线路中绝缘子的工作状态,定期进行输电线路巡检工作排查故障绝缘子十分必要。Under the strategic pattern of "transmitting electricity from the west to the east, supplying electricity from the north to the south", as well as the continuous improvement of my country's UHV and high-voltage power transmission levels, and the expansion of the length of transmission lines and erection areas, the safe, stable and reliable operation of the power grid appears to be especially important. The safe and normal operation of the transmission grid is a crucial part of the grid security. Due to the complex and changeable environment in which the transmission line is located, the power devices in the line are exposed to the natural environment all the year round, and are prone to corrosion, broken strands, wear and other failures due to external factors. Insulators are one of the important components of transmission lines. According to statistics, more than half of the accidents caused by insulator failures have caused great potential safety hazards for the stable operation of transmission lines. According to the classification of transmission line faults by State Grid Corporation of China, insulator defects are classified into three different hazard levels: general, serious and critical according to the degree of damage, with a total of 83 defect types. Therefore, it is very necessary to monitor the working status of the insulators in the transmission line in time and conduct regular inspections of the transmission line to check for faulty insulators.

输电线巡检方式包括人工巡检、直升机巡检、无人机巡检以及巡检机器人巡检。传统人工巡检效率低且安全难以保证。直升机巡检虽然可以提高巡检效率,但其高成本和低灵活性的缺点使其不能大规模应用。随着人工智能的快速发展和无人机技术的成熟应用,无人机巡检得以广泛使用。无人机巡检具有安全、高效的优点,利用机载摄像设备拍摄输电线路中的电力设备,再通过人工对巡检图像鉴别判断是否存在故障。但巡检图像具有体量大和价值密度低的大数据特征,人工判读容易存在因视觉疲劳而产生的误判和漏判。引入深度学习后,通过计算机视觉技术和图像处理技术以及计算硬件的结合,使得智能巡检成为可能。Transmission line inspection methods include manual inspection, helicopter inspection, drone inspection and inspection robot inspection. Traditional manual inspections are inefficient and difficult to guarantee safety. Although helicopter inspection can improve inspection efficiency, its disadvantages of high cost and low flexibility make it unable to be applied on a large scale. With the rapid development of artificial intelligence and the mature application of UAV technology, UAV inspection has been widely used. UAV inspection has the advantages of safety and efficiency. It uses airborne camera equipment to photograph the power equipment in the transmission line, and then manually identifies the inspection image to determine whether there is a fault. However, inspection images have the characteristics of big data with large volume and low value density, and manual interpretation is prone to misjudgments and missed judgments due to visual fatigue. After the introduction of deep learning, intelligent inspection is possible through the combination of computer vision technology, image processing technology and computing hardware.

基于深度学习的目标检测算法在特征提取模块中使用卷积神经网络,并使用显卡和批处理(Batch Size)进行加速训练。按实现机理可分为双阶段检测算法和单阶段检测算法。双阶段检测算法又称为基于区域提名的目标检测算法(Object Detection Based onRegional Proposal)。在检测时先生成目标候选域,再对候选域预测分类识别目标。经典算法有:Faster R-CNN、SPPNet等。单阶段检测算法又称为基于端对端的目标检测算法(Object Detection Based on End to End Learning)。网络在检测时不需要生成候选区域便可完成检测,即网络直接输出预测物体的空间坐标和类别信息。单阶段检测算法基于边界框的回归,是一个“一步到位”的过程。单阶段检测网络在产生候选框的同时进行分类和边界框回归,特点是速度快但精度稍逊。The deep learning-based target detection algorithm uses a convolutional neural network in the feature extraction module, and uses graphics card and batch size (Batch Size) for accelerated training. According to the realization mechanism, it can be divided into two-stage detection algorithm and single-stage detection algorithm. The two-stage detection algorithm is also called the Object Detection Based on Regional Proposal (Object Detection Based on Regional Proposal). During detection, the target candidate domain is generated first, and then the candidate domain is predicted and classified to identify the target. Classic algorithms include: Faster R-CNN, SPPNet, etc. The single-stage detection algorithm is also known as the Object Detection Based on End to End Learning (Object Detection Based on End to End Learning). The network can complete the detection without generating candidate regions during detection, that is, the network directly outputs the spatial coordinates and category information of the predicted object. The single-stage detection algorithm is based on the regression of the bounding box, which is a "one-step" process. The single-stage detection network performs classification and bounding box regression while generating candidate boxes, which is characterized by fast speed but less accuracy.

基于深度学习的绝缘子检测方法相比于传统图像处理方法,其检测精度有了大幅提升,并且具有较强的泛化能力,但是仍无法满足实际绝缘子巡检工作在检测精度方面的需求,另外检测速度损耗严重,也无法满足绝缘子缺陷检测速度上的需求。Compared with the traditional image processing method, the insulator detection method based on deep learning has greatly improved the detection accuracy and has strong generalization ability, but it still cannot meet the detection accuracy requirements of the actual insulator inspection work. The speed loss is serious, and it cannot meet the demand for the speed of insulator defect detection.

发明内容SUMMARY OF THE INVENTION

针对绝缘子检测方法的准确性及速度存在的问题,本发明提供一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法。Aiming at the problems existing in the accuracy and speed of the insulator detection method, the present invention provides a rapid detection method of the insulator state based on the lightweight YOLOv5 model.

为解决上述技术问题,本发明采用如下技术方案:In order to solve the above-mentioned technical problems, the present invention adopts the following technical solutions:

一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:包括如下步骤:A method for rapidly detecting the state of an insulator based on a lightweight YOLOv5 model, characterized in that it includes the following steps:

步骤1、采集绝缘子图像形成数据集;Step 1. Collect insulator images to form a data set;

步骤2、使用LabelImg标注工具对数据集进行标注;Step 2. Use the LabelImg labeling tool to label the dataset;

步骤3、对所采集的图像进行数据增强处理,扩充数据集;Step 3, performing data enhancement processing on the collected images to expand the data set;

步骤4、引入轻量化网络ShuffleNetV2-Stem作为YOLOv5的主干网络,对YOLOv5模型进行轻量化改进,构成YOLOv5-ShuffleNetV2S模型;Step 4. Introduce the lightweight network ShuffleNetV2-Stem as the backbone network of YOLOv5, and make lightweight improvements to the YOLOv5 model to form the YOLOv5-ShuffleNetV2S model;

步骤5、在轻量化YOLOv5模型的特征融合网络中增加小目标检测层;Step 5. Add a small target detection layer to the feature fusion network of the lightweight YOLOv5 model;

步骤6、优化损失函数,将CIoU作为轻量化YOLOv5模型的损失函数;Step 6. Optimize the loss function and use CIoU as the loss function of the lightweight YOLOv5 model;

步骤7、训练改进后的网络,设置学习率、批次大小、训练总轮次作为训练参数,对轻量化的YOLOv5模型进行训练;Step 7. Train the improved network, set the learning rate, batch size, and total training rounds as training parameters, and train the lightweight YOLOv5 model;

步骤8、将收集的绝缘子图像数据集输入训练好的YOLOv5模型,得到输入图片中是否存在有缺陷的绝缘子以及该缺陷所在位置。Step 8. Input the collected insulator image data set into the trained YOLOv5 model to obtain whether there is a defective insulator in the input image and the location of the defect.

进一步的,所述步骤1中绝缘子图像数据集包含有缺陷的绝缘子图像和完整绝缘子图像。Further, in the step 1, the insulator image dataset includes defective insulator images and complete insulator images.

进一步的,所述步骤2中对数据集进行标注,得到符合VOC数据格式的xml文件,xml文件内容包括图像名称、图像路径、图像的高/宽度以及真实框中心点位置与宽/高信息。Further, in the step 2, the data set is marked to obtain an xml file conforming to the VOC data format, and the content of the xml file includes the image name, image path, image height/width, and the position and width/height information of the center point of the real frame.

进一步的,所述步骤3通过自适应对比度、旋转、随机灰度变化、平移、裁剪、颜色通道标准化、Mixup中一项或多项数据增强方法对数据集进行扩充。Further, the step 3 expands the data set by one or more data enhancement methods in adaptive contrast, rotation, random grayscale change, translation, cropping, color channel normalization, and Mixup.

进一步的,所述Mixup数据增强方法的具体公式为:Further, the concrete formula of described Mixup data enhancement method is:

x=λxi+(1-λ)xj x=λx i +(1-λ)x j

y=λyi+(1-λ)yj y=λy i +(1-λ)y j

λ=Beta(α,β)。λ=Beta(α,β).

进一步的,所述步骤4中轻量化改进后的YOLOv5模型为YOLOv5-ShuffleNetV2S模型,所述YOLOv5-ShuffleNetV2S模型由主干网络、特征融合网络和检测网络组成;所述主干网络由ShuffleNetv2和Stem组成;所述特征融合网络由CBL、CSP、Upsampling和add组成。Further, the lightweight and improved YOLOv5 model in the step 4 is the YOLOv5-ShuffleNetV2S model, and the YOLOv5-ShuffleNetV2S model is composed of a backbone network, a feature fusion network and a detection network; the backbone network is composed of ShuffleNetv2 and Stem; The above feature fusion network consists of CBL, CSP, Upsampling and add.

进一步的,所述ShuffleNet2网络引入了分组卷积与通道混洗,主要由两个基本单元模块组成;一个单元保持输出通道数与输入通道数相同。另一个单元为一个下采样模块,减小特征图维度;Stem模块其中一个分支引入了瓶颈层,将通道数量减少,再进行下采样,另一分支将原始输入进行最大值池化再进行拼接;轻量化ShuffleNetV2与Stem模块进行重构,作为YOLOv5的主干网络。Further, the ShuffleNet2 network introduces grouped convolution and channel shuffling, which is mainly composed of two basic unit modules; one unit keeps the same number of output channels as the number of input channels. The other unit is a downsampling module, which reduces the dimension of the feature map; one of the branches of the Stem module introduces a bottleneck layer, reduces the number of channels, and then performs downsampling, and the other branch performs maximum pooling on the original input before splicing; The lightweight ShuffleNetV2 and Stem modules are reconstructed as the backbone network of YOLOv5.

进一步的,所述步骤5中增加的小目标检测层为对原始输入图片增加的4倍下采样的过程。Further, the small object detection layer added in the step 5 is a process of adding 4 times downsampling to the original input picture.

进一步的,所述步骤6中将CIoU作为轻量化YOLOv5模型的损失函数,Further, in the step 6, CIoU is used as the loss function of the lightweight YOLOv5 model,

其中从重叠面积、中心点距离、长宽比三个方面更好地描述目标框的回归,其计算式为:Among them, the regression of the target frame is better described in terms of overlapping area, center point distance, and aspect ratio. The calculation formula is:

Figure BDA0003742505970000041
Figure BDA0003742505970000041

Figure BDA0003742505970000042
Figure BDA0003742505970000042

Figure BDA0003742505970000043
Figure BDA0003742505970000043

进一步的,所述步骤7中训练轻量化YOLOv5模型包括以下步骤:Further, training the lightweight YOLOv5 model in step 7 includes the following steps:

a、网络训练时,输入图像分辨率为640×640,在depth_multipl=0.33,width_multiple=0.50的轻量化的YOLOv5模型上进行训练;a. During network training, the input image resolution is 640×640, and training is performed on the lightweight YOLOv5 model with depth_multipl=0.33 and width_multiple=0.50;

b、采用Adam优化器,初始学习率为0.001,将模型训练的批大小设置为16,训练总轮次设置为500次;b. Using the Adam optimizer, the initial learning rate is 0.001, the batch size of model training is set to 16, and the total number of training rounds is set to 500 times;

c、训练完成后,将得到的识别模型的权值文件保存,并利用测试集对模型的性能进行评价;c. After the training is completed, save the weight file of the obtained recognition model, and use the test set to evaluate the performance of the model;

d、改进的模型最终输出识别出绝缘子及其缺陷的位置框和相应类别的置信度。d. The final output of the improved model identifies the position box of the insulator and its defects and the confidence of the corresponding category.

与现有技术相比,所提出的技术将Stem模块与ShuffleNetV2进行重构,增强提取图像特征信息的能力,并用重构的ShuffleNetV2-Stem网络代替原始YOLOv5的C3Net作为backbone,显著减小了网络的参数量和计算量,使用Mixup数据增强、CIoU损失函数,增加小目标检测层,增强网络对绝缘子缺陷的感知能力,提升网络的检测精度,最后将其应用到自制绝缘子数据集进行验证,实现了检测模型的轻量化。Compared with the existing technology, the proposed technology reconstructs the Stem module and ShuffleNetV2 to enhance the ability to extract image feature information, and replaces the original YOLOv5 C3Net with the reconstructed ShuffleNetV2-Stem network as the backbone, which significantly reduces the network size. The amount of parameters and calculations, using Mixup data enhancement, CIoU loss function, adding a small target detection layer, enhancing the network's ability to perceive insulator defects, improving the detection accuracy of the network, and finally applying it to the self-made insulator data set for verification. Lightweight detection model.

附图说明Description of drawings

图1为本发明轻量化改进YOLOv5的网络结构。Figure 1 shows the network structure of the lightweight and improved YOLOv5 of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.

需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。It should be noted that the embodiments of the present invention and the features of the embodiments may be combined with each other under the condition of no conflict.

下面结合具体实施例对本发明作进一步说明,但不作为本发明的限定。The present invention will be further described below in conjunction with specific embodiments, but not as a limitation of the present invention.

为了解决绝缘子状态检测准确率低且检测网络参数量和计算量大的问题,本实施例在现有YOLOv5模型上进行轻量化改进,使得在绝缘子缺陷的检测方面在保持检测精度的前提下,实现了检测模型的轻量化。首先收集绝缘子及其缺陷的航拍图片,将数据集进行数据扩展,制作本实验的绝缘子数据集,然后对网络进行改进,主要修改了网络的损失函数,主干网络以及融合网络,轻量化改进YOLOv5模型的网络结构如图1所示。其次,将扩展后的数据集对改进后的网络进行训练。最后,根据实验结果调整网络参数。In order to solve the problems of low accuracy of insulator state detection and large amount of detection network parameters and calculations, this embodiment makes a lightweight improvement on the existing YOLOv5 model, so that the detection of insulator defects can be achieved on the premise of maintaining the detection accuracy. Lightweight detection model. First, collect aerial photos of insulators and their defects, expand the data set, and make the insulator data set of this experiment, and then improve the network, mainly modify the loss function of the network, the backbone network and the fusion network, and improve the YOLOv5 model with light weight The network structure is shown in Figure 1. Second, the improved network is trained on the expanded dataset. Finally, the network parameters are adjusted according to the experimental results.

如图1所示,轻量化改进YOLOv5模型的网络首先对绝缘子样本图片进行处理,得到固定尺寸的三通道图片,输入到Stem模块中处理,以防止信息过度丢失,并完成减少参数量的工作。紧接着进入ShuffleNetv2模块进一步减少模型计算量,提高运行速度。此时,改进网络的主干部分的重构完成,相较于原始YOLOv5模型,改进网络的主干部分更符合轻量化的需求。在特征融合网络,增加了一个小目标检测层,以平衡绝缘子样本照片中目标远近不一的情况,提高远处小目标的检测精度。与此对应,在输出部分相应地增加了一个小目标检测头,以完成小目标锚框的绘制。改进后的特征融合网络具有较好的特征融合能力,新增小目标检测层的特征图感受野较小,具有相对丰富的位置信息,能够提升模型对小目标的检测精度。实验结果表明,采用轻量化YOLOv5在保持检测精度的前提下,实现了检测模型的轻量化。As shown in Figure 1, the network of the lightweight improved YOLOv5 model first processes the insulator sample image to obtain a three-channel image of a fixed size, which is input to the Stem module for processing to prevent excessive loss of information and complete the work of reducing the amount of parameters. Then enter the ShuffleNetv2 module to further reduce the amount of model calculation and improve the running speed. At this time, the reconstruction of the backbone part of the improved network is completed. Compared with the original YOLOv5 model, the backbone part of the improved network is more in line with the requirements of lightweight. In the feature fusion network, a small target detection layer is added to balance the difference in the distance of the target in the photo of the insulator sample, and improve the detection accuracy of small targets in the distance. Correspondingly, a small target detection head is correspondingly added to the output part to complete the drawing of the small target anchor frame. The improved feature fusion network has better feature fusion ability, the feature map receptive field of the newly added small target detection layer is small, and it has relatively rich position information, which can improve the detection accuracy of the model for small targets. The experimental results show that the use of lightweight YOLOv5 achieves the lightweight of the detection model on the premise of maintaining the detection accuracy.

本实施例是通过以下技术方案来实现的,一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,包括以下步骤:The present embodiment is implemented by the following technical solutions, a method for rapid detection of insulator states based on a lightweight YOLOv5 model, comprising the following steps:

1、采集绝缘子图像数据集,包含有缺陷的绝缘子图像和完整绝缘子图像。1. Collect insulator image datasets, including defective insulator images and complete insulator images.

2、使用LabelImg标注工具对数据集进行标注,标注类别为绝缘子和缺陷。2. Use the LabelImg labeling tool to label the dataset, and label the categories as insulators and defects.

3、对所采集的图像进行数据增强处理,扩充数据集。3. Perform data enhancement processing on the collected images to expand the data set.

4、引入轻量化网络ShuffleNetV2-Stem作为YOLOv5的主干网络,对YOLOv5模型进行轻量化改进,构成YOLOv5-ShuffleNetV2S模型。4. The lightweight network ShuffleNetV2-Stem is introduced as the backbone network of YOLOv5, and the YOLOv5 model is lightweight and improved to form the YOLOv5-ShuffleNetV2S model.

由于移动端平台的计算能力和内存资源有限,GPU的性能远远低于PC端,前者的性能至少比后者低1/10。为了满足移动端和嵌入式平台的应用需求,一些轻量级的卷积神经网络如MobileNet和ShuffleNet等被提出,研究人员对这些轻量级的卷积模型进行了改进,使其在精度和速度之间作了很好的平衡。所以为了实现模型的轻量化,就需要对YOLOv5模型结构进行相应的调整和改进。原始YOLOv5模型中的主干网络C3PNet参数量大,模型占用内存量较大,计算复杂度高,对硬件的计算能力需求大。针对上述问题,本文提出采用轻量化网络ShuffleNetV2-stem来代替YOLOv5模型中的主干网络C3Net。ShuffleNetV2是一种在ShuffleNetV1及MobileNetV2基础上通过分析两者缺陷进行改进的轻量化网络,具有精度高、速度快的优点。将轻量化ShuffleNetV2-Stem网络集成到YOLOv5模型中构成YOLOv5-ShuffleNetV2S模型,完成YOLOv5模型的轻量化改进。YOLOv5-ShuffleNetV2S模型能够在满足检测精度的同时减少了网络的参数量和计算量,提高模型的检测速度,保证模型准确度与检测速度之间的均衡,最小化网络模型的体积,降低模型对硬件的计算能力需求。Due to the limited computing power and memory resources of the mobile platform, the performance of the GPU is far lower than that of the PC, and the performance of the former is at least 1/10 lower than that of the latter. In order to meet the application requirements of mobile terminals and embedded platforms, some lightweight convolutional neural networks such as MobileNet and ShuffleNet have been proposed. Researchers have improved these lightweight convolutional models to make them better in accuracy and speed. There is a good balance between. Therefore, in order to achieve the lightweight of the model, it is necessary to adjust and improve the YOLOv5 model structure accordingly. The backbone network C3PNet in the original YOLOv5 model has a large amount of parameters, the model occupies a large amount of memory, has high computational complexity, and requires a large amount of hardware computing power. In response to the above problems, this paper proposes to use the lightweight network ShuffleNetV2-stem to replace the backbone network C3Net in the YOLOv5 model. ShuffleNetV2 is a lightweight network improved by analyzing the defects of ShuffleNetV1 and MobileNetV2, which has the advantages of high accuracy and fast speed. The lightweight ShuffleNetV2-Stem network is integrated into the YOLOv5 model to form the YOLOv5-ShuffleNetV2S model, completing the lightweight improvement of the YOLOv5 model. The YOLOv5-ShuffleNetV2S model can meet the detection accuracy while reducing the amount of parameters and calculation of the network, improve the detection speed of the model, ensure the balance between model accuracy and detection speed, minimize the volume of the network model, and reduce the model to hardware. computing power requirements.

5、在特征融合网络中增加小目标检测层。5. Add a small target detection layer to the feature fusion network.

YOLOv5模型的小目标检测效果不佳,其中一个原因是在绝缘子缺陷检测中,大部分缺陷检测目标占整幅图像的比例较小,而YOLOv5模型的下采样倍数比较大,较深的特征图很难学习到小目标的特征信息。因此,本发明在轻量化YOLOv5模型主干网络的基础上对原始输入图片增加一个4倍下采样的过程,即增加小目标检测层,通过增加小目标检测层对较浅特征图与深特征图拼接后进行检测。原始图片经过4倍下采样后送入到特征融合网络得到新尺寸的特征图,该特征图感受野较小,位置信息相对丰富,可以提升检测小目标的检测效果。The small target detection effect of the YOLOv5 model is not good. One of the reasons is that in the insulator defect detection, most of the defect detection targets account for a small proportion of the entire image, while the downsampling multiple of the YOLOv5 model is relatively large, and the deeper feature maps are very large. It is difficult to learn the feature information of small targets. Therefore, the present invention adds a 4-fold downsampling process to the original input image on the basis of the lightweight YOLOv5 model backbone network, that is, adds a small target detection layer, and splices the shallower feature map and the deep feature map by adding a small target detection layer. Check later. The original image is downsampled by 4 times and then sent to the feature fusion network to obtain a feature map of a new size. The feature map has a small receptive field and relatively rich location information, which can improve the detection effect of detecting small targets.

6、优化损失函数。6. Optimize the loss function.

将CIoU作为轻量化改进YOLOv5算法的bounding-box损失函数LossCIoU。CIOU将真实框与预测框之间的距离、重叠率、尺度以及惩罚项都考虑进去,使得预测框回归变得更加稳定,不会像其他损失函数一样出现训练过程中发散等问题,而惩罚因子把预测框长宽比拟合目标框的长宽比考虑进去,从而使模型能够更快更好的收敛。Use CIoU as the bounding-box loss function LossCIoU of the lightweight improved YOLOv5 algorithm. CIOU takes into account the distance, overlap rate, scale and penalty term between the real frame and the predicted frame, so that the regression of the predicted frame becomes more stable, and there will be no problems such as divergence in the training process like other loss functions, and the penalty factor The aspect ratio of the prediction box is taken into account to fit the aspect ratio of the target box, so that the model can converge faster and better.

7、训练改进后的网络,设置学习率、批次大小、训练总轮次作为训练参数,对轻量化改进的YOLOv5模型进行训练;7. Train the improved network, set the learning rate, batch size, and total training rounds as training parameters, and train the lightweight and improved YOLOv5 model;

8、将收集的绝缘子图像数据集输入训练好的YOLOv5模型,得到输入图片中是否存在有缺陷的绝缘子以及该缺陷所在位置。8. Input the collected insulator image dataset into the trained YOLOv5 model to get whether there is a defective insulator in the input image and the location of the defect.

基于轻量化YOLOv5的绝缘子缺陷检测方法的具体实施例说明:Description of specific embodiments of the insulator defect detection method based on lightweight YOLOv5:

一、首先,采集绝缘子图像形成数据集。本实施例使用的绝缘子缺陷数据集包括瓷质绝缘子281张,复合绝缘子413张,共694张图片。由于已有的数据集图片较少,且没有目标信息,难以完成目标检测的任务,故对已有数据集进行扩充、标注等预处理操作是十分必要的。在数据集进入网络模型训练前对其进行标注,得到符合VOC数据格式的xml文件,xml文件内容包括图像名称、图像路径、图像的高/宽度以及真实框中心点位置与宽/高等信息。然后,通过自适应对比度、旋转、随机灰度变化、平移、裁剪、颜色通道标准化、Mixup等方法对数据集进行扩充。其中,Mixup多样本数据增强为提高网络对遮挡和重叠目标的辨别能力以及模型的泛化能力,是一种基于邻域风险原则的数据增强方法,该算法利用线性插值的方式对两个样本和标签进行混合,即从数据集中随机抽取两张样本,将两张样本的像素值按照一定的权重进行加权求和,两张样本对应的标签以同样的比例进行加权求和,从而在一定程度上扩展训练数据的分布空间,使模型的泛化能力得到提高。具体公式如下:1. First, collect insulator images to form a dataset. The insulator defect dataset used in this example includes 281 porcelain insulators and 413 composite insulators, with a total of 694 images. Since the existing data set has few pictures and no target information, it is difficult to complete the task of target detection. Therefore, it is necessary to perform preprocessing operations such as expansion and labeling of the existing data set. Annotate the data set before it enters the network model training, and obtain an xml file that conforms to the VOC data format. The content of the xml file includes the image name, image path, image height/width, and the position and width/height of the center point of the real box. Then, the dataset is augmented by methods such as adaptive contrast, rotation, random grayscale change, translation, cropping, color channel normalization, Mixup, etc. Among them, Mixup multi-sample data enhancement is a data enhancement method based on the principle of neighborhood risk to improve the network's ability to distinguish occluded and overlapping targets and the generalization ability of the model. The labels are mixed, that is, two samples are randomly selected from the data set, the pixel values of the two samples are weighted and summed according to a certain weight, and the labels corresponding to the two samples are weighted and summed in the same proportion, so that to a certain extent Expand the distribution space of training data to improve the generalization ability of the model. The specific formula is as follows:

x=λxi+(1-λ)xj x=λx i +(1-λ)x j

y=λyi+(1-λ)yj y=λy i +(1-λ)y j

λ=Beta(α,β)λ=Beta(α,β)

其中,(xi,yi)和(xj,yj)是从训练数据中随机抽取的两张样本,x为生成的混合图片,y为生成的混合标签。λ为权重,范围在0到1之间,服从Beta(α,β)分布。Among them, (x i , y i ) and (x j , y j ) are two samples randomly selected from the training data, x is the generated mixed image, and y is the generated mixed label. λ is the weight, ranging from 0 to 1, and obeys the Beta(α,β) distribution.

二、如图1所示,对YOLOv5模型进行轻量化改进,轻量化改进的YOLOv5模型由主干网络、特征融合网络和检测网络组成。主干网络由ShuffleNetv2和Stem组成。特征融合网络由CBL、CSP、Upsampling和add组成。为了检测目标的位置和类别,需要从图像中提取特征,主干网络进行定位和分类来捕获特征;特征融合网络通过主干网络的初始输出特征,融合特征,适应大小,从而提高体系结构的整体性能;检测网络接收特征融合网络的输出,输出的每个特征映射输出层的包围盒位置、对象置信度和对象类别的预测。2. As shown in Figure 1, the YOLOv5 model is lightweight and improved. The lightweight and improved YOLOv5 model consists of a backbone network, a feature fusion network and a detection network. The backbone network consists of ShuffleNetv2 and Stem. The feature fusion network consists of CBL, CSP, Upsampling and add. In order to detect the location and category of the target, it is necessary to extract features from the image, and the backbone network performs positioning and classification to capture the features; the feature fusion network uses the initial output features of the backbone network, fuses the features, and adapts to the size, thereby improving the overall performance of the architecture; The detection network receives the output of the feature fusion network, and each output feature maps the bounding box position, object confidence and object class prediction of the output layer.

其中,为了降低模型的计算复杂度,在保证准确度的同时满足将模型搭载至移动端设备的轻量化需求,本实施例以YOLOv5模型为基础,提出ShuffleNetv2-Stem模型对YOLOv5主干网络进行轻量化改进。ShuffleNet2网络引入了分组卷积(Group convolution,GC)与通道混洗(Channelshuffle,CS)操作来降低网络运算中的计算量,使其可以搭载至移动端设备。ShuffleNetv2网络主要由两个基本单元模块组成,单元1保证输出通道数与输入通道数相同,达到提高速度的目的。单元2是一个下采样模块,主要起减小特征图维度的作用,从而进一步减少了网络模型的计算量。Among them, in order to reduce the computational complexity of the model and ensure the accuracy while meeting the lightweight requirements for carrying the model to mobile devices, this embodiment uses the YOLOv5 model as the basis, and proposes the ShuffleNetv2-Stem model to lighten the YOLOv5 backbone network. Improve. The ShuffleNet2 network introduces Group convolution (GC) and Channel shuffle (CS) operations to reduce the amount of computation in network operations so that it can be mounted on mobile devices. The ShuffleNetv2 network is mainly composed of two basic unit modules. Unit 1 ensures that the number of output channels is the same as the number of input channels, so as to improve the speed. Unit 2 is a down-sampling module, which mainly plays the role of reducing the dimension of the feature map, thereby further reducing the computational load of the network model.

Stem模块增加了输入图像空间维度的通道数,进行了第一次降采样任务,可以丰富特征层保持较强的绝缘子图像特征表达能力,不增加额外的计算量,是一个代价较小的模块。Stem模块减少参数量的最主要操作就是在其中一个分支引入了瓶颈层,先将通道数量减少,再进行下采样,另一分支将原始输入进行最大值池化再进行拼接,目的是将输入中的部分信息进行传递,保证最终的结果在减少参数量的基础上仍具备足够的语义信息,不会造成信息的过度损失。将轻量化ShuffleNetV2与Stem模块进行重构,重构的网络集成到YOLOv5模型中构成YOLOv5-ShuffleNetV2S模型。The Stem module increases the number of channels in the spatial dimension of the input image, and performs the first downsampling task, which can enrich the feature layer and maintain a strong feature expression ability of the insulator image without adding additional computational load. It is a low-cost module. The main operation of the Stem module to reduce the amount of parameters is to introduce a bottleneck layer in one of the branches. First, the number of channels is reduced, and then downsampling is performed. Part of the information is transmitted to ensure that the final result still has enough semantic information on the basis of reducing the amount of parameters, and will not cause excessive loss of information. The lightweight ShuffleNetV2 and Stem modules are reconstructed, and the reconstructed network is integrated into the YOLOv5 model to form the YOLOv5-ShuffleNetV2S model.

其次在特征融合网络部分增加一个4倍下采样的过程,通过增加小目标检测层对较浅特征图与深特征图拼接后进行检测。原始图片经过4倍下采样后送入到特征融合网络得到新尺寸的特征图,该特征图感受野较小,位置信息相对丰富,可以提升检测小目标的检测效果。Secondly, a 4-fold downsampling process is added to the feature fusion network part, and the shallow feature map and the deep feature map are spliced by adding a small target detection layer for detection. The original image is downsampled by 4 times and then sent to the feature fusion network to obtain a feature map of a new size. The feature map has a small receptive field and relatively rich location information, which can improve the detection effect of detecting small targets.

三、为了进一步弥补轻量化所带来的精度损失,在ShuffleNetV2-Stem以及加入小目标检测层基础上,将损失函数修改为CIoU损失函数。将所改进的模型应用到自制绝缘子数据集上进行测验。3. In order to further make up for the loss of accuracy caused by lightweight, based on ShuffleNetV2-Stem and adding a small target detection layer, the loss function is modified to a CIoU loss function. The improved model is applied to the self-made insulator dataset for testing.

原始YOLOv5中使用GIoU来计算定位损失:与原始IoU不同,GIoU不仅关注真实框与预测框之间的重叠面积,还关注其他的非重叠区域,因此GIoU相较于原始IoU能更好的反应两者之间的重合度,但GIoU始终只考虑真实框与预测框之间的重叠率这一个因素,不能很好地描述目标框的回归问题。当预测框在真实框内部时,且预测框的大小相同时,此时GIoU会退化为IoU,无法区分各个预测框之间的位置关系。选择CIoU替代GIoU作为目标框回归的损失函数,从重叠面积、中心点距离、长宽比三个方面更好地描述目标框的回归,其计算式为:The original YOLOv5 uses GIoU to calculate the localization loss: Unlike the original IoU, GIoU not only pays attention to the overlapping area between the real box and the predicted box, but also pays attention to other non-overlapping areas, so GIoU can better reflect the two However, GIoU always only considers the overlap rate between the real box and the predicted box, which cannot well describe the regression problem of the target box. When the prediction frame is inside the real frame and the size of the prediction frame is the same, GIoU will degenerate into IoU, and the positional relationship between the prediction frames cannot be distinguished. Select CIoU instead of GIoU as the loss function of the target frame regression, and better describe the regression of the target frame from three aspects: overlapping area, center point distance, and aspect ratio. The calculation formula is:

Figure BDA0003742505970000111
Figure BDA0003742505970000111

Figure BDA0003742505970000112
Figure BDA0003742505970000112

Figure BDA0003742505970000113
Figure BDA0003742505970000113

四、轻量化改进的YOLOv5模型进行训练,输入图像分辨率为640×640,在depth_multipl=0.33,width_multiple=0.50的轻量化改进的YOLOv5模型上进行训练;采用Adam优化器,初始学习率为0.001,将模型训练的批大小设置为16,训练总轮次设置为500次;训练完成后,将得到的识别模型的权值文件保存,并利用测试集对模型的性能进行评价;轻量化改进YOLOv5模型最终输出识别出绝缘子及其缺陷的位置框和相应类别的置信度。Fourth, the lightweight and improved YOLOv5 model is trained. The input image resolution is 640×640, and the training is performed on the lightweight and improved YOLOv5 model with depth_multipl=0.33 and width_multiple=0.50; Adam optimizer is used, and the initial learning rate is 0.001. The batch size of model training is set to 16, and the total number of training rounds is set to 500 times; after the training is completed, save the obtained weight file of the recognition model, and use the test set to evaluate the performance of the model; lightweight and improve the YOLOv5 model The final output identifies the location box of the insulator and its defects and the confidence of the corresponding class.

最终将收集的绝缘子图像数据集输入训练好的YOLOv5模型,得到输入图片中是否存在有缺陷的绝缘子以及该缺陷所在位置。Finally, the collected insulator image dataset is input into the trained YOLOv5 model to get whether there is a defective insulator in the input image and the location of the defect.

Claims (10)

1.一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:包括如下步骤:1. a kind of insulator state rapid detection method based on lightweight YOLOv5 model, is characterized in that: comprise the steps: 步骤1、采集绝缘子图像形成数据集;Step 1. Collect insulator images to form a data set; 步骤2、使用LabelImg标注工具对数据集进行标注;Step 2. Use the LabelImg labeling tool to label the dataset; 步骤3、对所采集的图像进行数据增强处理,扩充数据集;Step 3, performing data enhancement processing on the collected images to expand the data set; 步骤4、引入轻量化网络ShuffleNetV2-Stem作为YOLOv5的主干网络,对YOLOv5模型进行轻量化改进,构成YOLOv5-ShuffleNetV2S模型;Step 4. Introduce the lightweight network ShuffleNetV2-Stem as the backbone network of YOLOv5, and make lightweight improvements to the YOLOv5 model to form the YOLOv5-ShuffleNetV2S model; 步骤5、在轻量化的YOLOv5模型的特征融合网络中增加小目标检测层;Step 5. Add a small target detection layer to the feature fusion network of the lightweight YOLOv5 model; 步骤6、优化损失函数,将CIoU作为轻量化YOLOv5模型的损失函数;Step 6. Optimize the loss function and use CIoU as the loss function of the lightweight YOLOv5 model; 步骤7、训练改进后的网络,设置学习率、批次大小、训练总轮次作为训练参数,对轻量化的YOLOv5模型进行训练;Step 7. Train the improved network, set the learning rate, batch size, and total training rounds as training parameters, and train the lightweight YOLOv5 model; 步骤8、将收集的绝缘子图像数据集输入训练好的轻量化YOLOv5模型,得到输入图片中是否存在有缺陷的绝缘子以及该缺陷所在位置。Step 8. Input the collected insulator image data set into the trained lightweight YOLOv5 model to obtain whether there is a defective insulator in the input image and the location of the defect. 2.根据权利要求1所述一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:所述步骤1中绝缘子图像数据集包含有缺陷的绝缘子图像和完整绝缘子图像。2 . The method for rapid detection of insulator states based on a lightweight YOLOv5 model according to claim 1 , wherein in the step 1, the insulator image data set includes a defective insulator image and a complete insulator image. 3 . 3.根据权利要求1所述一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:所述步骤2中对数据集进行标注,得到符合VOC数据格式的xml文件,xml文件内容包括图像名称、图像路径、图像的高/宽度以及真实框中心点位置与宽/高信息。3. a kind of insulator state rapid detection method based on lightweight YOLOv5 model according to claim 1, is characterized in that: in described step 2, the data set is marked, obtains the xml file that accords with VOC data format, and the content of xml file comprises Image name, image path, image height/width, and ground truth box center point position and width/height information. 4.根据权利要求1所述一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:所述步骤3通过自适应对比度、旋转、随机灰度变化、平移、裁剪、颜色通道标准化、Mixup中一项或多项数据增强方法对数据集进行扩充。4. a kind of insulator state rapid detection method based on lightweight YOLOv5 model according to claim 1, is characterized in that: described step 3 is through adaptive contrast, rotation, random grayscale change, translation, cropping, color channel standardization, One or more data augmentation methods in Mixup augment the dataset. 5.根据权利要求4所述一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:所述Mixup数据增强方法的具体公式为:5. a kind of insulator state rapid detection method based on lightweight YOLOv5 model according to claim 4, is characterized in that: the concrete formula of described Mixup data enhancement method is: x=λxi+(1-λ)xj x=λx i +(1-λ)x j y=λyi+(1-λ)yj y=λy i +(1-λ)y j λ=Beta(α,β)。λ=Beta(α,β). 6.根据权利要求1所述一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:所述步骤4中轻量化改进后的YOLOv5模型为YOLOv5-ShuffleNetV2S模型,所述YOLOv5-ShuffleNetV2S模型由主干网络、特征融合网络和检测网络组成;所述主干网络由ShuffleNetv2和Stem组成;所述特征融合网络由CBL、CSP、Upsampling和add组成。6. a kind of insulator state rapid detection method based on lightweight YOLOv5 model according to claim 1, is characterized in that: the YOLOv5 model after the lightweight improvement in described step 4 is YOLOv5-ShuffleNetV2S model, described YOLOv5-ShuffleNetV2S model It consists of a backbone network, a feature fusion network and a detection network; the backbone network consists of ShuffleNetv2 and Stem; the feature fusion network consists of CBL, CSP, Upsampling and add. 7.根据权利要求6所述一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:所述ShuffleNet2网络引入了分组卷积与通道混洗,主要由两个基本单元模块组成;一个单元保持输出通道数与输入通道数相同。另一个单元为一个下采样模块,减小特征图维度;Stem模块其中一个分支引入了瓶颈层,将通道数量减少,再进行下采样,另一分支将原始输入进行最大值池化再进行拼接;轻量化ShuffleNetV2与Stem模块进行重构,作为YOLOv5的主干网络。7. A kind of fast detection method of insulator state based on lightweight YOLOv5 model according to claim 6, it is characterized in that: described ShuffleNet2 network has introduced packet convolution and channel shuffling, and is mainly composed of two basic unit modules; a The unit maintains the same number of output channels as the number of input channels. The other unit is a downsampling module, which reduces the dimension of the feature map; one of the branches of the Stem module introduces a bottleneck layer, reduces the number of channels, and then performs downsampling, and the other branch performs maximum pooling on the original input before splicing; The lightweight ShuffleNetV2 and Stem modules are reconstructed as the backbone network of YOLOv5. 8.根据权利要求1所述一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:所述步骤5中增加的小目标检测层为对原始输入图片增加的4倍下采样的过程。8. A kind of fast detection method of insulator state based on lightweight YOLOv5 model according to claim 1, it is characterized in that: the small target detection layer added in the described step 5 is the process of increasing 4 times of downsampling to the original input picture . 9.根据权利要求1所述一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:所述步骤6中将CIoU作为轻量化YOLOv5模型的损失函数,9. A kind of insulator state rapid detection method based on lightweight YOLOv5 model according to claim 1, is characterized in that: in described step 6, CIoU is used as the loss function of lightweight YOLOv5 model, 其中从重叠面积、中心点距离、长宽比三个方面更好地描述目标框的回归,其计算式为:Among them, the regression of the target frame is better described in terms of overlapping area, center point distance, and aspect ratio. The calculation formula is:
Figure FDA0003742505960000031
Figure FDA0003742505960000031
Figure FDA0003742505960000032
Figure FDA0003742505960000032
Figure FDA0003742505960000033
Figure FDA0003742505960000033
10.根据权利要求1所述一种基于轻量化YOLOv5模型的绝缘子状态快速检测方法,其特征在于:所述步骤7中训练轻量化YOLOv5模型包括以下步骤:10. A method for rapid detection of insulator states based on a lightweight YOLOv5 model according to claim 1, wherein the training of the lightweight YOLOv5 model in the step 7 comprises the following steps: a、网络训练时,输入图像分辨率为640×640,在depth_multipl=0.33,width_multiple=0.50的轻量化的YOLOv5模型上进行训练;a. During network training, the input image resolution is 640×640, and training is performed on the lightweight YOLOv5 model with depth_multipl=0.33 and width_multiple=0.50; b、采用Adam优化器,初始学习率为0.001,将模型训练的批大小设置为16,训练总轮次设置为500次;b. Using the Adam optimizer, the initial learning rate is 0.001, the batch size of model training is set to 16, and the total number of training rounds is set to 500 times; c、训练完成后,将得到的识别模型的权值文件保存,并利用测试集对模型的性能进行评价;c. After the training is completed, save the weight file of the obtained recognition model, and use the test set to evaluate the performance of the model; d、改进的模型最终输出识别出绝缘子及其缺陷的位置框和相应类别的置信度。d. The final output of the improved model identifies the position box of the insulator and its defects and the confidence of the corresponding category.
CN202210816209.XA 2022-07-12 2022-07-12 A fast detection method of insulator state based on lightweight YOLOv5 model Pending CN115147383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210816209.XA CN115147383A (en) 2022-07-12 2022-07-12 A fast detection method of insulator state based on lightweight YOLOv5 model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210816209.XA CN115147383A (en) 2022-07-12 2022-07-12 A fast detection method of insulator state based on lightweight YOLOv5 model

Publications (1)

Publication Number Publication Date
CN115147383A true CN115147383A (en) 2022-10-04

Family

ID=83411412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210816209.XA Pending CN115147383A (en) 2022-07-12 2022-07-12 A fast detection method of insulator state based on lightweight YOLOv5 model

Country Status (1)

Country Link
CN (1) CN115147383A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115861861A (en) * 2023-02-27 2023-03-28 国网江西省电力有限公司电力科学研究院 Lightweight acceptance method based on unmanned aerial vehicle distribution line inspection
CN116092017A (en) * 2023-04-06 2023-05-09 南京信息工程大学 A method, medium and equipment for identifying dangerous objects at the bottom of a light-weight edge-end vehicle
CN117437190A (en) * 2023-10-18 2024-01-23 湖北汽车工业学院 YOLOv5 s-based aluminum surface defect detection method
CN119444752A (en) * 2025-01-10 2025-02-14 南昌工程学院 A lightweight CGC-YOLO-based insulator defect detection method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113160136A (en) * 2021-03-15 2021-07-23 哈尔滨理工大学 Wood defect identification and segmentation method based on improved Mask R-CNN
CN114022432A (en) * 2021-10-28 2022-02-08 湖北工业大学 Improved yolov 5-based insulator defect detection method
CN114708231A (en) * 2022-04-11 2022-07-05 常州大学 Sugarcane aphid target detection method based on light-weight YOLO v5

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113160136A (en) * 2021-03-15 2021-07-23 哈尔滨理工大学 Wood defect identification and segmentation method based on improved Mask R-CNN
CN114022432A (en) * 2021-10-28 2022-02-08 湖北工业大学 Improved yolov 5-based insulator defect detection method
CN114708231A (en) * 2022-04-11 2022-07-05 常州大学 Sugarcane aphid target detection method based on light-weight YOLO v5

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115861861A (en) * 2023-02-27 2023-03-28 国网江西省电力有限公司电力科学研究院 Lightweight acceptance method based on unmanned aerial vehicle distribution line inspection
CN116092017A (en) * 2023-04-06 2023-05-09 南京信息工程大学 A method, medium and equipment for identifying dangerous objects at the bottom of a light-weight edge-end vehicle
CN117437190A (en) * 2023-10-18 2024-01-23 湖北汽车工业学院 YOLOv5 s-based aluminum surface defect detection method
CN119444752A (en) * 2025-01-10 2025-02-14 南昌工程学院 A lightweight CGC-YOLO-based insulator defect detection method

Similar Documents

Publication Publication Date Title
CN115147383A (en) A fast detection method of insulator state based on lightweight YOLOv5 model
CN110070530A (en) A kind of powerline ice-covering detection method based on deep neural network
CN113515655B (en) A fault identification method and device based on image classification
CN111915565B (en) A real-time analysis method for ceramic bottle cracks in power transmission and transformation lines based on YOLACT algorithm
CN112837281B (en) Pin defect identification method, device and equipment based on cascade convolution neural network
CN111639530B (en) Method and system for detecting and identifying power transmission tower and insulator of power transmission line
CN114612803B (en) Improved CENTERNET transmission line insulator defect detection method
CN115546664A (en) Cascaded network-based insulator self-explosion detection method and system
CN116385911A (en) Lightweight target detection method for unmanned aerial vehicle inspection insulator
CN115222672A (en) High-performance light-weight YOLOv5-3S-4PH insulator defect real-time detection method
CN114529821A (en) Offshore wind power safety monitoring and early warning method based on machine vision
CN116188402A (en) Insulator defect identification method based on improved SSD algorithm
CN114612741A (en) Defect recognition model training method and device, electronic equipment and storage medium
CN112116594A (en) Wind floating foreign matter identification method and device based on semantic segmentation
Liu et al. An improved faster R-CNN for UAV-based catenary support device inspection
CN116403129A (en) A detection method for insulators adapted to complex climatic environments
CN115082798A (en) A method for detecting pin defects in transmission lines based on dynamic receptive field
CN117333665A (en) A road crack segmentation method based on DeepLabv3+
CN116580324A (en) Yolov 5-based unmanned aerial vehicle ground target detection method
CN111931577A (en) Intelligent inspection method for specific foreign matters of power grid line
CN115661932A (en) Fishing behavior detection method
CN117152646B (en) Unmanned electric power inspection AI light-weight large model method and system
CN118941983A (en) An insulator defect detection method based on improved yolov5
CN113947567B (en) Defect detection method based on multitask learning
CN117197530A (en) Insulator defect identification method based on improved YOLOv8 model and cosine annealing learning rate decay method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination