CN114170140A - A Yolov4-based Diaphragm Defect Recognition Method - Google Patents

A Yolov4-based Diaphragm Defect Recognition Method Download PDF

Info

Publication number
CN114170140A
CN114170140A CN202111325709.5A CN202111325709A CN114170140A CN 114170140 A CN114170140 A CN 114170140A CN 202111325709 A CN202111325709 A CN 202111325709A CN 114170140 A CN114170140 A CN 114170140A
Authority
CN
China
Prior art keywords
diaphragm
yolov4
network model
module
defect
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
CN202111325709.5A
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.)
Foshan University
Original Assignee
Foshan University
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 Foshan University filed Critical Foshan University
Priority to CN202111325709.5A priority Critical patent/CN114170140A/en
Publication of CN114170140A publication Critical patent/CN114170140A/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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
    • 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/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

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

Abstract

The invention provides a method for identifying diaphragm defects based on Yolov4, which comprises the following steps: firstly, acquiring diaphragm image data; secondly, marking the defect type by using a marking tool to generate a marking file as a data set; thirdly, clustering a prior frame of the data set by using a clustering algorithm k-means; fourthly, establishing an improved Yolov4 network model, and training the improved Yolov4 network model through a training set; the improved Yolov4 network model adopts a structure of combining low-level characteristic information and high-level characteristic information; CSP structures are added into SPP and PANet of the improved Yolov4 network model, and an attention mechanism is combined to improve the defect detection precision; fifthly, testing the detection performance of the trained improved Yolov4 network model by using a test set; and sixthly, deploying the training model of the optimal improved Yolov4 network model to a diaphragm detection site for diaphragm defect detection. The method has strong robustness, can reduce the omission factor and the false detection rate, and can improve the detection quality of the diaphragm.

Description

Membrane defect identification method based on Yolov4
Technical Field
The invention relates to the technical field of diaphragm detection, in particular to a method for identifying diaphragm defects based on Yolov 4.
Background
The lithium battery is visible everywhere in daily life, such as a mobile phone, a battery car, a new energy automobile and the like which are commonly used. The demand is increasing, and lithium cell industry is also continuous to put into production, but some problems are also emerging gradually, for example, a certain brand cell-phone charges and explodes, or the battery has the problem such as electric leakage. The safety and durability of the battery need to be further enhanced. The diaphragm is an important component of the lithium battery, isolates the positive electrode and the negative electrode of the battery and provides a flow passage for the battery.
However, in an automatic production line, the membrane is inevitably subjected to some collisions, folding and friction, and the surface of the membrane may have creases, scratches and pinholes, or factors such as missing spraying or less spraying in the spraying process of the membrane. As a raw material of the battery, the quality of the separator also affects the quality and safety of the battery, and therefore, it is necessary to check the production quality of the separator.
At the present stage, the manual diaphragm detection mode is gradually eliminated, and the detection efficiency cannot meet the production requirements of modern industry. With the continuous progress of cameras and image algorithms, visual inspection is increasingly applied to the industry. Since the diaphragm is produced at first and is subjected to rolling and splitting procedures, the diaphragm is conveyed and photographed on a conveyor belt for detection, and some manufacturers choose to use a line-scan camera to acquire an image of the diaphragm and use traditional image algorithms such as morphological processing, image segmentation and the like to detect the quality of the diaphragm. However, in an automatic production mode, the conventional image processing algorithm has a considerable effect on detection of defect features, but the defects on the diaphragm have different forms, and gray values of some defects are similar to the background of a normal diaphragm, so that the conventional image processing algorithm has a high probability of missing detection and false detection in this respect, and meanwhile, the scheme design of the conventional image processing algorithm is also largely related to the technical level of technicians, and the production environment also affects the detection effect.
Disclosure of Invention
The invention aims to overcome the defects and shortcomings in the prior art, and provides a method for identifying diaphragm defects based on Yolov4, which has strong robustness, can reduce the omission factor and the false detection factor, and can solve the problem that the traditional algorithm cannot detect the fine defects of the diaphragm, thereby achieving better positioning and classifying effects on the diaphragm defects and further improving the detection quality of the diaphragm.
In order to achieve the purpose, the invention is realized by the following technical scheme: a method for identifying diaphragm defects based on Yolov4 is characterized in that: the method comprises the following steps:
firstly, acquiring diaphragm image data, and screening defective pictures from the image data;
secondly, marking the defect type by using a marking tool to generate a marking file as a data set;
thirdly, clustering a prior frame of the data set by using a clustering algorithm k-means;
fourthly, dividing the data set into a training set, a verification set and a test set; establishing an improved Yolov4 network model, and training the improved Yolov4 network model through a training set; the improved Yolov4 network model adopts a structure of combining low-level characteristic information and high-level characteristic information; CSP structures are added into SPP and PANet of the improved Yolov4 network model, and an attention mechanism is combined to improve the defect detection precision;
fifthly, testing the detection performance of the trained improved Yolov4 network model by using the test set, and using the optimal training model of the improved Yolov4 network model for detection;
and sixthly, deploying the training model of the optimal improved Yolov4 network model to a diaphragm detection site for diaphragm defect detection, decoding the prediction result, performing score sorting and non-maximum inhibition screening on the prediction result, and drawing the processed result on the diaphragm original image.
In the first step, after defective pictures are screened from image data, the defective pictures are cut randomly; and rotating and folding the cut image to increase sample data.
Clockwise 90 DEG, 180 DEG and 270 DEG rotation is carried out on the cut image; and horizontally folding and vertically folding the cut image. The method can enhance the sample data to expand the data set, avoid overfitting, simultaneously improve the generalization ability of the subsequent model, and enhance the diversity of the sample by using the data.
In the second step, the defect type is marked by using a marking tool, and a marking file is generated as a data set, wherein the marking file is as follows: and manually labeling the image with the diaphragm defects by using a labelImg picture labeling tool, labeling the types of the defects and the minimum external rectangular frame of the defects, and generating an xml file format for storing the sizes and the types of the pictures of the defects and the coordinate information of the labeled rectangular frame as a data set.
The improved Yolov4 network model comprises a module 1, a module 2, a module 3 and a Head network Yolo Head; the module 1 is a trunk feature extraction network COSA-2x2 x; the module 2 adds a CSP structure on the basis of SPP; the module 3 adds a CSP structure to the up-sampling and down-sampling of the PANET structure and adds an attention mechanism.
And adding a feature fusion layer on the top feature layer of the module 3, wherein the feature fusion layer comprises 3 convolution layers, and the combination of low-layer feature information and high-layer feature information is realized.
The CSP structure firstly divides an input part into two parts, then one part passes through a Conv block part of a main body, and the other part is directly stacked with an output after the Conv block; wherein, dividing the input part into two parts means that the input part is divided into two parts on average, and the number of channels is half of the original input; or dividing the input part into two means performing convolution by 1 × 1, and halving the number of channels.
The fourth step includes the steps of:
dividing a data set into a training set, a verification set and a test set according to the proportion of 0.7:0.15: 0.15;
step two, improving a Yolov4 network model for initialization;
thirdly, obtaining an output value of the input training set data through a backbone feature extraction network COSA-2x2x, a module 2, a module 3 and a Head network Yolo Head;
step four, solving the error between the output value of the improved Yolov4 network model and the target value, namely a loss function;
and step five, updating the weight, and finishing the training when the improved Yolov4 network model converges to a certain degree and does not drop any more.
In the third step, the training set data extracts the defect characteristic information of the diaphragm through a trunk characteristic extraction network COSA-2x2x, the receptive field is increased through a module 2, the context information is separated, the characteristics are repeatedly extracted through a module 3, and finally the obtained characteristics are predicted through a Head network Yolo Head.
The loss function in step four is
loss=lossBoundary frame+lossConfidence level+lossClassification
lossBoundary frame=lossCDIoU=1-IoU+ρ2(box_dt,box_gt)/c2+αν;
Figure BDA0003346868180000031
Figure BDA0003346868180000041
Figure BDA0003346868180000042
The CSPdacrnet 53 has strong feature extraction capability without using the original trunk network CSPdacrnet 53 and CSPdacrnet 53 of yolov4, but a large amount of display card memories occupied by calculation and network training are correspondingly brought, and the detection speed is slower than that of COSA-2x2 x. The COSA-2x2x with the PCB technology can make the model more flexible, and the speed is greatly improved. In addition, the CSP structure added on the basis of the SPP can effectively reduce the calculation amount of the model under the condition of little precision loss.
CSP structures are added to the up-sampling and down-sampling of the PANet structure, and an attention mechanism is integrated into the PANet structure, so that an improved Yolov4 network model can pay more attention to an ROI (region of interest) in a defect, the key information of the defect of the diaphragm is extracted, most irrelevant background information of the diaphragm of the lithium battery is ignored, the number of the parameters can be reduced, and the detection precision is improved. Because the diaphragm has some tiny defects, the invention adds a feature fusion layer on the top feature layer of the module 3 to realize the combination of low-layer feature information and high-layer feature information and carry out subsequent defect detection and positioning, so that the output feature layers are (104, 104 and 128), the micro-miniature defect detection device is more suitable for detecting micro-miniature targets, and has higher positioning precision and reduced false detection rate of tiny defects.
Compared with the prior art, the invention has the following advantages and beneficial effects: the method for identifying the diaphragm defects based on the Yolov4 has strong robustness, can reduce the omission factor and the false detection rate, and can solve the problem that the traditional algorithm cannot detect the fine defects of the diaphragm, thereby achieving better positioning and classifying effects on the diaphragm defects and further improving the detection quality of the diaphragm.
Drawings
FIG. 1 is a flow chart of a Yolov 4-based method for identifying diaphragm defects in accordance with the present invention;
FIG. 2 is a schematic diagram of the improved Yolov4 network model of the present invention;
FIG. 3 is a CSP structure diagram in the improved Yolov4 network model according to the present invention;
FIG. 4 is a diagram of CSP structure and 5 convolutions in the improved Yolov4 network model according to the present invention;
5(a) -5(e) are graphs showing the detection effect of the method for identifying the defect of the diaphragm based on Yolov 4;
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Examples
As shown in fig. 1 to 5(e), the method for identifying a defect of a diaphragm based on Yolov4 of the present invention includes the following steps:
firstly, acquiring diaphragm image data, and screening defective pictures from the image data; after screening defective pictures from the image data, randomly cutting the defective pictures; and rotating the cut image by 90 degrees, 180 degrees and 270 degrees clockwise, and performing horizontal folding and vertical folding to increase sample data.
And secondly, manually labeling the image with the diaphragm defects by using a labelImg picture labeling tool, labeling the types of the defects and the minimum external rectangular frame of the defects, and generating an xml file format for storing the sizes and the types of the pictures of the defects and the coordinate information of the labeled rectangular frame as a data set.
And thirdly, clustering 9 groups of prior frames of the data set by using a clustering algorithm k-means, and taking the 9 groups of prior frames as an anchor box of the improved Yolov4 network model in the fourth step, so that the prior frames are more in line with the size and distribution condition of the rectangular frame of the diaphragm defect.
Fourthly, dividing the data set into a training set, a verification set and a test set; establishing an improved Yolov4 network model, and training the improved Yolov4 network model through a training set; the improved Yolov4 network model adopts a structure of combining low-level characteristic information and high-level characteristic information; CSP structures are added into SPP and PANet of the improved Yolov4 network model, and an attention mechanism is combined to improve the defect detection precision;
fifthly, testing the detection performance of the trained improved Yolov4 network model by using the test set, and using the optimal training model of the improved Yolov4 network model for detection;
sixthly, deploying a training model of an optimal improved Yolov4 network model to a diaphragm detection site to perform diaphragm defect detection, decoding a prediction result, performing score sorting and non-maximum inhibition screening on the prediction result, and drawing a processing result on a diaphragm original image, wherein fig. 5(a) -5(e) are effect images for respectively detecting creases, black spots, missed spraying, scratches and pinholes by adopting the Yolov 4-based diaphragm defect identification method.
Specifically, the improved Yolov4 network model comprises a module 1, a module 2, a module 3 and a Head network Yolo Head, wherein the module 1 is a backbone feature extraction network COSA-2x2x, the module 2 is a CSP structure added on the basis of SPP, and the module 3 is a CSP structure added on the upsampling and downsampling of a PANet structure and an attention mechanism is added. According to the invention, a feature fusion layer is added on the top feature layer of the module 3, and the feature fusion layer comprises 3 convolution layers, so that the combination of low-layer feature information and high-layer feature information is realized.
As shown in fig. 3, the CSP structure first divides the input part into two parts, then one part passes through the trunk Conv block part, and the other part is directly stacked with the output after passing through the Conv block; wherein, dividing the input part into two parts means that the input part is divided into two parts on average, and the number of channels is half of the original input; or dividing the input part into two means performing convolution by 1 × 1, and halving the number of channels.
The CSPdacrnet 53 has strong feature extraction capability without using the original trunk network CSPdacrnet 53 and CSPdacrnet 53 of yolov4, but a large amount of display card memories occupied by calculation and network training are correspondingly brought, and the detection speed is slower than that of COSA-2x2 x. The COSA-2x2x with the PCB technology can make the model more flexible, and the speed is greatly improved. In addition, the CSP structure added on the basis of the SPP can effectively reduce the calculation amount of the model under the condition of little precision loss.
The CSP structure is added to the up-sampling and the down-sampling of the PANet structure, the attention mechanism is integrated into the PANet structure, an improved Yolov4 network model is enabled to pay more attention to an ROI (region of interest) in a defect, key information of the defect of the diaphragm is extracted, most irrelevant background information of the diaphragm of the lithium battery is ignored, the number of the parameters can be reduced, and the detection precision can be improved, wherein the CSP structure and a 5-time convolution schematic diagram are shown in figure 4. Because the diaphragm has some tiny defects, the invention adds a feature fusion layer on the top feature layer of the module 3 to realize the combination of low-layer feature information and high-layer feature information and carry out subsequent defect detection and positioning, so that the output feature layers are (104, 104 and 128), the micro-miniature defect detection device is more suitable for detecting micro-miniature targets, and has higher positioning precision and reduced false detection rate of tiny defects.
The Yolo Head of the present invention uses the extracted features to perform prediction, and predicts 3 feature scales including width, height and channel number, which are (104, 104, 128), (26, 26, 512), (13, 13, 1024), respectively. All convolutions with a convolution kernel of 1x1 of the present invention use the Mish activation function. Mish activation function has better smoothness than Leaky-ReLU, and can allow better information to be transmitted into a neural network, so that better accuracy and generalization capability are obtained. The expression of the Mish activation function is as follows:
Mish=x×tanh(In(1+ex))
the fourth step of the present invention comprises the steps of:
step one, dividing a data set into a training set, a verification set and a test set according to the proportion of 0.7:0.15: 0.15.
And step two, initializing the improved Yolov4 network model.
And step three, extracting defect characteristic information of the diaphragm by the training set data through a trunk characteristic extraction network COSA-2x2x, increasing the receptive field through a module 2, separating context information, repeatedly extracting characteristics through a module 3, and finally predicting the obtained characteristics through a Head network Yolo Head.
Step four, solving the error between the output value of the improved Yolov4 network model and the target value, namely a loss function; wherein the loss function is
loss=lossBoundary frame+lossConfidence level+lossClassification
lossBoundary frame=lossCDIoU=1-IoU+ρ2(box_dt,box_gt)/c2+αν;
Figure BDA0003346868180000071
Figure BDA0003346868180000072
Figure BDA0003346868180000073
And step five, updating the weight, and finishing the training when the improved Yolov4 network model converges to a certain degree and does not drop any more.
The detection performance of the Yolov 4-based diaphragm defect identification method adopted in the present embodiment is shown in table 1 below.
TABLE 1 test performance of the model
Speed of detection (ms/piece) Recall (%) Model parameter quantity params
Original model algorithm 54 88.13 64,040,001
The example method 28 91.80 15,178,913
SSD 20 48.18 6,204,004
YOLOv4-tiny 9 75.35 5,961,014
Wherein, the recall ratio formula is as follows:
Figure BDA0003346868180000074
the True Positives (TP) indicates that it is predicted to be a positive sample, actually a positive sample. False Positive (FP) indicates a predicted positive sample, and actually a negative sample. The higher the recall, the higher the probability that the actual defect is predicted.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (10)

1.一种基于Yolov4的隔膜缺陷识别方法,其特征在于:包括以下步骤:1. a diaphragm defect identification method based on Yolov4, is characterized in that: comprise the following steps: 第一步,获取隔膜图像数据,从图像数据中筛选有缺陷的图片;The first step is to obtain diaphragm image data, and screen defective pictures from the image data; 第二步,使用标注工具标注缺陷类型,生成标注文件,作为数据集;The second step is to use the labeling tool to label the defect type, and generate a labeling file as a data set; 第三步,使用聚类算法k-means聚类出数据集的先验框;The third step is to use the clustering algorithm k-means to cluster the a priori frame of the data set; 第四步,将数据集划分为训练集、验证集和测试集;建立改进Yolov4网络模型,通过训练集对改进Yolov4网络模型进行训练;其中,改进Yolov4网络模型采用低层特征信息与高层特征信息相结合的结构;该改进Yolov4网络模型的SPP和PANet中添加CSP结构,并采用与注意力机制相结合,以提高缺陷的检测精度;The fourth step is to divide the data set into training set, verification set and test set; establish an improved Yolov4 network model, and train the improved Yolov4 network model through the training set; among them, the improved Yolov4 network model adopts low-level feature information and high-level feature information. Combined structure; the CSP structure is added to the SPP and PANet of the improved Yolov4 network model, and combined with the attention mechanism to improve the detection accuracy of defects; 第五步,使用测试集测试训练后的改进Yolov4网络模型的检测性能,将最优的改进Yolov4网络模型的训练模型用于检测;The fifth step is to use the test set to test the detection performance of the improved Yolov4 network model after training, and use the optimal training model of the improved Yolov4 network model for detection; 第六步,将最优改进Yolov4网络模型的训练模型部署到隔膜检测现场进行隔膜的缺陷检测,对预测结果进行解码,预测结果经过得分排序和非极大值抑制筛选,将处理的结果在隔膜原图上进行绘制。The sixth step is to deploy the training model of the optimal improved Yolov4 network model to the diaphragm inspection site for defect detection of the diaphragm, and decode the prediction results. Draw on the original image. 2.根据权利要求1所述的基于Yolov4的隔膜缺陷识别方法,其特征在于:在第一步中,从图像数据中筛选有缺陷的图片后,对有缺陷的图片进行随机裁剪;对裁剪后的图像进行旋转和翻折处理,以增加样本数据。2. the diaphragm defect identification method based on Yolov4 according to claim 1, is characterized in that: in the first step, after screening the defective picture from the image data, the defective picture is randomly cropped; The image is rotated and folded to increase the sample data. 3.根据权利要求2所述的基于Yolov4的隔膜缺陷识别方法,其特征在于:对裁剪后的图像进行顺时针90°、180°和270°旋转;对裁剪后的图像进行水平翻折和垂直翻折。3. the diaphragm defect identification method based on Yolov4 according to claim 2, is characterized in that: 90 °, 180 ° and 270 ° of rotations clockwise are carried out to the cropped image; the cropped image is horizontally folded and vertically Fold over. 4.根据权利要求1所述的基于Yolov4的隔膜缺陷识别方法,其特征在于:第二步中,所述使用标注工具标注缺陷类型,生成标注文件,作为数据集是指:使用labelImg图片标注工具对带有隔膜缺陷的图像进行人工标注,标注出缺陷的类别、缺陷的最小外接矩形框,并生成.xml文件格式储存缺陷的所在的图片大小、类别和所标注矩形框的坐标信息,作为数据集。4. the diaphragm defect identification method based on Yolov4 according to claim 1, is characterized in that: in the second step, described use labeling tool to label defect type, generate labeling file, refer to as data set: use labelImg picture labeling tool Manually mark the image with diaphragm defects, mark the category of the defect and the minimum bounding rectangle of the defect, and generate the .xml file format to store the image size, category and coordinate information of the marked rectangle as data. set. 5.根据权利要求1所述的基于Yolov4的隔膜缺陷识别方法,其特征在于:所述改进Yolov4网络模型包括模块1、模块2、模块3和头部网络Yolo Head;所述模块1为主干特征提取网络COSA-2x2x;所述模块2是在SPP基础上添加CSP结构;所述模块3是在PANet结构的上采样和下采样添加了CSP结构,并添加了注意力机制。5. the diaphragm defect identification method based on Yolov4 according to claim 1, is characterized in that: described improved Yolov4 network model comprises module 1, module 2, module 3 and head network Yolo Head; Described module 1 is backbone feature Extract the network COSA-2x2x; the module 2 adds a CSP structure on the basis of SPP; the module 3 adds a CSP structure to the upsampling and downsampling of the PANet structure, and adds an attention mechanism. 6.根据权利要求5所述的基于Yolov4的隔膜缺陷识别方法,其特征在于:在模块3的最上层特征层添加特征融合层,该特征融合层为3个卷积层,实现低层特征信息与高层特征信息相结合。6. the diaphragm defect identification method based on Yolov4 according to claim 5, is characterized in that: at the topmost feature layer of module 3, add feature fusion layer, this feature fusion layer is 3 convolution layers, realizes low-level feature information and. High-level feature information is combined. 7.根据权利要求5所述的基于Yolov4的隔膜缺陷识别方法,其特征在于:CSP结构首先把输入部分分成两份,接着一部分经过主干Conv block部分,另一部分直接与经过Convblock后的输出进行堆叠;其中,把输入部分分成两份是指平均拆分成两份,通道数都为原来输入的一半;或者把输入部分分成两份是指进行1×1的卷积,将通道数减半。7. the diaphragm defect identification method based on Yolov4 according to claim 5, is characterized in that: CSP structure first divides the input part into two parts, then part passes through the backbone Conv block part, and another part directly stacks with the output after passing through the Convblock ; Among them, dividing the input part into two parts means splitting the input part into two parts on average, and the number of channels is half of the original input; or dividing the input part into two parts means performing a 1×1 convolution to halve the number of channels. 8.根据权利要求6所述的基于Yolov4的隔膜缺陷识别方法,其特征在于:第四步包括以下步骤:8. the diaphragm defect identification method based on Yolov4 according to claim 6, is characterized in that: the 4th step may further comprise the steps: 步骤一,数据集以0.7:0.15:0.15的比例划分为训练集、验证集和测试集;Step 1, the data set is divided into training set, validation set and test set with a ratio of 0.7:0.15:0.15; 步骤二,改进Yolov4网络模型进行初始化;Step 2, improve the Yolov4 network model for initialization; 步骤三,输入的训练集数据经主干特征提取网络COSA-2x2x、模块2、模块3和头部网络Yolo Head得到输出值;Step 3, the input training set data obtains the output value through the backbone feature extraction network COSA-2x2x, module 2, module 3 and the head network Yolo Head; 步骤四,求出改进Yolov4网络模型的输出值与目标值之间的误差,即损失函数;Step 4: Find the error between the output value of the improved Yolov4 network model and the target value, that is, the loss function; 步骤五,权值进行更新,当改进Yolov4网络模型收敛到一定程度不再下降则结束训练。In step 5, the weights are updated. When the improved Yolov4 network model converges to a certain extent and no longer decreases, the training ends. 9.根据权利要求8所述的基于Yolov4的隔膜缺陷识别方法,其特征在于:步骤三中,训练集数据通过主干特征提取网络COSA-2x2x提取隔膜的缺陷特征信息,经过模块2增加感受野,分离上下文信息,再由模块3反复提取特征,最后通过头部网络Yolo Head将得到的特征进行预测。9. the diaphragm defect identification method based on Yolov4 according to claim 8, is characterized in that: in step 3, training set data extracts the defect feature information of diaphragm by backbone feature extraction network COSA-2x2x, increases receptive field through module 2, The context information is separated, and the features are repeatedly extracted by module 3, and finally the obtained features are predicted by the head network Yolo Head. 10.根据权利要求8所述的基于Yolov4的隔膜缺陷识别方法,其特征在于:步骤四中的损失函数为10. the diaphragm defect identification method based on Yolov4 according to claim 8, is characterized in that: the loss function in the step 4 is loss=loss边界框+loss置信度+loss分类loss=loss bounding box +loss confidence +loss classification ; loss边界框=lossCDIoU=1-IoU+ρ2(box_dt,box_gt)/c2+αν;loss bounding box =loss CDIoU =1-IoU+ρ 2 (box_dt,box_gt)/c 2 +αν;
Figure FDA0003346868170000031
Figure FDA0003346868170000031
Figure FDA0003346868170000032
Figure FDA0003346868170000032
Figure FDA0003346868170000033
Figure FDA0003346868170000033
CN202111325709.5A 2021-11-10 2021-11-10 A Yolov4-based Diaphragm Defect Recognition Method Pending CN114170140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111325709.5A CN114170140A (en) 2021-11-10 2021-11-10 A Yolov4-based Diaphragm Defect Recognition Method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111325709.5A CN114170140A (en) 2021-11-10 2021-11-10 A Yolov4-based Diaphragm Defect Recognition Method

Publications (1)

Publication Number Publication Date
CN114170140A true CN114170140A (en) 2022-03-11

Family

ID=80478538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111325709.5A Pending CN114170140A (en) 2021-11-10 2021-11-10 A Yolov4-based Diaphragm Defect Recognition Method

Country Status (1)

Country Link
CN (1) CN114170140A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114723750A (en) * 2022-06-07 2022-07-08 南昌大学 Transmission line strain clamp defect detection method based on improved YOLOX algorithm
CN115082401A (en) * 2022-06-22 2022-09-20 桂林电子科技大学 A fault prediction method of SMT production line placement machine based on improved YOLOX and PNN
CN115100483A (en) * 2022-03-28 2022-09-23 中车贵阳车辆有限公司 Open wagon body defect identification method based on deep learning
CN115588022A (en) * 2022-11-10 2023-01-10 合肥惠强新能源材料科技有限公司 Lithium battery isolation film quality detection system based on process index data
CN116758064A (en) * 2023-08-14 2023-09-15 深圳天眼新能源科技有限公司 Lithium battery diaphragm quality detection method based on electron scanning microscope
WO2023202207A1 (en) * 2022-04-18 2023-10-26 宁德时代新能源科技股份有限公司 Method, device and system for detecting defects of separator for composite material strip

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115100483A (en) * 2022-03-28 2022-09-23 中车贵阳车辆有限公司 Open wagon body defect identification method based on deep learning
WO2023202207A1 (en) * 2022-04-18 2023-10-26 宁德时代新能源科技股份有限公司 Method, device and system for detecting defects of separator for composite material strip
CN114723750A (en) * 2022-06-07 2022-07-08 南昌大学 Transmission line strain clamp defect detection method based on improved YOLOX algorithm
CN115082401A (en) * 2022-06-22 2022-09-20 桂林电子科技大学 A fault prediction method of SMT production line placement machine based on improved YOLOX and PNN
CN115082401B (en) * 2022-06-22 2024-03-19 桂林电子科技大学 A fault prediction method for SMT production line placement machines based on improved YOLOX and PNN
CN115588022A (en) * 2022-11-10 2023-01-10 合肥惠强新能源材料科技有限公司 Lithium battery isolation film quality detection system based on process index data
CN116758064A (en) * 2023-08-14 2023-09-15 深圳天眼新能源科技有限公司 Lithium battery diaphragm quality detection method based on electron scanning microscope
CN116758064B (en) * 2023-08-14 2024-04-19 深圳天眼新能源科技有限公司 Lithium battery diaphragm quality detection method based on electron scanning microscope

Similar Documents

Publication Publication Date Title
CN114170140A (en) A Yolov4-based Diaphragm Defect Recognition Method
CN113724231B (en) Industrial defect detection method based on semantic segmentation and target detection fusion model
CN111598861B (en) Detection method of non-uniform texture small defects based on improved Faster R-CNN model
CN103903005B (en) License plate image identification system and method
CN104392205B (en) A kind of recognition methods and system of improper license plate
CN104866862B (en) A kind of method of belt steel surface area-type defect recognition classification
CN106650731B (en) A Robust License Plate and Vehicle Logo Recognition Method
CN110852288B (en) A Cell Image Classification Method Based on Two-Stage Convolutional Neural Networks
CN109523518B (en) A tire X-ray defect detection method
CN106156777B (en) Text image detection method and device
CN114663346A (en) Strip steel surface defect detection method based on improved YOLOv5 network
CN109376580B (en) A deep learning-based identification method for power tower components
CN115775246A (en) A method for defect detection of PCB components
WO2024051686A1 (en) Compression and training method and apparatus for defect detection model
CN113066047A (en) Tire X-ray Image Impurity Defect Detection Method
CN110263712A (en) A kind of coarse-fine pedestrian detection method based on region candidate
CN116228741A (en) PCBA (printed circuit board assembly) component defect detection method and device
CN115409797A (en) A PCB defect image detection method based on improved deep learning algorithm
CN115456955A (en) A method for detecting internal burr defects of ball cage dust cover
CN112597904A (en) Method for identifying and classifying blast furnace charge level images
CN108932471B (en) A vehicle detection method
CN111079543A (en) Efficient vehicle color identification method based on deep learning
CN114113137A (en) Defect detection system and method for thin film material
CN103268494B (en) Parasite egg recognition methods based on rarefaction representation
CN113781483B (en) Industrial product appearance defect detection method and device

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
CB02 Change of applicant information

Country or region after: China

Address after: No.33, Guangyun Road, Nanhai District, Foshan City, Guangdong Province, 528200

Applicant after: Foshan University

Address before: No.33, Guangyun Road, Nanhai District, Foshan City, Guangdong Province, 528200

Applicant before: FOSHAN University

Country or region before: China

CB02 Change of applicant information