CN114782431A - Printed circuit board defect detection model training method and defect detection method - Google Patents

Printed circuit board defect detection model training method and defect detection method Download PDF

Info

Publication number
CN114782431A
CN114782431A CN202210694133.8A CN202210694133A CN114782431A CN 114782431 A CN114782431 A CN 114782431A CN 202210694133 A CN202210694133 A CN 202210694133A CN 114782431 A CN114782431 A CN 114782431A
Authority
CN
China
Prior art keywords
printed circuit
learning
circuit board
sample
information
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
CN202210694133.8A
Other languages
Chinese (zh)
Other versions
CN114782431B (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.)
Suzhou Kangdai Intelligent Technology Co ltd
Original Assignee
Suzhou Kangdai Intelligent 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 Suzhou Kangdai Intelligent Technology Co ltd filed Critical Suzhou Kangdai Intelligent Technology Co ltd
Priority to CN202210694133.8A priority Critical patent/CN114782431B/en
Publication of CN114782431A publication Critical patent/CN114782431A/en
Application granted granted Critical
Publication of CN114782431B publication Critical patent/CN114782431B/en
Priority to TW111147431A priority patent/TWI840006B/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a training method and a defect detection method for a defect detection model of a printed circuit board, wherein the training method comprises the following steps: acquiring design document information of the printed circuit board, wherein the design document information comprises area information of the printed circuit board; scanning the printed circuit board by using scanning camera equipment to obtain a scanned image of the printed circuit board; generating learning samples based on the scanned image and the area information of the printed circuit board, wherein each learning sample comprises a sample image and a corresponding label, and the method comprises the following steps: intercepting a local image in the scanned image to obtain a sample image, and performing manual marking on the sample image, wherein a label obtained by manual marking comprises area information and defect information; establishing a sample library, wherein the sample library comprises the steps of collecting and storing learning samples generated based on a plurality of printed circuit boards respectively; and training the basic model by using the learning samples of the sample library to obtain a defect detection model of the printed circuit board.

Description

Printed circuit board defect detection model training method and defect detection method
Technical Field
The invention relates to the field of PCB defect detection, in particular to a training method and a defect detection method for a defect detection model of a printed circuit board.
Background
Automatic Optical Inspection (AOI) equipment has become an important Inspection tool and process quality control tool for ensuring product quality in the electronic manufacturing industry, and the Inspection principle of the AOI equipment is as follows: when the test is carried out automatically, the AOI equipment automatically scans the PCB product through the high-definition CCD camera to acquire images, the tested detection points are compared with qualified parameters in the database, and the defects on the tested product are detected through image processing.
Typically, after detecting a defect by the AOI device, the defect information is sent to a maintainer for maintenance. However, the detection accuracy of the AOI device is low, for example, dust or stain on the circuit board can be mistakenly judged as a defect by the AOI device, and therefore, the precision measurement accuracy of the PCB defect in the prior art needs to be improved.
The above background disclosure is only for the purpose of assisting understanding of the inventive concept and technical solutions of the present invention, and does not necessarily belong to the prior art of the present patent application nor give technical teaching; the above background should not be used to assess the novelty or inventiveness of the present application in the event that there is no clear evidence that the above disclosure has been made prior to the filing date of the present patent application.
Disclosure of Invention
The invention aims to provide a training method of a defect detection model of a printed circuit board, which is used for training an improved AI model and can accurately and quickly identify the defects of the circuit board.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a printed circuit board defect detection model training method comprises the following steps:
acquiring design document information of a printed circuit board, wherein the design document information comprises layer information and/or area block position information of the printed circuit board; scanning the printed circuit board by using scanning camera equipment to obtain a scanned image of the printed circuit board;
generating one or more learning samples based on the scanned image of the printed circuit board and the design document information, each learning sample comprising a sample image and a corresponding label, comprising: intercepting a local image in the scanned image to obtain a sample image, and performing manual marking on the sample image, wherein a label obtained by manual marking comprises one or two of layer information and area block position information and defect information;
establishing a sample library, which comprises the steps of collecting and storing learning samples generated on the basis of a plurality of printed circuit boards respectively;
and training a basic model by using the learning samples of the sample library to obtain a defect detection model of the printed circuit board.
Further, the base model is configured with a first learning submodule and a second learning submodule, wherein,
the first learning submodule performs learning training based on sample images in the learning samples and defect information in the labels to obtain an intermediate model;
the second learning submodule learns the characteristic information between one or two of the layer information and the region block position information and the defect information based on the label in the learning sample; and the number of the first and second electrodes,
and the intermediate model is combined with the characteristic information learned by the second learning submodule to relearn the sample image in the learning sample to obtain the printed circuit board defect detection model.
Further, the relearning, by the intermediate model and in combination with the feature information learned by the second learning submodule, the sample image in the learning sample includes:
and if the layer information corresponding to the sample image is a power supply layer or a ground layer, the learning target of the intermediate model is to learn the features in the sample image as non-short-circuit features.
Further, the relearning, by the intermediate model and in combination with the feature information learned by the second learning submodule, the sample image in the learning sample includes:
if the layer information corresponding to the sample image is a line layer or the corresponding area block location information is a copper surface area, the intermediate model focuses learning attention on a specific learning sample, the defect information in the label of the specific learning sample is defective, and the defect type is other types except short circuit and open circuit, or the defect information in the label of the specific learning sample is non-defective.
Further, the method for the intermediate model to learn the specific learning sample is as follows:
if two separate copper features or a line feature connecting two flat lines exist in the sample image of the specific learning sample, the recognition force of the two separate copper features or the recognition force of the line feature connecting the two flat lines in the sample image is weakened.
Further, the relearning, by the intermediate model and in combination with the feature information learned by the second learning submodule, the sample image in the learning sample includes:
if the layer information corresponding to the sample image is a line layer or the corresponding area block position information is a copper surface area, the method for the intermediate model to learn the sample image corresponding to the defect information with the defect type of short circuit comprises the following steps: the discrimination of two separate copper features in the sample image is enhanced, or the discrimination of a line feature connecting two flat lines in the sample image is enhanced.
Further, the relearning, by the intermediate model and in combination with the feature information learned by the second learning submodule, the sample image in the learning sample includes:
if the layer information corresponding to the sample image is a circuit layer or the corresponding area block position information is a copper surface area, the method for the intermediate model to learn the sample image corresponding to the defect information with the defect type of open circuit comprises the following steps: and reinforcing the recognition force of the characteristic of the flat cable with the notch in the sample image.
Further, preprocessing the sample library, comprising: traversing sample images in a sample library, and if layer information corresponding to the sample images is a circuit layer or corresponding area block position information is a copper surface area, respectively marking different colors on electronic devices and copper wires in the sample images by using an image processor;
and training the basic model by using the preprocessed learning sample of the sample library to obtain a defect detection model of the printed circuit board.
Further, the scanning camera apparatus is integrated on an AOI apparatus to which design document information of the printed circuit board is input, and the base model is a detection model of the AOI apparatus or an AI model of a rear end thereof.
Further, a training set and a testing set are constructed by utilizing the sample library, and the training set is utilized to train the basic model for multiple times;
and verifying the trained model by using the test set, wherein the verification comprises the following steps: calculating the loss value of the trained model by using a mean square error loss function or an average absolute value error loss function; calculating the accuracy of the trained model according to the prediction times and the total prediction times of the prediction result which are consistent with the label;
verifying whether the loss value and the accuracy both meet a preset training target, and taking a currently trained model as the printed circuit board defect detection model; otherwise, carrying out iterative training by using the training set until the loss value and the accuracy of the model obtained by the iterative training are verified.
According to another aspect of the present invention, there is provided a printed circuit board defect detecting method including the steps of:
acquiring an image of a printed circuit board to be detected and layer information and/or area block position information of the printed circuit board to be detected;
inputting the image of the printed circuit board and the layer information and/or the area block position information thereof into a printed circuit board defect detection model which is trained in advance;
the printed circuit board defect detection model outputs a detection result;
the printed circuit board defect detection model is trained through the following steps:
acquiring design document information of a printed circuit board, wherein the design document information comprises layer information and/or area block position information of the printed circuit board; scanning the printed circuit board by using scanning camera equipment to obtain a scanned image of the printed circuit board;
generating one or more learning samples based on the scanned image of the printed circuit board and the design document information, each learning sample comprising a sample image and a corresponding label, comprising: intercepting a local image in the scanned image to obtain a sample image, and performing manual marking on the sample image, wherein a label obtained by manual marking comprises one or two of layer information and area block position information and defect information;
establishing a sample library, wherein the sample library comprises the steps of collecting and storing learning samples generated based on a plurality of printed circuit boards respectively;
training a basic model by using the learning samples of the sample library, wherein the basic model is provided with a first learning submodule and a second learning submodule, and the first learning submodule is used for learning and training based on sample images in the learning samples and defect information in the labels to obtain an intermediate model; the second learning submodule learns the characteristic information between the defect information and one or two of the layer information and the area block position information based on the label in the learning sample; and the intermediate model is combined with the characteristic information learned by the second learning submodule to relearn the sample image in the learning sample to obtain the printed circuit board defect detection model.
Further, the printed circuit board defect detection model is obtained by training through the printed circuit board defect detection model training method.
The technical scheme provided by the invention has the following beneficial effects:
a. the method comprises the steps of fully utilizing regional information of a circuit board to learn rules between the regional information and defects, training to obtain an improved AI model, and accurately identifying a circuit board image by the improved AI model in combination with the regional information of the circuit board;
b. the associated characteristics of the circuit board area and the circuit board defects are mastered, the defect types which cannot exist in some areas can be eliminated quickly, and the defect detection efficiency and the accuracy of the detection result are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a conceptual diagram provided by an exemplary embodiment of the present invention;
FIG. 2 is a schematic flow chart of printed circuit board defect inspection model training provided by an exemplary embodiment of the present invention;
fig. 3 is a schematic flowchart of training an AI base model using circuit board area information according to an exemplary embodiment of the present invention;
fig. 4 is an information flow diagram of printed circuit board defect detection provided by an exemplary embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
In the defect detection of a Printed Circuit Board (PCB), a scanned image of the PCB is generally input into an AI model, features in the image are extracted by an image analysis technique, and whether the features conform to the defect or not is analyzed, that is, in the current defect detection technique, only the image of the PCB is analyzed and detected. The invention provides a technology for detecting defects by combining circuit board images with corresponding area information, which utilizes the whole layer area information or local area information of a circuit board to assist an AI model to obtain the PCB defect detection result more quickly and accurately. As shown in fig. 1, each circuit board/each type of circuit board has a corresponding design document, in which information of each layer of the circuit board and distributed design information on each layer, called as area block location information, are recorded in detail; in one embodiment of the invention, the AOI equipment has a function of preliminarily identifying defects, correspondingly, the AOI equipment identifies the defective areas and intercepts the defective areas to obtain PCB sub-images, and then transmits the PCB sub-images to the AI model at the back end.
The local area with slight abnormality on the PCB scanning image is identified by the AOI equipment, according to experience, the sub-images which are intercepted have wrong judgment conditions, such as some dust or stains, are sent to the AI model, and the AI model combines the area information of the sub-images of the PCBs to accurately identify the sub-images of the PCBs, so that false defects identified by the AOI equipment by mistake are effectively eliminated. Unlike other PCB defect detection models, the AI model in the invention is a model for carrying out AI identification on a PCB image by combining area information, therefore, the invention provides a method for training the same, and as shown in figure 2, the method for training the PCB defect detection model comprises the following steps:
acquiring design document information of a printed circuit board, wherein the design document information comprises layer information and/or area block position information of the printed circuit board; scanning the printed circuit board by using scanning camera equipment to obtain a scanned image of the printed circuit board;
generating one or more learning samples based on the scanned image of the printed circuit board and the design document information, each learning sample comprising a sample image and a corresponding label, comprising: intercepting a local image in the scanned image to obtain a sample image, and carrying out manual marking on the sample image, wherein a label obtained by the manual marking comprises one or two of layer information, area block position information and defect information;
establishing a sample library, wherein the sample library comprises the steps of collecting and storing learning samples generated based on a plurality of printed circuit boards respectively;
and training a basic model by using the learning samples of the sample library to obtain a defect detection model of the printed circuit board.
The specific way of training the AI basic model using the learning samples with layer information and/or area block location information (referred to simply as area information in fig. 3) of the printed circuit board is as follows: referring to fig. 3, the base model is configured with a first learning sub-module and a second learning sub-module, wherein,
the first learning submodule performs learning training on the basis of sample images in the learning samples and defect information in the labels to obtain an intermediate model;
the second learning submodule learns the characteristic information between the defect information and one or two of the layer information and the area block position information based on the label in the learning sample; and also,
and the intermediate model is combined with the characteristic information learned by the second learning submodule to relearn the sample image in the learning sample to obtain the printed circuit board defect detection model.
The intermediate model combines the feature information learned by the second learning submodule to relearn the sample image in the learning sample, and the relearning comprises the following aspects:
according to the first aspect, the second learning submodule learns feature information that short-circuit defects do not exist in the PCB image of the power supply layer or the ground layer, and based on the learning result, when the learning layer information is a sample image of the power supply layer or the ground layer, the learning target of the intermediate model is to learn features in the sample image to be non-short-circuit features.
In the second aspect, the second learning submodule learns that, in an image in which layer information is a line layer or corresponding area block position information is a copper surface area, the defect types are concentrated in two types of short circuit and open circuit with high probability, and based on the learning result, when the intermediate model learns that the line layer or corresponding area block position information is a sample image of the copper surface area, the intermediate model concentrates learning attention on a specific learning sample, the defect information in a label of the specific learning sample is defective, and the defect types are other types than short circuit and open circuit, or the defect information in the label of the specific learning sample is non-defective. The defect types with small probability are learned, the probability that the defects in the images of the circuit layer or the copper surface area are mistakenly identified as the short circuit or open circuit type is reduced, and the identification accuracy is improved.
Specifically, the method for the intermediate model to learn the specific learning sample includes: if two separate copper features or line features connecting two flat lines exist in the sample image of the specific learning sample, the recognition power of the two separate copper features or the recognition power of the line features connecting the two flat lines in the sample image is weakened.
In a third aspect, in addition to focusing the learning attention on the specific learning sample in the second aspect, learning is also required to be performed on a non-specific learning sample (that is, the defect information in the label is of a short circuit or open circuit type), and for a sample image of the short circuit type, the intermediate model strengthens the recognition power of two separate copper features in the sample image; alternatively, the intermediate model enhances the recognition of the line features connecting the two flat lines in the sample image. For the sample image of the open circuit type, the intermediate model combines the feature information learned by the second learning submodule to strengthen the recognition force of the features with gaps on the flat cable in the sample image.
In one embodiment of the present invention, the area information of the circuit board can be used to pre-process the sample library, including: traversing sample images in a sample library, and if layer information corresponding to the sample images is a circuit layer or position information of corresponding area blocks is a copper surface area, respectively marking different colors on electronic devices and copper wires in the sample images by using an image processor; and training the basic model by using the preprocessed learning sample of the sample library to obtain a defect detection model of the printed circuit board. By knowing which areas are the areas where the electronic devices are located and which areas are the areas where the copper wires are located, different colors can be respectively marked on the electronic devices and the copper wires, so that the electronic devices and the copper wires can be more easily distinguished by a model, and the efficiency and the accuracy of defect identification are further improved.
In the training process of the printed circuit board defect detection model, the convergence and verification of the model are also involved: constructing a training set and a testing set by using the sample library, and performing multiple rounds of training on the basic model by using the training set;
verifying the trained model by using the test set, comprising: calculating the loss value of the trained model by using a mean square error loss function or an average absolute value error loss function; and calculating the accuracy of the trained model according to the prediction times and the total prediction times of the prediction result which are consistent with the labels:
Figure DEST_PATH_IMAGE002
verifying whether the loss value and the accuracy both meet a preset training target, and taking a currently trained model as the printed circuit board defect detection model; otherwise, carrying out iterative training by using the training set until the loss value and the accuracy of the model obtained by iterative training are verified.
In one embodiment of the present invention, there is provided a method for detecting defects of a printed circuit board, as shown in fig. 4, the method comprising the steps of:
acquiring an image of a printed circuit board to be detected and layer information and/or area block position information of the printed circuit board to be detected;
inputting the image of the printed circuit board and the layer information and/or the area block position information thereof into a printed circuit board defect detection model which is trained in advance;
the printed circuit board defect detection model outputs a detection result;
the printed circuit board defect detection model is trained through the following steps:
acquiring design document information of a printed circuit board, wherein the design document information comprises layer information and/or area block position information of the printed circuit board; scanning the printed circuit board by using scanning camera equipment to obtain a scanned image of the printed circuit board;
generating one or more learning samples based on the scanned image and the design document information of the printed circuit board, each learning sample comprising a sample image and a corresponding label, comprising: intercepting a local image in the scanned image to obtain a sample image, and carrying out manual marking on the sample image, wherein a label obtained by the manual marking comprises one or two of layer information, area block position information and defect information;
establishing a sample library, which comprises the steps of collecting and storing learning samples generated on the basis of a plurality of printed circuit boards respectively;
training a basic model by using the learning samples of the sample library, wherein the basic model is provided with a first learning submodule and a second learning submodule, and the first learning submodule performs learning training on the basis of sample images in the learning samples and defect information in the labels to obtain an intermediate model; the second learning submodule learns the characteristic information between the defect information and one or two of the layer information and the area block position information based on the label in the learning sample; and the intermediate model is combined with the characteristic information learned by the second learning submodule to relearn the sample image in the learning sample to obtain the printed circuit board defect detection model.
The embodiment of the defect detection method is to perform AI identification on the input image of the printed circuit board to be detected and layer information and/or area block position information thereof by using the printed circuit board defect detection model obtained by training in the embodiment of the training method, and further output a defect detection result. The whole content of the embodiment of the printed circuit board defect detection model training method is introduced into the embodiment of the printed circuit board defect detection method.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The foregoing is illustrative of the present disclosure and it will be appreciated by those skilled in the art that changes may be made in this embodiment without departing from the principles of the disclosure, the scope of which is defined by the appended claims.

Claims (12)

1. A printed circuit board defect detection model training method is characterized by comprising the following steps:
acquiring design document information of a printed circuit board, wherein the design document information comprises layer information and/or area block position information of the printed circuit board; scanning the printed circuit board by using scanning camera equipment to obtain a scanned image of the printed circuit board;
generating one or more learning samples based on the scanned image of the printed circuit board and the design document information, each learning sample comprising a sample image and a corresponding label, comprising: intercepting a local image in the scanned image to obtain a sample image, and performing manual marking on the sample image, wherein a label obtained by manual marking comprises one or two of layer information and area block position information and defect information;
establishing a sample library, which comprises the steps of collecting and storing learning samples generated on the basis of a plurality of printed circuit boards respectively;
and training a basic model by using the learning samples of the sample library to obtain a defect detection model of the printed circuit board.
2. The method of claim 1, wherein the base model is configured with a first learning submodule and a second learning submodule, wherein,
the first learning submodule performs learning training based on sample images in the learning samples and defect information in the labels to obtain an intermediate model;
the second learning submodule learns the characteristic information between one or two of the layer information and the region block position information and the defect information based on the label in the learning sample; and also,
and the intermediate model is combined with the characteristic information learned by the second learning submodule to relearn the sample image in the learning sample to obtain the printed circuit board defect detection model.
3. The printed circuit board defect detection model training method of claim 2, wherein the relearning of the sample images in the learning samples by the intermediate model in combination with the feature information learned by the second learning submodule comprises:
and if the layer information corresponding to the sample image is a power supply layer or a ground layer, learning the characteristics in the sample image as non-short-circuit characteristics by the learning target of the intermediate model.
4. The printed circuit board defect detection model training method of claim 2, wherein the relearning of the sample images in the learning samples by the intermediate model in combination with the feature information learned by the second learning submodule comprises:
if the layer information corresponding to the sample image is a line layer or the corresponding area block position information is a copper surface area, the intermediate model focuses the learning attention on a specific learning sample, the defect information in the label of the specific learning sample is defective, and the defect type is other types except short circuit and open circuit, or the defect information in the label of the specific learning sample is non-defective.
5. The method for training the defect inspection model of the printed circuit board according to claim 4, wherein the method for learning the specific learning sample by the intermediate model comprises the following steps:
if two separate copper features or line features connecting two flat lines exist in the sample image of the specific learning sample, the recognition power of the two separate copper features or the recognition power of the line features connecting the two flat lines in the sample image is weakened.
6. The printed circuit board defect detection model training method of claim 2, wherein the relearning of the sample images in the learning samples by the intermediate model in combination with the feature information learned by the second learning submodule comprises:
if the layer information corresponding to the sample image is the line layer or the corresponding area block position information is the copper surface area, the method for learning the sample image corresponding to the defect information with the defect type of short circuit by the intermediate model comprises the following steps: the method includes the steps of enhancing the recognition of two separate copper features in the sample image, or enhancing the recognition of line features connecting two flat lines in the sample image.
7. The printed circuit board defect detection model training method of claim 2, wherein the relearning of the sample images in the learning samples by the intermediate model in combination with the feature information learned by the second learning submodule comprises:
if the layer information corresponding to the sample image is the line layer or the corresponding area block position information is the copper surface area, the method for learning the sample image corresponding to the defect information with the defect type of the open circuit by the intermediate model comprises the following steps: and reinforcing the recognition force of the characteristic of the flat cable with the notch in the sample image.
8. The printed circuit board defect detection model training method of any one of claims 1 to 7, wherein the preprocessing of the sample library comprises: traversing sample images in a sample library, and if layer information corresponding to the sample images is a circuit layer or corresponding area block position information is a copper surface area, respectively marking different colors on electronic devices and copper wires in the sample images by using an image processor;
and training the basic model by using the preprocessed learning sample of the sample library to obtain a defect detection model of the printed circuit board.
9. The printed circuit board defect inspection model training method according to any one of claims 1 to 7, wherein the scanning camera device is integrated on an AOI device to which design document information of the printed circuit board is input, and the base model is an inspection model of the AOI device or an AI model of a backend thereof.
10. The method for training the printed circuit board defect detection model according to any one of claims 1 to 7, characterized in that a training set and a test set are constructed by using the sample library, and the basic model is trained for multiple rounds by using the training set;
verifying the trained model by using the test set, comprising: calculating the loss value of the trained model by using a mean square error loss function or an average absolute value error loss function; calculating the accuracy of the trained model according to the prediction times and the total prediction times of the prediction result which are consistent with the label;
verifying whether the loss value and the accuracy both meet a preset training target, and taking a currently trained model as the printed circuit board defect detection model; otherwise, carrying out iterative training by using the training set until the loss value and the accuracy of the model obtained by the iterative training are verified.
11. A printed circuit board defect detection method is characterized by comprising the following steps:
acquiring an image of a printed circuit board to be detected and layer information and/or area block position information of the printed circuit board to be detected;
inputting the image of the printed circuit board and the layer information and/or the area block position information thereof into a printed circuit board defect detection model which is trained in advance;
the printed circuit board defect detection model outputs a detection result;
the printed circuit board defect detection model is trained through the following steps:
acquiring design document information of a printed circuit board, wherein the design document information comprises layer information and/or area block position information of the printed circuit board; scanning the printed circuit board by using scanning camera equipment to obtain a scanned image of the printed circuit board;
generating one or more learning samples based on the scanned image of the printed circuit board and the design document information, each learning sample comprising a sample image and a corresponding label, comprising: intercepting a local image in the scanned image to obtain a sample image, and carrying out manual marking on the sample image, wherein a label obtained by the manual marking comprises one or two of layer information, area block position information and defect information;
establishing a sample library, which comprises the steps of collecting and storing learning samples generated on the basis of a plurality of printed circuit boards respectively;
training a basic model by using the learning samples of the sample library, wherein the basic model is provided with a first learning submodule and a second learning submodule, and the first learning submodule performs learning training on the basis of sample images in the learning samples and defect information in the labels to obtain an intermediate model; the second learning submodule learns the characteristic information between the defect information and one or two of the layer information and the area block position information based on the label in the learning sample; and the intermediate model is combined with the characteristic information learned by the second learning submodule to relearn the sample image in the learning sample to obtain the printed circuit board defect detection model.
12. The method of claim 11, wherein the printed circuit board defect detection model is trained by the method of any one of claims 3 to 10.
CN202210694133.8A 2022-06-20 2022-06-20 Printed circuit board defect detection model training method and defect detection method Active CN114782431B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210694133.8A CN114782431B (en) 2022-06-20 2022-06-20 Printed circuit board defect detection model training method and defect detection method
TW111147431A TWI840006B (en) 2022-06-20 2022-12-09 Training method for defect detection model and defect detection method for printed circuit board

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210694133.8A CN114782431B (en) 2022-06-20 2022-06-20 Printed circuit board defect detection model training method and defect detection method

Publications (2)

Publication Number Publication Date
CN114782431A true CN114782431A (en) 2022-07-22
CN114782431B CN114782431B (en) 2022-10-14

Family

ID=82421972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210694133.8A Active CN114782431B (en) 2022-06-20 2022-06-20 Printed circuit board defect detection model training method and defect detection method

Country Status (1)

Country Link
CN (1) CN114782431B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116967615A (en) * 2023-07-31 2023-10-31 上海感图网络科技有限公司 Circuit board reinspection marking method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239102A (en) * 2018-08-21 2019-01-18 南京理工大学 A kind of flexible circuit board open defect detection method based on CNN
CN110579479A (en) * 2019-08-09 2019-12-17 康代影像科技(苏州)有限公司 PCB maintenance system and maintenance method based on false point defect detection
CN111862067A (en) * 2020-07-28 2020-10-30 中山佳维电子有限公司 Welding defect detection method and device, electronic equipment and storage medium
CN114445365A (en) * 2022-01-25 2022-05-06 深圳市中钞科信金融科技有限公司 Banknote printing quality inspection method based on deep learning algorithm
CN114549512A (en) * 2022-03-01 2022-05-27 成都数之联科技股份有限公司 Circuit board defect detection method, device, equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239102A (en) * 2018-08-21 2019-01-18 南京理工大学 A kind of flexible circuit board open defect detection method based on CNN
CN110579479A (en) * 2019-08-09 2019-12-17 康代影像科技(苏州)有限公司 PCB maintenance system and maintenance method based on false point defect detection
CN111862067A (en) * 2020-07-28 2020-10-30 中山佳维电子有限公司 Welding defect detection method and device, electronic equipment and storage medium
CN114445365A (en) * 2022-01-25 2022-05-06 深圳市中钞科信金融科技有限公司 Banknote printing quality inspection method based on deep learning algorithm
CN114549512A (en) * 2022-03-01 2022-05-27 成都数之联科技股份有限公司 Circuit board defect detection method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116967615A (en) * 2023-07-31 2023-10-31 上海感图网络科技有限公司 Circuit board reinspection marking method, device, equipment and storage medium
CN116967615B (en) * 2023-07-31 2024-04-12 上海感图网络科技有限公司 Circuit board reinspection marking method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114782431B (en) 2022-10-14
TW202402117A (en) 2024-01-01

Similar Documents

Publication Publication Date Title
TWI757825B (en) System and method for pcb inspection based on false defect detection
CN108469438A (en) A kind of printed matter detection method, device, equipment and storage medium
Mahalingam et al. Pcb-metal: A pcb image dataset for advanced computer vision machine learning component analysis
CN112053318A (en) Two-dimensional PCB defect real-time automatic detection and classification device based on deep learning
TWI715051B (en) Machine learning method and automatic optical inspection device using the method thereof
CN114782431B (en) Printed circuit board defect detection model training method and defect detection method
CN114842275B (en) Circuit board defect judging method, training method, device, equipment and storage medium
KR20200006028A (en) Printed circuit board inspecting apparatus, method for determining fault type of screen printer and computer readable recording medium
Leta et al. Computer vision system for printed circuit board inspection
Khare et al. PCB-Fire: Automated Classification and Fault Detection in PCB
Londe et al. Automatic PCB defects detection and classification using MATLAB
CN116718600B (en) Detection device for intelligent detection of wire harness product
CN114226262A (en) Flaw detection method, flaw classification method and flaw detection system
WO2023080587A1 (en) Deep learning-based mlcc stacked alignment inspection system and method
CN115937555A (en) Industrial defect detection algorithm based on standardized flow model
CN113191362B (en) Transformer equipment oil leakage defect detection device and method
TWI840006B (en) Training method for defect detection model and defect detection method for printed circuit board
JP7423368B2 (en) Defect detection device and method
Nahar et al. Computer aided system for inspection of assembled PCB
JP4423130B2 (en) Printed circuit board visual inspection method, printed circuit board visual inspection program, and printed circuit board visual inspection apparatus
CN115035101B (en) Defect verification method and detection method of semiconductor chip carrier plate and AOI equipment
EP4358020A1 (en) Method of detecting errors in the placement of elements in the pcb
JP3982646B2 (en) Image identification apparatus and method, image detection identification apparatus provided with image identification apparatus, and medium on which image identification program is recorded
US20240135527A1 (en) Method of detecting errors in the placement of elements in the pcb
Singh et al. Automatic detection of pcb defects

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