CN110853035A - Sample generation method based on deep learning in industrial visual inspection - Google Patents

Sample generation method based on deep learning in industrial visual inspection Download PDF

Info

Publication number
CN110853035A
CN110853035A CN202010039657.4A CN202010039657A CN110853035A CN 110853035 A CN110853035 A CN 110853035A CN 202010039657 A CN202010039657 A CN 202010039657A CN 110853035 A CN110853035 A CN 110853035A
Authority
CN
China
Prior art keywords
defect
defect picture
picture
pseudo
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.)
Granted
Application number
CN202010039657.4A
Other languages
Chinese (zh)
Other versions
CN110853035B (en
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.)
Focusight Technology Co Ltd
Original Assignee
Focusight Technology Co Ltd
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 Focusight Technology Co Ltd filed Critical Focusight Technology Co Ltd
Priority to CN202010039657.4A priority Critical patent/CN110853035B/en
Publication of CN110853035A publication Critical patent/CN110853035A/en
Application granted granted Critical
Publication of CN110853035B publication Critical patent/CN110853035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • 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/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Abstract

The invention relates to a sample generation method based on deep learning in industrial visual detection, which aims to solve the problems of few samples, long sample training time and high similarity among samples in the existing visual detection and comprises the following steps: a) extracting the defects in the real defect picture; b) fusing the extracted defect and non-defective pictures to generate a pseudo-defect picture; c) the pseudo-defect picture is processed and then sent to a generation network in the antagonistic neural network to generate a defect picture; d) continuing to generate a pseudo-defect picture according to the step b), and then repeatedly and iteratively training the network according to the step c); e) and when the training in the step d) meets the requirements, adding the generated defect picture into the sequence of the real defect picture, and continuing the iterative training.

Description

Sample generation method based on deep learning in industrial visual inspection
Technical Field
The invention relates to a sample generation method, in particular to a sample generation method based on deep learning in industrial visual inspection.
Background
With the opening of the artificial intelligence era, deep learning is advanced and widely applied to various fields. In the field of machine vision, the detection effect and the operability of the algorithm software based on deep learning are far better than those of the traditional method, but the following problems still exist:
1. deep learning requires a large number of sample pictures to train the neural network, but in consideration of actual conditions, the problem of lack of defect samples may be caused due to low defect rate of products, uneven distribution of defect types and the like.
2. At present, a method for generating a sample picture by using an anti-neural network is tried to solve the problems, but in the existing technology for generating a defect sample by using an anti-neural network, because a real defect sample picture and a random one-dimensional noise point are used as input of the anti-neural network, the training speed is very slow, and finally, the generated sample has very high similarity with an original sample picture.
In brief, when the deep learning is used for industrial visual detection, enough defect samples with quality meeting requirements are difficult to obtain, and the problems that the conventional antagonistic neural network has high similarity between generated samples and cannot meet the requirement of training and detecting the neural network exist.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method aims to solve the problems that the existing industrial visual detection has few samples, the training time of the conventional anti-neural network generation samples is long, and the similarity between the generated samples is high: provided is a sample generation method based on deep learning in industrial visual inspection.
The technical scheme adopted by the invention for solving the technical problems is as follows: the sample generation method based on deep learning in industrial visual inspection is provided, and comprises the following steps:
a) extracting the defects in the real defect picture;
b) fusing the extracted defect and the defect-free sample picture to generate a pseudo-defect picture;
c) sending the pseudo-defect picture into a generation network in a countering neural network after preprocessing to generate a defect picture;
d) continuing to generate a pseudo-defect picture according to the step b), and then repeatedly iterating according to the step c) to train a network;
e) and when the training in the step d) meets the requirements, adding the generated defect picture into the sequence of the real defect picture, and continuing the iterative training.
Further, in the step b), the extracted defects are fused to corresponding positions of the non-defective pictures by adopting a P-map algorithm, so as to generate pseudo-defective pictures.
Further, the pseudo-defect picture in step c) is preprocessed by: firstly, the pseudo-defect picture is down-sampled according to the number of pixels and the length of a one-dimensional signal input in a generation network, the number of pixels of a small image obtained by down-sampling is consistent with the length of the one-dimensional signal, then the small image is straightened into the one-dimensional signal, and finally the one-dimensional signal is input into the generation network of the anti-neural network.
Further, the one-dimensional signal is a vector which is formed by arranging pixel values of the small images from left to right and from top to bottom.
Further, the step e) adopts sample availability judgment to judge whether the training meets the requirements; the judgment standard is as follows: and when the iteration round number exceeds the preset round number and the loss score output by the discrimination network in the antagonistic neural network is within a preset range value, judging that the training meets the requirement.
Further, the formula of the sample availability judgment is as follows: i _ epoch > Ti and | Loss _ g-Loss _ d | < Ts, wherein i _ epoch is the number of iteration rounds, Ti is the iteration threshold, Loss _ g is the Loss score of the generated defect picture, Loss _ d is the Loss score of the real defect picture, and Ts is the score difference threshold.
The invention has the advantages that the defects in the background technology are overcome, a sample generation method based on deep learning in industrial visual inspection is provided, a defect sample picture with not very high quality is generated by utilizing a traditional image algorithm, then the sample pictures are subjected to down-sampling, data which accords with the input format of an antagonistic neural network model are input into the antagonistic neural network for further modification and processing, the generated defect sample picture is obtained, and the generated picture which accords with the discrimination standard is combined with the original picture in a certain proportion to be used as the input of the antagonistic neural network; in the iteration, sufficient sample pictures meeting the requirement of the detection neural network can be finally generated, and the generated pictures are finally provided for deep learning.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The invention will now be described in further detail with reference to the drawings and preferred embodiments. These drawings are simplified schematic views illustrating only the basic structure of the present invention in a schematic manner, and thus show only the constitution related to the present invention.
Fig. 1 shows a sample generation method based on deep learning in industrial visual inspection, which includes the following steps:
firstly, defects in a real defect picture are extracted by adopting a conventional algorithm or manual labeling, the real defect picture is a product picture which is really obtained on a defect product, then, the extracted defects are subjected to random translation, rotation and projection operations by adopting a P picture algorithm, the extracted defects are pasted to corresponding positions of a non-defective sample picture, and the processing such as blurring and blurring is carried out on the periphery to achieve the effect of fusion, so that a pseudo-defect picture is generated.
The obtained pseudo-defect picture is downsampled according to the number of pixels and the length of a one-dimensional signal input into a generating network, the number of pixel points of a small image after downsampling is consistent with the length of the one-dimensional signal (namely a vector) received by the generating network in the antagonistic neural network, the pixel values of the small image are arranged from left to right and from top to bottom to generate the one-dimensional vector, and a random one-dimensional noise point of the conventional antagonistic neural network is replaced to be used as a new input, so that the generating network part of the antagonistic neural network can have better initial input, and the training time can be effectively reduced.
The antagonistic neural network generates a defect picture according to the input one-dimensional signal; and then, continuously generating a pseudo-defect picture by using a P picture algorithm, and repeatedly iterating according to the steps to train the network.
And identifying whether the training meets the requirements by adopting sample availability judgment, wherein the sample availability judgment formula is as follows: i _ epoch > Ti and | Loss _ g-Loss _ d | < Ts,
wherein the content of the first and second substances,
i _ epoch is the number of iteration rounds, as shown in fig. 1, an arrow pointing to a sample availability judgment formula of the generated defect picture indicates the number of iteration rounds;
ti is an iteration threshold;
loss _ g is a Loss score of the generated defect picture, and is obtained by sending the generated defect picture into a discrimination network as shown in fig. 1;
loss _ d is the Loss score of the real defect picture, as shown in fig. 1, which is obtained by sending the real defect picture into a discrimination network;
ts is the score difference threshold.
When the iteration round number i _ epoch exceeds the preset round number (the threshold used in the present solution is 300 rounds), and when the Loss score output by the discrimination network in the antagonistic neural network (i.e. the value calculated by the Loss function, in fig. 1, the discrimination network indicates the input of the parameter indicated by the arrow pointing to the sample availability judgment formula) reaches a certain range (the value selected in the present solution is 0.01, i.e. | Loss _ g-Loss _ d | <0.01, the judgment is qualified), the generated pictures are added into the sequence of the real defect pictures, the iterative training is continued, finally, sufficient generated defect sample pictures with satisfactory quality are obtained, and the pictures can be provided for the detection neural network to continue the training. The sample usability judgment must satisfy the settings of the iteration threshold and the score difference threshold at the same time to add the generated picture to the sequence of real defect pictures.
The 300 rounds mentioned above can be set as desired, e.g., 100 rounds, 500 rounds or even 1 round is also possible, and similarly the difference threshold of 0.01 can be set as desired, e.g., 0.001, 0.1, etc., as described herein.
While particular embodiments of the present invention have been described in the foregoing specification, various modifications and alterations to the previously described embodiments will become apparent to those skilled in the art from this description without departing from the spirit and scope of the invention.

Claims (6)

1. A sample generation method based on deep learning in industrial visual inspection is characterized in that: the method comprises the following steps:
a) extracting the defects in the real defect picture;
b) fusing the extracted defect and the defect-free sample picture to generate a pseudo-defect picture;
c) sending the pseudo-defect picture into a generation network in a countering neural network after preprocessing to generate a defect picture;
d) continuing to generate a pseudo-defect picture according to the step b), and then repeatedly iterating according to the step c) to train a network;
e) and when the training in the step d) meets the requirements, adding the generated defect picture into the sequence of the real defect picture, and continuing the iterative training.
2. The method for generating samples based on deep learning in industrial vision inspection as claimed in claim 1, characterized in that: in the step b), the extracted defects are fused to the corresponding positions of the non-defective pictures by adopting a P-map algorithm, so that the pseudo-defective pictures are generated.
3. The method for generating samples based on deep learning in industrial vision inspection as claimed in claim 1, characterized in that: the pseudo-defect picture in the step c) is preprocessed by the following steps: firstly, the pseudo-defect picture is down-sampled according to the number of pixels and the length of a one-dimensional signal input in a generation network, the number of pixels of a small image obtained by down-sampling is consistent with the length of the one-dimensional signal, then the small image is straightened into the one-dimensional signal, and finally the one-dimensional signal is input into the generation network of the anti-neural network.
4. The method for generating samples based on deep learning in industrial visual inspection according to claim 3, characterized in that: the one-dimensional signal is a vector consisting of pixel values of the small pictures arranged from left to right, from top to bottom.
5. The method for generating samples based on deep learning in industrial vision inspection as claimed in claim 1, characterized in that: judging whether the training meets the requirement or not by adopting sample availability judgment; the judgment standard is as follows: and when the iteration round number exceeds the preset round number and the loss score output by the discrimination network in the antagonistic neural network is within a preset range value, judging that the training meets the requirement.
6. The method for generating samples based on deep learning in industrial vision inspection as claimed in claim 5, characterized in that: the formula of the sample availability judgment is as follows: i _ epoch > Ti and | Loss _ g-Loss _ d | < Ts, wherein i _ epoch is the number of iteration rounds, Ti is the iteration threshold, Loss _ g is the Loss score of the generated defect picture, Loss _ d is the Loss score of the real defect picture, and Ts is the score difference threshold.
CN202010039657.4A 2020-01-15 2020-01-15 Sample generation method based on deep learning in industrial visual inspection Active CN110853035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010039657.4A CN110853035B (en) 2020-01-15 2020-01-15 Sample generation method based on deep learning in industrial visual inspection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010039657.4A CN110853035B (en) 2020-01-15 2020-01-15 Sample generation method based on deep learning in industrial visual inspection

Publications (2)

Publication Number Publication Date
CN110853035A true CN110853035A (en) 2020-02-28
CN110853035B CN110853035B (en) 2020-04-28

Family

ID=69610750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010039657.4A Active CN110853035B (en) 2020-01-15 2020-01-15 Sample generation method based on deep learning in industrial visual inspection

Country Status (1)

Country Link
CN (1) CN110853035B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111429411A (en) * 2020-03-16 2020-07-17 东南大学 Method for generating X-ray defect image sample of carbon fiber composite core wire
CN111784663A (en) * 2020-06-30 2020-10-16 北京百度网讯科技有限公司 Method and device for detecting parts, electronic equipment and storage medium
CN111932531A (en) * 2020-09-21 2020-11-13 广东利元亨智能装备股份有限公司 Model training method, welding spot defect detection method and device and electronic equipment
CN112070712A (en) * 2020-06-05 2020-12-11 宁波大学 Printing defect detection method based on self-encoder network
CN112102252A (en) * 2020-08-21 2020-12-18 北京无线电测量研究所 Method and device for detecting appearance defects of micro-strip antenna welding spot
CN113095400A (en) * 2021-04-09 2021-07-09 安徽芯纪元科技有限公司 Deep learning model training method for machine vision defect detection
CN113284086A (en) * 2021-03-31 2021-08-20 广东电力信息科技有限公司 Method and device for generating and detecting power scarcity defect image and related equipment
CN114529484A (en) * 2022-04-25 2022-05-24 征图新视(江苏)科技股份有限公司 Deep learning sample enhancement method for direct current component change in imaging
CN112070712B (en) * 2020-06-05 2024-05-03 湖北金三峡印务有限公司 Printing defect detection method based on self-encoder network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961217A (en) * 2018-06-08 2018-12-07 南京大学 A kind of detection method of surface flaw based on positive example training
CN109741328A (en) * 2019-02-02 2019-05-10 东北大学 A kind of automobile apparent mass detection method based on production confrontation network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961217A (en) * 2018-06-08 2018-12-07 南京大学 A kind of detection method of surface flaw based on positive example training
CN109741328A (en) * 2019-02-02 2019-05-10 东北大学 A kind of automobile apparent mass detection method based on production confrontation network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TOM HARDY: "基于U-Net+残差网络的语义分割缺陷检测", 《CSDNHTTPS://BLOG.CSDN.NET/QQ_29462849/ARTICLE/DETAILS/84779292》 *
XIAOFENG HAN等: "Semisupervised and Weakly Supervised Road Detection Based on Generative Adversarial Networks", 《IEEE SIGNAL PROCESSING LETTERS》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111429411A (en) * 2020-03-16 2020-07-17 东南大学 Method for generating X-ray defect image sample of carbon fiber composite core wire
CN111429411B (en) * 2020-03-16 2023-04-25 东南大学 X-ray defect image sample generation method for carbon fiber composite core wire
CN112070712A (en) * 2020-06-05 2020-12-11 宁波大学 Printing defect detection method based on self-encoder network
CN112070712B (en) * 2020-06-05 2024-05-03 湖北金三峡印务有限公司 Printing defect detection method based on self-encoder network
CN111784663A (en) * 2020-06-30 2020-10-16 北京百度网讯科技有限公司 Method and device for detecting parts, electronic equipment and storage medium
CN111784663B (en) * 2020-06-30 2024-01-23 北京百度网讯科技有限公司 Method and device for detecting parts, electronic equipment and storage medium
CN112102252A (en) * 2020-08-21 2020-12-18 北京无线电测量研究所 Method and device for detecting appearance defects of micro-strip antenna welding spot
CN112102252B (en) * 2020-08-21 2023-11-28 北京无线电测量研究所 Method and device for detecting appearance defects of welding spots of microstrip antenna
CN111932531A (en) * 2020-09-21 2020-11-13 广东利元亨智能装备股份有限公司 Model training method, welding spot defect detection method and device and electronic equipment
CN113284086A (en) * 2021-03-31 2021-08-20 广东电力信息科技有限公司 Method and device for generating and detecting power scarcity defect image and related equipment
CN113095400A (en) * 2021-04-09 2021-07-09 安徽芯纪元科技有限公司 Deep learning model training method for machine vision defect detection
CN114529484A (en) * 2022-04-25 2022-05-24 征图新视(江苏)科技股份有限公司 Deep learning sample enhancement method for direct current component change in imaging

Also Published As

Publication number Publication date
CN110853035B (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN110853035B (en) Sample generation method based on deep learning in industrial visual inspection
CN108986050B (en) Image and video enhancement method based on multi-branch convolutional neural network
CN110678877B (en) System and method for visual localization in test images
CN106920229B (en) Automatic detection method and system for image fuzzy area
CN110969589B (en) Dynamic scene blurred image blind restoration method based on multi-stream annotating countermeasure network
EP3859592A1 (en) Damage identification result optimization method and device
CN111126115A (en) Violence sorting behavior identification method and device
CN108509876B (en) Object detection method, device, apparatus, storage medium, and program for video
CN116452469B (en) Image defogging processing method and device based on deep learning
CN113870236B (en) Composite material defect nondestructive inspection method based on deep learning algorithm
CN115760823A (en) Defect detection method and device and electronic equipment
Ge et al. Real-time pose estimation for an underwater object combined with deep learning and prior information
CN113792751A (en) Cross-domain behavior identification method, device, equipment and readable storage medium
CN114821048A (en) Object segmentation method and related device
KR20230030258A (en) Semi-supervised learning-based defect detection method using small amount of label data
CN113095400A (en) Deep learning model training method for machine vision defect detection
CN116848547A (en) Image processing method and system
CN110211085B (en) Image fusion quality evaluation method and system
CN113117341B (en) Picture processing method and device, computer readable storage medium and electronic equipment
CN115118948B (en) Repairing method and device for irregular shielding in panoramic video
CN116703905B (en) Empty material detection method, device, electronic equipment and computer readable storage medium
CN110866487B (en) Large-scale pedestrian detection and re-identification sample set construction method and device
Vargas-Campos et al. Optimization of DCP dehazing algorithm through sky segmentation
Zhou et al. Multi-operator feature enhancement methods for industrial defect detection
Ma et al. Quality detection method for controller process based on mask R-CNN network model

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
GR01 Patent grant
GR01 Patent grant