CN111062925A - Intelligent cloth defect identification method based on deep learning - Google Patents

Intelligent cloth defect identification method based on deep learning Download PDF

Info

Publication number
CN111062925A
CN111062925A CN201911308367.9A CN201911308367A CN111062925A CN 111062925 A CN111062925 A CN 111062925A CN 201911308367 A CN201911308367 A CN 201911308367A CN 111062925 A CN111062925 A CN 111062925A
Authority
CN
China
Prior art keywords
model
training
cloth
defects
deep learning
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
CN201911308367.9A
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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201911308367.9A priority Critical patent/CN111062925A/en
Publication of CN111062925A publication Critical patent/CN111062925A/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
    • 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]
    • 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/30124Fabrics; Textile; Paper

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Treatment Of Fiber Materials (AREA)

Abstract

The invention discloses a depth learning-based intelligent cloth defect identification method, which comprises the following steps: step S1, shooting cloth containing defects of different forms by using a camera to obtain picture materials, and dividing the picture materials into a training set and a verification set according to a certain proportion; step S2, labeling the obtained picture material; step S3, inputting the labeled data after labeling into the object detection model for training, and storing the model parameters obtained by training; and step S4, endowing the obtained model parameters to an original model, taking a test image as the input of the model, processing the input image test, performing characteristic processing on the test image by using the SSD model, and then predicting the type and the position of the defect. The method realizes the end-to-end processing effect, improves the working efficiency, and effectively improves the robustness of the model by extracting and calculating the complex features in the model.

Description

Intelligent cloth defect identification method based on deep learning
Technical Field
The invention relates to the field of computer vision and image processing of deep learning, in particular to an intelligent cloth defect identification method based on deep learning.
Background
The defect inspection of the cloth is an important link of production and quality management in the textile industry, and the current manual inspection is low in speed, high in labor intensity, influenced by subjective factors and lack of consistency. In 2016, the yield of cloth in China exceeds 700 million meters, and the yield is always in the rising trend, and if artificial intelligence and computer vision technology can be applied to the textile industry, the value of the artificial intelligence and computer vision technology to the textile industry is undoubtedly huge.
Deep learning is a major breakthrough in the field of machine learning in recent years, and makes computers make great progress in the aspects of voice, image, semantic understanding and the like, and is widely applied in many fields. The project applies deep learning to cloth defect inspection and detects different defect forms in images. The defects in the picture are identified and classified by using the image shot by the camera, so that the labor burden is greatly reduced. And (3) constructing a detection model, and verifying the effectiveness of the model through experiments.
An artificial intelligence research institute of the university of science and technology in China thesis, deep learning, in application to cloth defect detection (Zhaoyuan, Yelin, etc.. application of deep learning to cloth defect detection [ J ]. foreign electronic measurement technology, 2019,08: 110-. The paper published by Liu flash, Liu Feng and the like at Jiangsu university is proposed in the study of fabric image defect detection and positioning algorithm based on a neural network (Liu flash, Liu Feng and the like, the study of fabric image defect detection and positioning algorithm of the neural network [ D ]. Jiangsu university 2019), and the defect detection of the fabric is realized by using an original SSD model, but the detection speed cannot meet the industrial requirement. In study on image information detection methods of fabric defects by korea, dawn et al, who are the university of tianjin, in thesis of the image information detection methods of fabric defects (huang yi, dawn et al, study on image information detection methods of fabric defects [ D ]. university of tianjin 2015), the fabric defects are detected by using a mathematical morphology method, but the accuracy and speed are required to be improved. In the existing solution of cloth detection, the model calculation amount is too large, and the detection speed and the detection precision cannot meet the industrial requirements at the same time. The invention uses the improved SSD model, introduces the depth separable convolution operation, compresses the calculated amount of the model, improves the detection speed and realizes the purpose of industrial real-time detection.
Disclosure of Invention
The invention aims to provide an intelligent cloth defect identification method based on deep learning.
The invention is realized by at least one of the following technical schemes.
A cloth defect intelligent identification method based on deep learning comprises the following steps:
step S1, shooting cloth containing defects of different forms by using a camera to obtain picture materials, and dividing the pictures into a training set and a verification set according to the proportion;
step S2, labeling the picture material obtained in the step S1;
step S3, inputting the labeled data labeled in the step S2 into an object detection model for training, and storing model parameters obtained by training;
and step S4, inputting a test image for defect detection, endowing the model parameters obtained in the step S3 to an original object detection model, taking the test image as the input of a trained object detection model, processing the input image test, and predicting the type of the defect and calculating the position of the defect by the model according to the feature map.
Further, the morphology of the defects includes normal, pricked holes, gross spots and oil stains.
Further, the training set and validation set ratio was 8: 2.
Further, step S2 includes the steps of:
step S201, determining an image labeling rule, wherein the last layer output of the model belongs to softmax output and probability distribution output, and in the process of constructing the image label, the normal cloth is labeled as (1,0,0,0), the cloth containing the pricked holes is labeled as (0,1,0,0), the cloth containing the gross spots is labeled as (0,0, 1,0), and the cloth containing the oil stains is labeled as (0,0,0, 1);
step S202, utilizing a labeling tool labelImg to identify the positions of the defects in the picture according to the labeling rule of the step S201, manually classifying the categories of the defects, and generating a specific labeling file after the classification is finished, wherein the file content comprises the classification categories and the position coordinates of the defects.
Further, the object detection model is an SSD model.
Further, step S3 includes the steps of:
step a, inputting the pictures in the training set and the verification set marked in the step S200 into an object detection model, and based on the consideration that the number of the training sets does not meet the training requirement, performing a series of expansion on the data of the training set by using data augmentation, wherein the expansion comprises picture turning, picture cutting, image blurring and image rotation, and inputting the expanded data and the original data into the model for training;
b, after the data obtained in the step a are input into a model, dropout is used, in each iterative training, neurons in a part of neural networks are eliminated according to the probability set in advance, the effect of a single neuron on the training effect is reduced, meanwhile, the weight is attenuated along with the increase of the iteration times, and overfitting caused by the fact that the model is too complex is avoided;
step c, on the premise of the step b, accelerating the convergence process of iterative computation by using an Adam optimization algorithm, and simultaneously reducing the computation amount of the model by using depth separable convolution to reduce the complexity of the model; when the validation set error does not drop within n iterations, the training is stopped.
Further, the process described in step S4 includes modifying the test image size to conform to the input size of the object detection model.
Further, when the error rate of the SSD model to the training set tends to a stable state with the number of iterations, and the error rate after stabilization satisfies the industrial requirement, it indicates that the fitting degree of the model to the training data is good.
When the error rate of the SSD model to the verification set tends to be in a stable state along with the increase of the iteration times, and the error rate after the stability meets the industrial requirements, the generalization capability of the model to unknown data is good.
The invention uses professional labeling software to label data, inputs the labeled data set into a specific model system for iterative training, and stores system parameters after training when the system meets the requirement of predicting the accuracy of the data set. In the process of labeling data, in order to meet the requirement of a model on the data volume, original data are expanded by using a data augmentation technology, in the process of training the model, dropout regularization is used for preventing overfitting caused by too complicated model, and meanwhile, deep separable convolution is used for further reducing the calculation amount of a computer.
The SSD model used by the invention has high data processing speed, meets the engineering requirements of real-time shooting and detection of a production line, has high model accuracy and can accurately mark the positions and the types of the defects in the real-time shot images. The method is different from the traditional computer processing technology, realizes the end-to-end processing effect, improves the working efficiency, and effectively improves the robustness of the model by extracting and calculating the complex features in the model
Compared with the prior art, the invention has the following beneficial effects:
1. the invention realizes the end-to-end detection effect of the cloth defect detection, avoids the step of manually extracting image characteristics by the traditional detection algorithm and reduces the difficulty of the detection method development;
2. compared with other deep learning detection algorithms, the method disclosed by the invention has the advantages that on the basis of the SSD model, the technology of deep separable convolution is used, and on the basis of keeping high accuracy, the parameters and calculated amount of the model are compressed, so that the detection algorithm can meet the requirement of industrial real-time detection;
3. by using the depth separable convolution, the model calculation amount is compressed, and the model calculation speed is improved; the depth separable convolution is matched with the Adam algorithm, so that the model training speed is accelerated, and meanwhile, the dropout technology is used for avoiding overfitting of the model.
Drawings
FIG. 1 is a schematic flow chart of a method for intelligently identifying cloth defects based on deep learning according to the present embodiment;
FIG. 2 is a diagram of a location label of training data according to the present embodiment;
fig. 3 is a graph of the error rate degradation of the training set and the validation set during the training process of the present embodiment.
Detailed Description
The purpose and function of the present invention will be explained below by a specific embodiment in conjunction with the accompanying drawings.
As shown in fig. 1, the intelligent identification method for cloth defects based on deep learning includes the following steps:
and S100, acquiring a normal cloth image and cloth images containing different defect types by using a camera. The normal cloth image is the cloth image without defect defects, and the resolution is 120 dpi. Images containing defects require that the defect defects be visible to the naked eye at a resolution of 120 dpi. And finally, dividing the collected photos into a training set and a verification set according to the ratio of 8 to 2.
And step S200, manually marking the positions and the classifications of the defects of the photos of the training set and the verification set obtained in the step S100, as shown in FIG. 2.
Step S200 further includes the steps of:
step S201, determining an image labeling rule, wherein the last layer output of the model belongs to softmax output and probability distribution output, and in the process of constructing the image label, the normal cloth is labeled as (1,0,0,0), the cloth containing the pricked holes is labeled as (0,1,0,0), the cloth containing the gross spots is labeled as (0,0, 1,0), and the cloth containing the oil stains is labeled as (0,0,0, 1);
step S202, utilizing a labeling tool labelImg to identify the positions of the defects in the picture according to the labeling rule of the step S201, manually classifying the categories of the defects, and generating a specific labeling file after the classification is finished, wherein the file content comprises the classification categories and the position coordinates of the defects. As shown in fig. 2, after labeling, a specific labeling file is generated, and the file content includes the classification category and the position coordinates of the defects.
And S300, inputting the labeling data obtained in the step S200 into an object detection model based on deep learning, namely an SSD model, carrying out iterative calculation through a gradient descent method, and stopping the training system when the error of the verification set does not descend within 100 iterations.
Further comprising with respect to step S300 the following sub-steps:
step S301, based on the consideration that the number of the data sets does not meet the training requirement, data is used for augmentation, and a series of expansion including picture turning, picture cutting, image blurring and image rotation is carried out on the data of the training set. The expanded data and the original data are input into an object detection model together for training.
Step S302, after the data obtained in step S301 is input into the object detection model, dropout is used, 20% of probability of eliminating each neuron is set in each iteration training, each iteration randomly eliminates a part of neurons in the neural network, and the effect of a single neuron on the training effect is reduced. Meanwhile, the weight is attenuated along with the increase of the iteration times, and overfitting caused by excessively complex models is avoided.
Step S303, under the premise of step S302, an Adam optimization algorithm is used, and the Adam optimization algorithm integrates the advantages of the Momentum algorithm and the RMSprop algorithm, so that the convergence process of iterative computation is accelerated, and the algorithm is further optimized. Meanwhile, the computation amount of the model is reduced by using the depth separable convolution, and the complexity of the model is reduced. When the validation set error did not drop within 100 iterations, the training model was stopped and the training set and validation set error rates dropped during the training process, as shown in FIG. 3.
Step S400, the model obtained in the step S300 is used for intelligent identification of the cloth defects, and the embodiment is used for shooting and detecting the cloth defects in real time on a production line, and specifically comprises the following steps:
and (4) endowing the model parameters obtained in the step (S3) to an original object detection model, taking the test image as the input of the trained object detection model, processing the input by the model, modifying the size of the test image into 400 × 400 by the object detection model, namely the SSD model, performing feature extraction through a feature extraction network in the SSD model to generate a feature map, and predicting the types of the defects and calculating the positions of the defects by the model according to the feature map.
Finally, it is noted that the above-mentioned embodiments illustrate rather than limit the invention, and that, while the invention has been described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (7)

1. A cloth defect intelligent identification method based on deep learning is characterized in that: the method comprises the following steps:
step S1, shooting cloth containing defects of different forms by using a camera to obtain picture materials, and dividing the pictures into a training set and a verification set according to the proportion;
step S2, labeling the picture material obtained in the step S1;
step S3, inputting the labeled data labeled in the step S2 into an object detection model for training, and storing model parameters obtained by training;
and step S4, inputting a test image for defect detection, endowing the model parameters obtained in the step S3 to an original object detection model, taking the test image as the input of a trained object detection model, processing the input image test, and predicting the type of the defect and calculating the position of the defect by the model according to the feature map.
2. The intelligent deep learning-based identification method of cloth defects according to claim 1, characterized in that: the morphology of the defects includes normal, pricked holes, gross spots and oil stains.
3. The intelligent deep learning-based identification method of cloth defects according to claim 1, characterized in that: the training set and validation set ratio was 8: 2.
4. The intelligent deep learning-based identification method of cloth defects according to claim 1, characterized in that: step S2 includes the following steps:
step S201, determining an image labeling rule, wherein the last layer output of a model belongs to softmax output and probability distribution output, and in the process of constructing an image label, the normal cloth is labeled as (1,0,0,0), the cloth containing a prick hole is labeled as (0,1,0,0), the cloth containing a hair spot is labeled as (0,0, 1,0), and the cloth containing oil stains is labeled as (0,0,0, 1);
step S202, utilizing a labeling tool labelImg to identify the positions of the defects in the picture according to the labeling rule of the step S201, manually classifying the categories of the defects, and generating a specific labeling file after the classification is finished, wherein the file content comprises the classification categories and the position coordinates of the defects.
5. The intelligent deep learning-based identification method of cloth defects according to claim 1, characterized in that: the object detection model is an SSD model.
6. The intelligent deep learning-based identification method of cloth defects according to claim 1, characterized in that: step S3 includes the following steps:
step a, inputting the pictures in the training set and the verification set marked in the step S200 into an object detection model, and based on the consideration that the number of the training sets does not meet the training requirement, performing a series of expansion on the data of the training set by using data augmentation, wherein the expansion comprises picture turning, picture cutting, image blurring and image rotation, and inputting the expanded data and the original data into the model for training;
b, after the data obtained in the step a are input into a model, dropout is used, in each iterative training, neurons in a part of neural networks are eliminated according to the probability set in advance, the effect of a single neuron on the training effect is reduced, meanwhile, the weight is attenuated along with the increase of the iteration times, and overfitting caused by the fact that the model is too complex is avoided;
step c, on the premise of the step b, accelerating the convergence process of iterative computation by using an Adam optimization algorithm, and simultaneously reducing the computation amount of the model by using depth separable convolution to reduce the complexity of the model; when the validation set error does not drop within n iterations, the training is stopped.
7. The intelligent deep learning-based identification method of cloth defects according to claim 1, characterized in that: the process described in step S4 includes modifying the test image size to conform to the input size of the object detection model.
CN201911308367.9A 2019-12-18 2019-12-18 Intelligent cloth defect identification method based on deep learning Pending CN111062925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911308367.9A CN111062925A (en) 2019-12-18 2019-12-18 Intelligent cloth defect identification method based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911308367.9A CN111062925A (en) 2019-12-18 2019-12-18 Intelligent cloth defect identification method based on deep learning

Publications (1)

Publication Number Publication Date
CN111062925A true CN111062925A (en) 2020-04-24

Family

ID=70302204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911308367.9A Pending CN111062925A (en) 2019-12-18 2019-12-18 Intelligent cloth defect identification method based on deep learning

Country Status (1)

Country Link
CN (1) CN111062925A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111595237A (en) * 2020-05-13 2020-08-28 广西大学 Machine vision-based fabric size measurement distributed system and method
CN111929327A (en) * 2020-09-09 2020-11-13 深兰人工智能芯片研究院(江苏)有限公司 Cloth defect detection method and device
CN112634194A (en) * 2020-10-20 2021-04-09 天津大学 Self-learning detection method for fabric defects in warp knitting process
CN113189109A (en) * 2021-01-15 2021-07-30 深圳锦绣创视科技有限公司 Flaw judgment system and flaw judgment method based on artificial intelligence
CN113723609A (en) * 2021-09-06 2021-11-30 广州文远知行科技有限公司 Acceleration prediction model training method, acceleration prediction method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399672A (en) * 2008-10-17 2009-04-01 章毅 Intrusion detection method for fusion of multiple neutral networks
CN109086773A (en) * 2018-08-29 2018-12-25 电子科技大学 Fault plane recognition methods based on full convolutional neural networks
CN109614969A (en) * 2018-11-22 2019-04-12 华南理工大学 Extensive distribution line the condition of a disaster based on deep learning repairs image-recognizing method
CN110175988A (en) * 2019-04-25 2019-08-27 南京邮电大学 Cloth defect inspection method based on deep learning
CN110490874A (en) * 2019-09-04 2019-11-22 河海大学常州校区 Weaving cloth surface flaw detecting method based on YOLO neural network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399672A (en) * 2008-10-17 2009-04-01 章毅 Intrusion detection method for fusion of multiple neutral networks
CN109086773A (en) * 2018-08-29 2018-12-25 电子科技大学 Fault plane recognition methods based on full convolutional neural networks
CN109614969A (en) * 2018-11-22 2019-04-12 华南理工大学 Extensive distribution line the condition of a disaster based on deep learning repairs image-recognizing method
CN110175988A (en) * 2019-04-25 2019-08-27 南京邮电大学 Cloth defect inspection method based on deep learning
CN110490874A (en) * 2019-09-04 2019-11-22 河海大学常州校区 Weaving cloth surface flaw detecting method based on YOLO neural network

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111595237A (en) * 2020-05-13 2020-08-28 广西大学 Machine vision-based fabric size measurement distributed system and method
CN111929327A (en) * 2020-09-09 2020-11-13 深兰人工智能芯片研究院(江苏)有限公司 Cloth defect detection method and device
CN112634194A (en) * 2020-10-20 2021-04-09 天津大学 Self-learning detection method for fabric defects in warp knitting process
CN113189109A (en) * 2021-01-15 2021-07-30 深圳锦绣创视科技有限公司 Flaw judgment system and flaw judgment method based on artificial intelligence
CN113723609A (en) * 2021-09-06 2021-11-30 广州文远知行科技有限公司 Acceleration prediction model training method, acceleration prediction method and related device
CN113723609B (en) * 2021-09-06 2024-02-13 广州文远知行科技有限公司 Acceleration prediction model training method, acceleration prediction method and related device

Similar Documents

Publication Publication Date Title
CN111062925A (en) Intelligent cloth defect identification method based on deep learning
CN108562589B (en) Method for detecting surface defects of magnetic circuit material
CN108960245B (en) Tire mold character detection and recognition method, device, equipment and storage medium
CN109509187B (en) Efficient inspection algorithm for small defects in large-resolution cloth images
CN111401418A (en) Employee dressing specification detection method based on improved Faster r-cnn
CN109284779A (en) Object detecting method based on the full convolutional network of depth
CN109064459A (en) A kind of Fabric Defect detection method based on deep learning
Althubiti et al. Circuit manufacturing defect detection using VGG16 convolutional neural networks
CN114494260B (en) Object defect detection method and device, computer equipment and storage medium
Tao et al. Rolling surface defect inspection for drum-shaped rollers based on deep learning
CN112365497A (en) High-speed target detection method and system based on Trident Net and Cascade-RCNN structures
CN114359199A (en) Fish counting method, device, equipment and medium based on deep learning
CN110458791A (en) Mass defect detection method and detection device
CN114494168A (en) Model determination, image recognition and industrial quality inspection method, equipment and storage medium
CN111882547A (en) PCB missing part detection method based on neural network
CN113780484B (en) Industrial product defect detection method and device
CN117372424B (en) Defect detection method, device, equipment and storage medium
CN113516652A (en) Battery surface defect and adhesive detection method, device, medium and electronic equipment
CN113112482A (en) PCB defect detection method based on attention mechanism network
CN116912625A (en) Data enhancement method based on priori defect characteristics and SSPCAB attention mechanism
CN115984215A (en) Fiber bundle defect detection method based on twin network
CN112668365A (en) Material warehousing identification method, device, equipment and storage medium
CN116311190A (en) Clothing type detection and identification method based on YOLOv5s
CN113052255B (en) Intelligent detection and positioning method for reactor
CN112818836A (en) Personnel target detection method and system for transformer substation scene

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