CN113378957A - Adaptive statistical model training method, welding spot defect detection method and system - Google Patents

Adaptive statistical model training method, welding spot defect detection method and system Download PDF

Info

Publication number
CN113378957A
CN113378957A CN202110698845.2A CN202110698845A CN113378957A CN 113378957 A CN113378957 A CN 113378957A CN 202110698845 A CN202110698845 A CN 202110698845A CN 113378957 A CN113378957 A CN 113378957A
Authority
CN
China
Prior art keywords
importance
statistical model
template
welding spot
templates
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
CN202110698845.2A
Other languages
Chinese (zh)
Other versions
CN113378957B (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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202110698845.2A priority Critical patent/CN113378957B/en
Publication of CN113378957A publication Critical patent/CN113378957A/en
Application granted granted Critical
Publication of CN113378957B publication Critical patent/CN113378957B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

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

Abstract

The invention discloses a self-adaptive statistical model training method, a welding spot defect detection method and a system. The training method comprises the following steps: selecting an IC element welding spot sample to be matched with a template in the initialized self-adaptive statistical model; if the matching is successful, accumulating the importance of the template to obtain an importance accumulated value and updating the importance of the template; judging whether the importance accumulated value is smaller than an accumulated threshold value; if yes, judging whether the number of the matched templates is greater than the total number of the templates; if yes, updating the number of the templates and the importance of the neighborhood templates; updating the matching distance threshold, the updating probability, the minimum importance template, the frequency distribution graph and the defect degree threshold; judging whether the number of the matched samples is greater than the total number of the samples; and if so, obtaining the trained adaptive statistical model. The method not only effectively improves the detection accuracy of the trained self-adaptive statistical model on the IC element welding spot defects, but also keeps the detection efficiency and avoids the deviation caused by human experience.

Description

Adaptive statistical model training method, welding spot defect detection method and system
Technical Field
The invention relates to the technical field of defect detection, in particular to a self-adaptive statistical model training method, a welding spot defect detection method and a welding spot defect detection system.
Background
Integrated Circuit chips (IC chips for short) are electronic circuits on a silicon semiconductor wafer consisting of a large number of microelectronic components. In a Printed Circuit Board (PCB), a solder joint is a bridge connecting an electronic component and a Circuit Board, and plays a role in mechanically fixing an original and the Circuit Board, electrically connecting the original and the Circuit Board, and transmitting an electrical signal.
Surface Mount Technology (SMT) is a short name for a series of process flows for processing on a PCB basis, and is one of the most popular techniques and technologies in the electronic assembly industry. At present, procedures required for surface mounting include solder paste printing, component mounting, reflow soldering and the like, and the procedures are difficult to control finely, so that a large number of soldering point defects are generated. The detection of welding spot defects is a key link for guaranteeing the quality of welding spots and influences the quality of circuit board products. With the increasing requirements on the functions of the PCB, the density of components of the PCB is increasing, the size of the components is smaller and smaller, and the detection requirements cannot be met only by a manual detection method and an electrical detection method. Automatic Optical Inspection (AOI) is an Automated visual Inspection technique for printed circuit boards, is used for quality control in surface mount technology production, and can detect defects of solder joints in a non-contact, nondestructive, rapid, repeated and reliable manner through a machine vision Inspection algorithm. The AOI basic working flow is to detect defects by processing after detecting images of PCB components through CCD. Since the IC chip has a smaller size compared to other common PCB devices, which results in a high similarity between the normal solder joints and the defective solder joints displayed on the image, an excellent detection algorithm is required for AOI to cope with the small size, which is a technical difficulty still being overcome at present. In the prior art, patent document CN104867145A discloses a method for detecting defects of solder joints of IC components based on a visual background extraction model, which can effectively detect the defects of solder joints of IC components to a certain extent, but has some problems, specifically as follows:
(1) in the visual background extraction model, samples are selected from qualified IC welding spot samples as templates by using a random sampling mechanism, and the fact that the samples are important samples and unimportant samples in a qualified IC welding spot sample set is not considered, so that some samples which are not screened in a targeted mode are used as templates for detection, and the detection precision is reduced.
(2) All pixel points in the visual background extraction model all adopt the template of same quantity, do not consider that IC solder joint sample is also different because the different required template quantity in the IC position that is located of different pixel points has also been different, has leaded to the template of some pixel points not enough, and the template of some pixel points is too much, leads to the accuracy not enough on the one hand, and on the other hand leads to detection rate slow excessively.
(3) The classification threshold, the matching distance threshold and the updating probability in the visual background extraction model all adopt empirical values, the condition that parameters are frequently required to be adjusted in a complex component assembly environment is not considered, and the detection accuracy is greatly influenced by common artificial empirical parameters.
Therefore, how to improve the prior art or provide a new technique for detecting the solder joint defect of IC devices has become a technical problem to be solved by those skilled in the art.
The above information is given as background information only to aid in understanding the present disclosure, and no determination or admission is made as to whether any of the above is available as prior art against the present disclosure.
Disclosure of Invention
The invention provides a self-adaptive statistical model training method, a welding spot defect detection method and a system, which aim to overcome the defects of the prior art.
In order to achieve the above purpose, the present invention provides the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for training an adaptive statistical model, where the method includes:
selecting IC element welding spot samples from the sample training set;
matching the IC element welding spot sample with a template in the initialized self-adaptive statistical model, and judging whether the matching is successful;
if so, accumulating the importance of the template to obtain an accumulated value of the importance and updating the importance of the template; if not, directly updating the importance of the template;
comparing the importance accumulated value with an accumulated threshold value, and judging whether the importance accumulated value is smaller than the accumulated threshold value;
if not, updating the number of the templates and the importance of the neighborhood templates; if so, judging whether the number of matched templates is greater than the total number of templates in the self-adaptive statistical model;
if not, returning to the step of matching the IC element welding spot sample with the template in the initialized self-adaptive statistical model and judging whether the matching is successful; if so, updating the number of the templates and the importance of the neighborhood templates;
updating the matching distance threshold, the updating probability, the minimum importance template, the frequency distribution graph and the defect degree threshold;
judging whether the number of the matched samples is larger than the total number of the samples in the sample training set;
if not, returning to the step of selecting the IC element welding spot sample from the sample training set; if so, finishing training and obtaining the trained self-adaptive statistical model.
Further, in the adaptive statistical model training method, the IC component solder joint samples in the sample training set are qualified samples.
In a second aspect, an embodiment of the present invention provides an adaptive statistical model training system, where the system includes:
the sample selecting module is used for selecting IC element welding spot samples from the sample training set;
the template matching module is used for matching the IC element welding spot sample with a template in the initialized self-adaptive statistical model and judging whether the matching is successful or not;
the first processing module is used for accumulating the importance of the template to obtain an importance accumulated value and updating the importance of the template if the matching is successful; if the matching is unsuccessful, directly updating the importance of the template;
a threshold comparison module, configured to compare the cumulative importance value with a cumulative threshold, and determine whether the cumulative importance value is smaller than the cumulative threshold;
the second processing module is used for updating the number of templates and the importance of the neighborhood templates if the accumulated value of the importance is not less than the accumulated threshold value; if the importance accumulated value is smaller than the accumulated threshold value, judging whether the number of matched templates is larger than the total number of templates in the self-adaptive statistical model;
the third processing module is used for returning to execute the steps of matching the IC element welding spot sample with the template in the initialized self-adaptive statistical model and judging whether the matching is successful or not if the number of the matched templates is not more than the total number of the templates in the self-adaptive statistical model; if the number of the matched templates is larger than the total number of the templates in the self-adaptive statistical model, updating the number of the templates and the importance of the neighborhood templates;
the updating processing module is used for updating the matching distance threshold, the updating probability, the minimum importance template, the frequency distribution map and the defect degree threshold;
the number judging module is used for judging whether the number of the matched samples is greater than the total number of the samples in the sample training set;
the fourth processing module is used for returning to the step of selecting the IC element welding spot samples from the sample training set if the number of the matched samples is not more than the total number of the samples in the sample training set; and if the number of the matched samples is greater than the total number of the samples in the sample training set, finishing training and obtaining a trained self-adaptive statistical model.
Further, in the adaptive statistical model training system, the IC component solder joint samples in the sample training set are qualified samples.
In a third aspect, an embodiment of the present invention provides a method for detecting solder joint defects of an IC component based on an adaptive statistical model, where the adaptive statistical model is obtained by training the adaptive statistical model training method in the first aspect, and the method includes:
collecting a picture of a welding spot of an IC element to be detected;
utilizing the self-adaptive statistical model to carry out defect detection on the picture to obtain a defect detection result;
calculating the defect degree of the picture according to the defect detection result and the frequency distribution diagram;
and comparing the defect degree of the picture obtained by calculation with a defect degree threshold value to obtain a detection result.
Further, in the method for detecting solder joint defects of an IC component based on an adaptive statistical model, the step of comparing the calculated defect level of the picture with a defect level threshold to obtain a detection result includes:
comparing the defect degree of the picture obtained by calculation with a defect degree threshold value, and judging whether the defect degree of the picture is smaller than the defect degree threshold value;
if yes, the IC element welding spot to be detected is a qualified welding spot;
and if so, the IC element welding spot to be detected is an unqualified welding spot.
In a fourth aspect, an embodiment of the present invention provides an IC device solder joint defect detection system based on an adaptive statistical model, where the system includes:
the picture acquisition module is used for acquiring pictures of the welding spots of the IC element to be detected;
the defect detection module is used for detecting the defects of the pictures by utilizing the self-adaptive statistical model to obtain a defect detection result;
the defect calculation module is used for calculating the defect degree of the picture according to the defect detection result and the frequency distribution map;
and the result obtaining module is used for comparing the calculated defect degree of the picture with a defect degree threshold value to obtain a detection result.
Further, in the IC component solder joint defect detecting system based on the adaptive statistical model, the result obtaining module is specifically configured to:
comparing the defect degree of the picture obtained by calculation with a defect degree threshold value, and judging whether the defect degree of the picture is smaller than the defect degree threshold value;
if yes, the IC element welding spot to be detected is a qualified welding spot;
and if so, the IC element welding spot to be detected is an unqualified welding spot.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
according to the training method of the adaptive statistical model, the detection method and the detection system of the welding spot defects, provided by the embodiment of the invention, the accuracy of the detection result of the trained adaptive statistical model on the welding spot defects of the IC element is effectively improved, the detection efficiency is also kept, the deviation caused by artificial experience is avoided, the practical production is facilitated, and the popularization and application values are higher.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a method for training an adaptive statistical model according to an embodiment of the present invention;
FIG. 2 is a functional block diagram of an adaptive statistical model training system according to a second embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for detecting solder joint defects of an IC component based on an adaptive statistical model according to a third embodiment of the present invention;
FIG. 4 is a functional block diagram of a system for detecting solder joint defects of IC devices based on adaptive statistical models according to a fourth embodiment of the present invention;
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the embodiments described below 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.
In the description of the present invention, it is to be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. When a component is referred to as being "disposed on" another component, it can be directly on the other component or intervening components may also be present.
Furthermore, the terms "long", "short", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of describing the present invention, but do not indicate or imply that the referred devices or elements must have the specific orientations, be configured to operate in the specific orientations, and thus are not to be construed as limitations of the present invention.
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Example one
In view of the defects of the prior art, the inventor of the invention actively researches and innovates based on the abundant practical experience and professional knowledge in many years of the industry and by matching with the application of the theory, so as to create a feasible IC element welding spot defect detection technology, thereby ensuring that the technology has higher practicability. After continuous research, design and repeated trial and improvement, the invention with practical value is finally created.
Referring to fig. 1, fig. 1 is a schematic flow chart of an adaptive statistical model training method according to an embodiment of the present invention, the method is applied to a scenario where a solder joint defect of an IC device is detected through a model, and the method is executed by an adaptive statistical model training system, which may be implemented by software and/or hardware and integrated inside an automatic machine. As shown in fig. 1, the adaptive statistical model training method may include the following steps:
and S101, selecting IC element welding spot samples from the sample training set.
The IC component solder joint samples in the sample training set are qualified samples, that is, the adaptive statistical model is trained by the qualified samples in this embodiment.
S102, matching the IC element welding spot sample with a template in the initialized self-adaptive statistical model, and judging whether the matching is successful; if yes, go to step S103; if not, step S104 is directly executed.
And S103, accumulating the template importance to obtain an importance accumulation value.
And S104, updating the importance of the template.
S105, comparing the importance accumulated value with an accumulated threshold value, and judging whether the importance accumulated value is smaller than the accumulated threshold value; if yes, go to step S106; if not, step S107 is executed directly.
S106, judging whether the number of matched templates is larger than the total number of templates in the self-adaptive statistical model; if yes, go to step S107; if not, the process returns to step S102.
And S107, updating the number of the templates and the importance of the neighborhood templates.
And S108, updating the matching distance threshold, the updating probability, the minimum importance template, the frequency distribution graph and the defect degree threshold.
S109, judging whether the number of the matched samples is larger than the total number of the samples in the sample training set; if yes, go to step S110; if not, the process returns to step S101.
And S110, obtaining the trained self-adaptive statistical model after the training is finished.
According to the training method of the self-adaptive statistical model provided by the embodiment of the invention, the accuracy of the detection result of the self-adaptive statistical model obtained through training on the IC element welding spot defect is effectively improved, the detection efficiency is also kept, the deviation caused by artificial experience is avoided, the practical production is facilitated, and the method has high popularization and application values.
Example two
Referring to fig. 2, a functional module diagram of an adaptive statistical model training system according to a second embodiment of the present invention is shown, where the system is adapted to execute the adaptive statistical model training method according to the second embodiment of the present invention. The system specifically comprises the following modules:
a sample selecting module 201, configured to select an IC component solder joint sample from a sample training set;
the template matching module 202 is used for matching the IC element welding spot sample with a template in the initialized self-adaptive statistical model and judging whether the matching is successful;
the first processing module 203 is configured to, if matching is successful, perform template importance accumulation to obtain an importance accumulation value, and update the template importance; if the matching is unsuccessful, directly updating the importance of the template;
a threshold comparison module 204, configured to compare the cumulative importance value with a cumulative threshold, and determine whether the cumulative importance value is smaller than the cumulative threshold;
a second processing module 205, configured to update the number of templates and the importance of the neighborhood templates if the accumulated value of the importance is not less than the accumulation threshold; if the importance accumulated value is smaller than the accumulated threshold value, judging whether the number of matched templates is larger than the total number of templates in the self-adaptive statistical model;
a third processing module 206, configured to, if the number of matched templates is not greater than the total number of templates in the adaptive statistical model, return to the step of performing matching between the IC component solder joint sample and the template in the initialized adaptive statistical model, and determine whether the matching is successful; if the number of the matched templates is larger than the total number of the templates in the self-adaptive statistical model, updating the number of the templates and the importance of the neighborhood templates;
the updating processing module 207 is configured to update the matching distance threshold, the updating probability, the minimum importance template, the frequency distribution map, and the defect threshold;
a number judging module 208, configured to judge whether the number of matched samples is greater than the total number of samples in the sample training set;
a fourth processing module 209, configured to return to the step of selecting the IC component solder joint sample from the sample training set if the number of the matched samples is not greater than the total number of the samples in the sample training set; and if the number of the matched samples is greater than the total number of the samples in the sample training set, finishing training and obtaining a trained self-adaptive statistical model.
Preferably, the IC component pad samples in the sample training set are qualified samples.
According to the training system for the self-adaptive statistical model, provided by the embodiment of the invention, the accuracy of the detection result of the self-adaptive statistical model obtained through training on the IC element welding spot defect is effectively improved, the detection efficiency is also kept, the deviation caused by artificial experience is avoided, the practical production is more facilitated, and the high popularization and application value is realized.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic flow chart of a method for detecting solder joint defects of an IC device based on an adaptive statistical model according to an embodiment of the present invention, where the method is performed by an IC device solder joint defect detection system based on an adaptive statistical model trained by the method for training an adaptive statistical model according to the first embodiment of the present invention. As shown in fig. 3, the method for detecting solder joint defects of an IC component based on an adaptive statistical model may include the following steps:
s301, collecting pictures of welding spots of the IC element to be detected.
S302, defect detection is carried out on the picture by using the self-adaptive statistical model, and a defect detection result is obtained.
And S303, calculating the defect degree of the picture according to the defect detection result and the frequency distribution diagram.
S304, comparing the calculated defect degree of the picture with a defect degree threshold value to obtain a detection result.
Specifically, the step S304 further includes:
comparing the defect degree of the picture obtained by calculation with a defect degree threshold value, and judging whether the defect degree of the picture is smaller than the defect degree threshold value;
if yes, the IC element welding spot to be detected is a qualified welding spot;
and if so, the IC element welding spot to be detected is an unqualified welding spot.
It should be noted that the model in this embodiment is trained by using qualified samples. The present embodiment is described in detail in the following four sections:
(1) model:
the core idea of the self-adaptive statistical model is to screen out a representative sample from an IC welding spot sample training set as a template. The basic form of the model is given by the following formula:
M(x,y)={m1(x,y),m2(x,y),...,mK(x,y)},k=1,2,...,K;
in the formula, (x, y) is the coordinate of pixel point, mkAs templates, K is the number of templates. Each pixel point has a model, and each model has the number of templates which are obtained by self-adaptation based on an IC welding spot sample training set. The number of templates is initialized to 2 and a minimum of 2, since only one template is not sufficient to represent all of the IC pad samples. Two parameters are set for each template, and the template formula is as follows:
Figure BDA0003128943460000111
in the formula (I), the compound is shown in the specification,
Figure BDA0003128943460000112
for the IC pad sample pixel values,
Figure BDA0003128943460000113
is the importance value of the sample. The importance value measures how well the IC pad sample as a template can represent other IC pad samples. If the template and the sample are successfully matched, the importance of the template is higher, and the template importance formula is as follows:
Figure BDA0003128943460000114
in the formula (I), the compound is shown in the specification,
Figure BDA0003128943460000115
the number of times the template was successfully matched,
Figure BDA0003128943460000116
the number of times a template enters potential defect detection in model training is determined. The model is initialized by using an IC welding spot sample, the pixel values of the two templates are randomly selected from 9 points which are 8 neighborhoods and the current pixel point, the selection can be repeated, and the importance is high
Figure BDA0003128943460000117
And
Figure BDA0003128943460000118
are initialized to 1.
(2) Potential defect detection:
matching the template with the IC welding spot sample, measuring the similarity between the matching distance measurement template and the IC welding spot sample, recording the importance value of the matched template if the matching is successful, and not recording if the matching is unsuccessful, wherein the matching formula is as follows:
Figure BDA0003128943460000119
in the formula, R (x, y) is a matching distance threshold, and each pixel point has a distance threshold which is obtained by the IC welding spot sample set in a self-adaptive mode. Accumulating the matched results, and comparing the results with a potential defect threshold value to obtain a potential defect detection result, wherein the formula is as follows:
Figure BDA0003128943460000121
in the formula, 0 is no potential defect, 1 is potential defect, W (x, y) is potential defect threshold, and each pixel point has a potential defect threshold obtained based on model adaptation. The formula for W (x, y) is as follows:
Figure BDA0003128943460000122
the templates are sorted according to the importance value after the importance of the templates is adjusted every time, in order to judge that no potential defect exists if at least one template with enough importance is successfully matched, the importance of the template with the top rank is directly used as a potential defect threshold, due to the minimum importance updating mechanism, namely due to the fact that the re-sorting can enable the newly added IC welding spot template to be temporarily sorted at the first position, the importance of the template is unstable and is not reliable as the potential defect threshold, and meanwhile, in order to enable the potential defects to be displayed as far as possible, a harsher threshold is set and weighed, and the importance of the template with the second rank is used as the potential defect threshold.
(3) Updating:
the template number adaptive formula is as follows:
Figure BDA0003128943460000123
wherein N is the sample index of the training set of the IC pad sample, N +1 is the next sample index, N is the number of samples of the training set of the IC pad sample,
Figure BDA0003128943460000124
is an IC solder joint patternThe training set is represented by the following formula by the mean value of the maximum distance between the current sample index and all the templates, wherein the maximum distance is successfully matched with the current sample index:
Figure BDA0003128943460000125
in the formula, the result of matching the distance is normalized. The implication of equation (7) is that the number of templates is increased when the model is not sufficient to characterize a qualified sample. The samples in the training set are qualified samples, the matching distance threshold value measures the similarity between the IC welding spot template and the IC welding spot sample, the potential defect threshold value measures the similarity between the model and the IC welding spot sample, and the condition that the model is not enough to represent the qualified samples when the IC welding spot sample is out of the maximum distance percentage of the potential defect threshold value means that the model is not enough to represent the qualified samples. In order to prevent the phenomenon that the number of the IC welding spot templates is expanded excessively, the number of the templates is updated only with the probability of 1/P (x, y). The newly added template pixel value is the current IC welding point pixel value, a in the formula (3)mkAnd omkAre all 1.
The matching threshold adaptive formula is as follows:
Figure BDA0003128943460000131
wherein n and the like have the same meanings as described above,
Figure BDA0003128943460000132
and (5) stopping the average value of the minimum distances of the current sample index and all templates for the IC welding spot sample training set, wherein step (x, y) is step size.
Figure BDA0003128943460000133
The formula is as follows:
Figure BDA0003128943460000134
in the step of determining whether the sample to be detected is qualified, the detection of the potential defect is the first step, but not the final determination criterion, so that the setting of the matching distance threshold is strict, and the harsh matching threshold is more helpful for establishing the frequency distribution map. To not add an artificial value to the match threshold, the step size formula is initialized with a single IC pad sample as follows:
Figure BDA0003128943460000135
in the formula, Kmax is a normalized value, and means the maximum value of the number of the IC welding spot templates in all the pixel points. The IC welding spot sample comprises seven areas including a lead root, a lead middle part, a lead front end, a lead terminal, a welding spot, a welding disc and a blank area, wherein the seven areas are different among different samples due to displacement or noise, if the difference degree is larger, the number of templates needs to be increased, namely the number of pixel point templates with larger difference degree among the samples of the IC welding spot sample set is larger, and vice versa, so that the step length is based on the number of the templates, namely the self-adaption of the adjustment rate.
Updating of template importance is performed in a potential defect detection process, all templates being updated when entering the detection process
Figure BDA0003128943460000136
Plus 1, if the IC welding spot sample is successfully matched with the template
Figure BDA0003128943460000137
And adding 1, otherwise, keeping unchanged. And only independently adjusting the template of each pixel point can lead to the condition of splitting the relevance between the pixels of the IC welding spot sample, and adding a neighborhood updating mechanism to keep the relation between the pixels, wherein the mechanism is to randomly select one pixel point from 8 neighborhoods by using the IC welding spot sample with the probability of 1/P (x, y) for potential defect detection, thereby updating the template importance of the neighborhoods.
In order to increase the generalization capability of the model, an update minimum importance template mechanism is added, the mechanism replaces the minimum importance template in the model with the IC welding spot sample with the probability of 1/P (x, y), the newly added template pixel value is the current IC welding spot pixel value, and the importance value is the minimum importance template in the importance value
Figure BDA0003128943460000141
And
Figure BDA0003128943460000142
are all 1. The updated probability denominator P (x, y) is obtained by adaptation, and the formula is as follows:
Figure BDA0003128943460000143
where the adaptation condition is in the order of the penultimate template importance value
Figure BDA0003128943460000144
The probability updating instead of the fixed updating is used for adding randomness to the self-adaptation of the model, overfitting is not generated on a training sample, the generalization capability of the model is improved, and the reliability is not enough due to the importance change of the matching only once. Since there is a minimum importance template update mechanism,
Figure BDA0003128943460000145
meaning the number of samples each template experiences in training. Novel IC solder joint template
Figure BDA0003128943460000146
And
Figure BDA0003128943460000147
all will be set to 1, and the sorted template will become the first template, and the template will gradually adjust the importance value through matching with a plurality of samples, so that the unimportant template is gradually changed from the important template, and the template with the minimum importance will be updated, and the stability of the importance of the template is related to the number of samples passing through from the template at the back of the sort. Because the number of training samples is limited, the probability of using the training samples is not too large, and the template with the minimum importance is replaced, so the condition of using the above formula for balancing the two is the number of samples which are passed by the newly added template to become the second-to-last template with the importance ranking. Add dieBoth the number of plates and the updated minimum importance template are templates that add new IC pads to the model, thus using the same probability, whereas neighborhood updates also use the same probability since neighborhoods have similar distribution, but neighborhoods are not always distributed, and only soft updates, i.e., updating the template importance values, are used, as opposed to hard updates, i.e., directly changing the template. Since the update probability is related to the template importance, P (x, y) is updated after the template importance is changed, and in order to improve the adaptability, the probability denominator P (x, y) is updated first, and then the minimum importance template is updated.
(4) Degree of defect
And combining the potential defect detection of the self-adaptive statistical model and the frequency distribution diagram to obtain the defect degree, wherein the defect degree formula is as follows:
Figure BDA0003128943460000151
where H and W are the height and width of the IC pad sample, and W (x, y) is the histogram, the formula is as follows:
Figure BDA0003128943460000152
the frequency distribution graph and the defect degree threshold value are obtained through self-adaption, potential defect detection is carried out after the self-adaption model is trained for one time, then the frequency distribution graph is updated, and then the defect degree threshold value is updated.
According to the IC component welding spot defect detection method based on the self-adaptive statistical model, provided by the embodiment of the invention, the trained self-adaptive statistical model is adopted to detect the welding spot defects of the IC component, so that the detection accuracy of the welding spot defects of the IC component can be effectively improved, meanwhile, higher detection efficiency can be maintained, the deviation caused by artificial experience is avoided, the method is more beneficial to actual production, and has higher popularization and application values.
Example four
Referring to fig. 4, a functional block diagram of a system for detecting solder joint defects of an IC device based on an adaptive statistical model according to a fourth embodiment of the present invention is shown, where the system is adapted to perform the method for detecting solder joint defects of an IC device based on an adaptive statistical model according to the fourth embodiment of the present invention. The system specifically comprises the following modules:
the picture acquisition module 401 is used for acquiring pictures of welding spots of the IC element to be detected;
a defect detection module 402, configured to perform defect detection on the picture by using the adaptive statistical model to obtain a defect detection result;
a defect calculating module 403, configured to calculate a defect degree of the picture according to the defect detection result and the frequency distribution map;
a result obtaining module 404, configured to compare the computed defect degree of the picture with a defect degree threshold, so as to obtain a detection result.
Preferably, the result obtaining module 404 is specifically configured to:
comparing the defect degree of the picture obtained by calculation with a defect degree threshold value, and judging whether the defect degree of the picture is smaller than the defect degree threshold value;
if yes, the IC element welding spot to be detected is a qualified welding spot;
and if so, the IC element welding spot to be detected is an unqualified welding spot.
According to the IC element welding spot defect detection system based on the self-adaptive statistical model, provided by the embodiment of the invention, the trained self-adaptive statistical model is adopted to detect the welding spot defects of the IC element, so that the detection accuracy of the welding spot defects of the IC element can be effectively improved, meanwhile, higher detection efficiency can be maintained, the deviation caused by artificial experience is avoided, the system is more beneficial to actual production, and has higher popularization and application values.

Claims (8)

1. A method for adaptive statistical model training, the method comprising:
selecting IC element welding spot samples from the sample training set;
matching the IC element welding spot sample with a template in the initialized self-adaptive statistical model, and judging whether the matching is successful;
if so, accumulating the importance of the template to obtain an accumulated value of the importance and updating the importance of the template; if not, directly updating the importance of the template;
comparing the importance accumulated value with an accumulated threshold value, and judging whether the importance accumulated value is smaller than the accumulated threshold value;
if not, updating the number of the templates and the importance of the neighborhood templates; if so, judging whether the number of matched templates is greater than the total number of templates in the self-adaptive statistical model;
if not, returning to the step of matching the IC element welding spot sample with the template in the initialized self-adaptive statistical model and judging whether the matching is successful; if so, updating the number of the templates and the importance of the neighborhood templates;
updating the matching distance threshold, the updating probability, the minimum importance template, the frequency distribution graph and the defect degree threshold;
judging whether the number of the matched samples is larger than the total number of the samples in the sample training set;
if not, returning to the step of selecting the IC element welding spot sample from the sample training set; if so, finishing training and obtaining the trained self-adaptive statistical model.
2. The adaptive statistical model training method of claim 1, wherein the IC component pad samples in the sample training set are qualified samples.
3. An adaptive statistical model training system, the system comprising:
the sample selecting module is used for selecting IC element welding spot samples from the sample training set;
the template matching module is used for matching the IC element welding spot sample with a template in the initialized self-adaptive statistical model and judging whether the matching is successful or not;
the first processing module is used for accumulating the importance of the template to obtain an importance accumulated value and updating the importance of the template if the matching is successful; if the matching is unsuccessful, directly updating the importance of the template;
a threshold comparison module, configured to compare the cumulative importance value with a cumulative threshold, and determine whether the cumulative importance value is smaller than the cumulative threshold;
the second processing module is used for updating the number of templates and the importance of the neighborhood templates if the accumulated value of the importance is not less than the accumulated threshold value; if the importance accumulated value is smaller than the accumulated threshold value, judging whether the number of matched templates is larger than the total number of templates in the self-adaptive statistical model;
the third processing module is used for returning to execute the steps of matching the IC element welding spot sample with the template in the initialized self-adaptive statistical model and judging whether the matching is successful or not if the number of the matched templates is not more than the total number of the templates in the self-adaptive statistical model; if the number of the matched templates is larger than the total number of the templates in the self-adaptive statistical model, updating the number of the templates and the importance of the neighborhood templates;
the updating processing module is used for updating the matching distance threshold, the updating probability, the minimum importance template, the frequency distribution map and the defect degree threshold;
the number judging module is used for judging whether the number of the matched samples is greater than the total number of the samples in the sample training set;
the fourth processing module is used for returning to the step of selecting the IC element welding spot samples from the sample training set if the number of the matched samples is not more than the total number of the samples in the sample training set; and if the number of the matched samples is greater than the total number of the samples in the sample training set, finishing training and obtaining a trained self-adaptive statistical model.
4. The adaptive statistical model training system of claim 3, wherein the IC component pad samples in the sample training set are qualified samples.
5. An IC component solder joint defect detection method based on an adaptive statistical model, wherein the adaptive statistical model is obtained by training the adaptive statistical model training method according to any one of claims 1-2, and the method comprises the following steps:
collecting a picture of a welding spot of an IC element to be detected;
utilizing the self-adaptive statistical model to carry out defect detection on the picture to obtain a defect detection result;
calculating the defect degree of the picture according to the defect detection result and the frequency distribution diagram;
and comparing the defect degree of the picture obtained by calculation with a defect degree threshold value to obtain a detection result.
6. The method as claimed in claim 5, wherein the step of comparing the computed defectiveness of the picture with a defectiveness threshold to obtain a detection result comprises:
comparing the defect degree of the picture obtained by calculation with a defect degree threshold value, and judging whether the defect degree of the picture is smaller than the defect degree threshold value;
if yes, the IC element welding spot to be detected is a qualified welding spot;
and if so, the IC element welding spot to be detected is an unqualified welding spot.
7. An IC component solder joint defect detection system based on an adaptive statistical model, the system comprising:
the picture acquisition module is used for acquiring pictures of the welding spots of the IC element to be detected;
the defect detection module is used for detecting the defects of the pictures by utilizing the self-adaptive statistical model to obtain a defect detection result;
the defect calculation module is used for calculating the defect degree of the picture according to the defect detection result and the frequency distribution map;
and the result obtaining module is used for comparing the calculated defect degree of the picture with a defect degree threshold value to obtain a detection result.
8. The system of claim 7, wherein the result obtaining module is specifically configured to:
comparing the defect degree of the picture obtained by calculation with a defect degree threshold value, and judging whether the defect degree of the picture is smaller than the defect degree threshold value;
if yes, the IC element welding spot to be detected is a qualified welding spot;
and if so, the IC element welding spot to be detected is an unqualified welding spot.
CN202110698845.2A 2021-06-23 2021-06-23 Self-adaptive statistical model training method, welding spot defect detection method and system Active CN113378957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110698845.2A CN113378957B (en) 2021-06-23 2021-06-23 Self-adaptive statistical model training method, welding spot defect detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110698845.2A CN113378957B (en) 2021-06-23 2021-06-23 Self-adaptive statistical model training method, welding spot defect detection method and system

Publications (2)

Publication Number Publication Date
CN113378957A true CN113378957A (en) 2021-09-10
CN113378957B CN113378957B (en) 2023-04-25

Family

ID=77578856

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110698845.2A Active CN113378957B (en) 2021-06-23 2021-06-23 Self-adaptive statistical model training method, welding spot defect detection method and system

Country Status (1)

Country Link
CN (1) CN113378957B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104867145A (en) * 2015-05-15 2015-08-26 广东工业大学 IC element solder joint defect detection method based on VIBE model
CN105260696A (en) * 2015-02-13 2016-01-20 比亚迪股份有限公司 Self-learning method and device of fingerprint template
CN106529526A (en) * 2016-07-06 2017-03-22 安徽大学 Object tracking algorithm based on combination between sparse expression and prior probability
CN108550163A (en) * 2018-04-19 2018-09-18 湖南理工学院 Moving target detecting method in a kind of complex background scene
WO2019233166A1 (en) * 2018-06-04 2019-12-12 杭州海康威视数字技术股份有限公司 Surface defect detection method and apparatus, and electronic device
CN111681235A (en) * 2020-06-11 2020-09-18 广东工业大学 IC welding spot defect detection method based on learning mechanism

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260696A (en) * 2015-02-13 2016-01-20 比亚迪股份有限公司 Self-learning method and device of fingerprint template
CN104867145A (en) * 2015-05-15 2015-08-26 广东工业大学 IC element solder joint defect detection method based on VIBE model
CN106529526A (en) * 2016-07-06 2017-03-22 安徽大学 Object tracking algorithm based on combination between sparse expression and prior probability
CN108550163A (en) * 2018-04-19 2018-09-18 湖南理工学院 Moving target detecting method in a kind of complex background scene
WO2019233166A1 (en) * 2018-06-04 2019-12-12 杭州海康威视数字技术股份有限公司 Surface defect detection method and apparatus, and electronic device
CN111681235A (en) * 2020-06-11 2020-09-18 广东工业大学 IC welding spot defect detection method based on learning mechanism

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAI NIAN ET AL: "SMT Solder Joint Inspection via a Novel Cascaded", 《IEEE TRANSACTIONS ON COMPONENTS PACKAGING AND MANUFACTURING TECHNOLOGY》 *
蔡念等: "基于自适应匹配半径视觉背景提取的IC焊点检测算法", 《焊接技术》 *

Also Published As

Publication number Publication date
CN113378957B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN115049653B (en) Integrated circuit board quality detection system based on computer vision
CN111681235B (en) IC welding spot defect detection method based on learning mechanism
CN107945184A (en) A kind of mount components detection method positioned based on color images and gradient projection
CN111060515A (en) PCBA quality detection method, system and computer equipment
KR20060114614A (en) Systems and methods for detecting defects in printed solder paste
CN106501272B (en) Machine vision soldering tin positioning detection system
CN101303226A (en) Method for measuring circuit board line width based on largest communication domain
CN112362679B (en) Image recognition device, image recognition method and computer program product thereof
JP2004340832A (en) Method and system for visual inspection of circuit board
CN107886131A (en) One kind is based on convolutional neural networks detection circuit board element polarity method and apparatus
CN113506243A (en) PCB welding defect detection method and device and storage medium
US6606402B2 (en) System and method for in-line inspection of stencil aperture blockage
JP3974022B2 (en) Feature amount calculation method and apparatus for soldering inspection, and program for executing the method
CN116993725B (en) Intelligent patch information processing system of flexible circuit board
CN113378957A (en) Adaptive statistical model training method, welding spot defect detection method and system
US7593571B2 (en) Component edge detecting method, computer-readable recording medium and component inspection apparatus
Zervakis et al. A Bayesian framework for multilead SMD post-placement quality inspection
CN116465908A (en) Optical detection method for printed circuit board production
Nevliudov et al. Automated System Development for the Printed Circuit Boards Optical Inspection Using Machine Learning Methods
CN113313704B (en) Integrated circuit pin detection method, device, terminal and storage medium
CN111899248B (en) Automatic PCB solder paste defect detection method based on machine learning
CN115170476A (en) Printed circuit board defect detection method based on image processing
JP2008185395A (en) Mounting substrate visual inspection method
CN118071748B (en) Intelligent detection method for quality of welding spots on surface of integrated circuit board
CN117274262B (en) Wire welding method for acoustic horn circuit board

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