CN114581416A - YOLO-based light wallboard surface defect detection method and device - Google Patents
YOLO-based light wallboard surface defect detection method and device Download PDFInfo
- Publication number
- CN114581416A CN114581416A CN202210221549.8A CN202210221549A CN114581416A CN 114581416 A CN114581416 A CN 114581416A CN 202210221549 A CN202210221549 A CN 202210221549A CN 114581416 A CN114581416 A CN 114581416A
- Authority
- CN
- China
- Prior art keywords
- light wallboard
- defects
- yolo
- defect
- training
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Quality & Reliability (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Analysis (AREA)
Abstract
The method and the device for detecting the surface defects of the light wallboard based on the YOLO are characterized by comprising the following steps of: the method comprises the following steps: collecting images of the light wallboard with surface defects on the production line, and establishing a light wallboard defect identification library; step two: marking the defects in the images of the light wallboard with the surface defects in batches, and randomly dividing the defects into a training set, a verification set and a test set according to a ratio of 7:2: 1; step three: clustering the marked target frame through a K-means algorithm to obtain an improved anchor point; step four: and carrying out defect diagnosis training and defect identification on the light wallboard defect identification library by adopting a YOLO algorithm, thereby completing fault positioning of the light wallboard defects.
Description
Technical Field
The invention relates to the field of defect detection, in particular to a method and a device for detecting surface defects of a light wallboard based on YOLO.
Background
In the production process of the light wall material, the defect detection of the product is an essential step, namely, the type and the position of the defect are identified. The surface defect identification of the product in the production of the light wall material still stays in the manual detection stage, and can be influenced by personal factors of workers, so that the efficiency and the quality are difficult to guarantee.
The traditional machine vision technology generally uses image processing algorithms, such as threshold segmentation, morphology, connected region extraction and other methods to extract image regions possibly containing product defects, and then uses Bayesian network, support vector machine and other algorithms to classify images so as to distinguish whether the defects exist. The traditional machine vision technology is not an end-to-end algorithm, the characteristics of each defect are analyzed, then a machine learning algorithm is used for carrying out repeated tests and parameter adjustment, and a good-performance algorithm can be obtained. The surface defect detection adopts the traditional image processing algorithm to detect the defects of poor robustness, high false detection rate and the like.
The method for detecting the target by deep learning can greatly improve the detection accuracy, can classify the defect types at the same time, and obviously enhances the generalization performance and robustness of the model.
Disclosure of Invention
Aiming at the defects, the invention provides a method and a device for detecting the surface defects of the light wallboard based on the YOLO.
The invention is realized by the following technical scheme:
in a first aspect of the present invention, a method for detecting surface defects of a lightweight wallboard based on YOLO is provided, which comprises the following steps:
collecting images of the light wallboard with surface defects on the production line, and establishing a light wallboard defect identification library;
marking the defects in the images of the light wallboard with the surface defects in batches, and randomly dividing the defects into a training set, a verification set and a test set according to a ratio of 7:2: 1;
clustering the marked target frame through a K-means algorithm to obtain an improved anchor point;
and carrying out defect diagnosis training and defect identification on the light wallboard defect identification library by adopting a YOLO algorithm, thereby completing fault positioning of the light wallboard defects.
Further, batch marking of defects in the image of the lightweight wallboard with surface defects comprises the following steps:
manually marking the defects by using LabelImg marking software;
storing the category and width of the marking frame in a txt file;
images were randomly divided into a training set, a validation set, and a test set.
Further, the light wallboard defect identification training comprises the following steps:
establishing a Mobilene-based YOLO bottom layer model framework;
determining the output sizes of a plurality of network nodes according to the defect characteristics of the light wallboard;
adjusting parameters according to the size of a training image, zooming the image, selecting a Batch size according to the network node, performing iterative training through forward propagation and backward propagation, and when the training reaches the optimal IOU and the lowest LOSS value, saving the weight and quitting the training; wherein IOU represents the cross-over ratio of image processing; LOSS represents the deviation between the network actual output value and the sample label value; the Batch size indicates the number of samples selected for a session.
Further, the output sizes of the network nodes include 13 × 13 × 18, 26 × 26 × 18, and 52 × 52 × 18.
Further, the scaling the image, selecting the Batch size according to the network node, includes scaling the image to 224 × 224, selecting the Batch 32 according to the network node.
Further, the light wallboard defect diagnosis and identification method comprises the following steps:
setting 9 prior frames with different sizes through downsampling;
carrying out feature detection and extraction on the 13 x 13 feature map by adopting the three prior frames with the largest size, carrying out feature detection and extraction on the 26 x 26 feature map by adopting the three prior frames with the medium size, and carrying out feature detection and extraction on the 52 x 52 feature map by adopting the three prior frames with the smallest size, thereby forming respective feature libraries;
analyzing the feature library of the previous layer by adopting three YOLO output layers respectively, outputting diagnosis prediction information and prediction confidence coefficient, and outputting IOU values of three sizes;
and the defects of the light wallboard are diagnosed and identified by transversely comparing the IOU values under different sizes.
In a second aspect of the present invention, there is provided a YOLO-based light wallboard defect detecting apparatus, comprising:
the acquisition unit is used for acquiring a surface defect image of the light wallboard;
the framing unit is used for framing the defects in the light wallboard surface defect image in batches;
and the light wallboard surface defect positioning unit is used for establishing a light wallboard surface defect recognition library and performing defect diagnosis training and defect recognition training on the light wallboard defect recognition library by adopting a YOLO algorithm so as to finish light wallboard defect positioning.
The invention has the beneficial effects that the invention adopts end-to-end design, thereby saving manpower and having more outstanding recognition efficiency and accuracy; the detection speed is high, and the application requirement of unmanned production of a light wallboard production line can be met; the method has the advantages of high detection accuracy, strong robustness and high speed; the invention replaces Darknet network with Mobilene lightweight network, and has short training time and high detection speed.
Drawings
FIG. 1 is an overall flow chart of the YOLO-based light wallboard defect detection of the present invention;
Detailed Description
As shown in fig. 1, the detection method of the present invention comprises the steps of:
the method comprises the following steps: collecting images of the light wallboard with surface defects on the production line, and establishing a light wallboard defect identification library;
step two: marking the defects in the images of the light wallboard with the surface defects in batches, and randomly dividing the defects into a training set, a verification set and a test set according to a ratio of 7:2: 1;
step three: clustering the marked target frame through a K-means algorithm to obtain an improved anchor point;
step four: and carrying out defect diagnosis training and defect identification on the light wallboard defect identification library by adopting a YOLO algorithm, thereby completing fault positioning of the light wallboard defects.
The training set, the verification set and the test set in the step two of the invention are mutually independent. As the defects of the light wallboard are detected in a supervised learning mode, the defect target needs to be manually marked by LabelImg software manually, the category and the position frame information of the target are obtained, and the stored label file in the format of txt is obtained.
The K-means algorithm is adopted in the third step of the method, and the distance is used as an evaluation index of the similarity, namely the closer the two objects are, the higher the similarity is.
In the fourth step of the invention, the training set and the verification set processed in the second step and the anchor point set acquired in the third step are input into a YOLO neural network for training.
It will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in the embodiments described above without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims.
Claims (1)
1. The method and the device for detecting the surface defects of the light wallboard based on the YOLO are characterized by comprising the following steps of:
the method comprises the following steps: collecting images of the light wallboard with surface defects on the production line, and establishing a light wallboard defect identification library;
step two: marking the defects in the images of the light wallboard with the surface defects in batches, and randomly dividing the defects into a training set, a verification set and a test set according to a ratio of 7:2: 1;
step three: clustering the marked target frame through a K-means algorithm to obtain an improved anchor point;
step four: and carrying out defect diagnosis training and defect identification on the light wallboard defect identification library by adopting a YOLO algorithm, thereby completing fault positioning of the light wallboard defects.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210221549.8A CN114581416A (en) | 2022-03-07 | 2022-03-07 | YOLO-based light wallboard surface defect detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210221549.8A CN114581416A (en) | 2022-03-07 | 2022-03-07 | YOLO-based light wallboard surface defect detection method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114581416A true CN114581416A (en) | 2022-06-03 |
Family
ID=81773465
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210221549.8A Pending CN114581416A (en) | 2022-03-07 | 2022-03-07 | YOLO-based light wallboard surface defect detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114581416A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117952972A (en) * | 2024-03-26 | 2024-04-30 | 中建国际工程有限公司 | Wall defect detection method and system based on target detection algorithm |
-
2022
- 2022-03-07 CN CN202210221549.8A patent/CN114581416A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117952972A (en) * | 2024-03-26 | 2024-04-30 | 中建国际工程有限公司 | Wall defect detection method and system based on target detection algorithm |
CN117952972B (en) * | 2024-03-26 | 2024-05-31 | 中建国际工程有限公司 | Wall defect detection method and system based on target detection algorithm |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109977808B (en) | Wafer surface defect mode detection and analysis method | |
CN106960195B (en) | Crowd counting method and device based on deep learning | |
CN113724231B (en) | Industrial defect detection method based on semantic segmentation and target detection fusion model | |
CN110890102A (en) | Engine defect detection algorithm based on RNN voiceprint recognition | |
CN112037219A (en) | Metal surface defect detection method based on two-stage convolution neural network | |
CN113920107A (en) | Insulator damage detection method based on improved yolov5 algorithm | |
CN112766218B (en) | Cross-domain pedestrian re-recognition method and device based on asymmetric combined teaching network | |
CN114612472B (en) | SegNet improvement-based leather defect segmentation network algorithm | |
CN109584206B (en) | Method for synthesizing training sample of neural network in part surface flaw detection | |
CN113221956B (en) | Target identification method and device based on improved multi-scale depth model | |
CN111009005A (en) | Scene classification point cloud rough registration method combining geometric information and photometric information | |
CN115410059B (en) | Remote sensing image part supervision change detection method and device based on contrast loss | |
CN112991271A (en) | Aluminum profile surface defect visual detection method based on improved yolov3 | |
CN109543498B (en) | Lane line detection method based on multitask network | |
CN115601307A (en) | Automatic cell detection method | |
CN114581416A (en) | YOLO-based light wallboard surface defect detection method and device | |
KR20230023263A (en) | Deep learning-based sewerage defect detection method and apparatus | |
CN116977859A (en) | Weak supervision target detection method based on multi-scale image cutting and instance difficulty | |
CN115965992A (en) | Method for improving pedestrian re-identification clustering precision based on semi-supervised learning | |
CN110968735B (en) | Unsupervised pedestrian re-identification method based on spherical similarity hierarchical clustering | |
CN114662594A (en) | Target feature recognition analysis system | |
CN113673534A (en) | RGB-D image fruit detection method based on fast RCNN | |
CN113139496A (en) | Pedestrian re-identification method and system based on time sequence multi-scale fusion | |
CN111899221A (en) | Appearance defect detection-oriented self-migration learning method | |
CN118072115B (en) | Medical cell detection method and system |
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 |