[go: up one dir, main page]

CN113536868B - Circuit board fault identification method and related equipment - Google Patents

Circuit board fault identification method and related equipment

Info

Publication number
CN113536868B
CN113536868B CN202010324236.6A CN202010324236A CN113536868B CN 113536868 B CN113536868 B CN 113536868B CN 202010324236 A CN202010324236 A CN 202010324236A CN 113536868 B CN113536868 B CN 113536868B
Authority
CN
China
Prior art keywords
tested
circuit board
component
candidate image
image
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.)
Active
Application number
CN202010324236.6A
Other languages
Chinese (zh)
Other versions
CN113536868A (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.)
Foxconn Precision Electronics Taiyuan Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Foxconn Precision Electronics Taiyuan Co Ltd
Hon Hai Precision Industry 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 Foxconn Precision Electronics Taiyuan Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Foxconn Precision Electronics Taiyuan Co Ltd
Priority to CN202010324236.6A priority Critical patent/CN113536868B/en
Publication of CN113536868A publication Critical patent/CN113536868A/en
Application granted granted Critical
Publication of CN113536868B publication Critical patent/CN113536868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a circuit board fault identification method, a circuit board fault identification device, electronic equipment and a storage medium. The circuit board fault identification method comprises the steps of obtaining a circuit board image to be tested of a circuit board to be tested, wherein the circuit board to be tested comprises a plurality of elements to be tested, conducting image marking on the elements to be tested in the circuit board image to obtain candidate images of all the elements to be tested, obtaining position information of all the elements to be tested according to the candidate images of all the elements to be tested, extracting element characteristics of all the candidate images based on an aggregation channel characteristic method to obtain first characteristic vectors of all the candidate images, identifying element types of all the elements to be tested according to the first characteristic vectors of all the candidate images, judging whether the circuit board to be tested has faults according to the element types and the position information of all the elements to be tested, and outputting fault information when the circuit board to be tested has faults. The invention can improve the fault recognition efficiency of the circuit board.

Description

Circuit board fault identification method and related equipment
Technical Field
The present invention relates to the field of computer vision, and in particular, to a method and apparatus for identifying a fault of a circuit board, an electronic device, and a storage medium.
Background
Electronic product manufacturers often need to perform fault detection on the produced circuit boards. If the positions of the electronic components in the circuit board are normal, the appearance of each electronic component is normal.
At present, fault detection is carried out on electronic elements in a circuit board through manual spot check, so that the efficiency is low, and missing detection or false detection is easy to occur.
How to improve the detection efficiency and accuracy is a problem to be solved.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a circuit board fault recognition method, apparatus, electronic device, and storage medium that can not only improve the fault recognition efficiency of a circuit board, but also improve the accuracy of recognizing a circuit board fault.
The circuit board fault identification method is applied to electronic equipment and comprises the following steps:
acquiring a circuit board image to be tested of a circuit board to be tested, wherein the circuit board to be tested comprises a plurality of elements to be tested;
Image labeling is carried out on the plurality of elements to be tested in the circuit board image to be tested, and candidate images of the elements to be tested are obtained;
Acquiring the position information of each element to be detected according to the candidate image of each element to be detected;
Extracting element features of each candidate image based on an aggregation channel feature method to obtain a first feature vector of each candidate image;
identifying the element type of each element to be detected according to the first feature vector of each candidate image;
Judging whether the circuit board to be tested has faults according to the element types and the position information of each element to be tested, and outputting fault information when the circuit board to be tested has faults.
A circuit board fault identification device operating in an electronic device, the circuit board fault identification device comprising:
The first acquisition module is used for acquiring a circuit board image to be detected of a circuit board to be detected, and the circuit board to be detected comprises a plurality of elements to be detected;
the labeling module is used for labeling the images of the plurality of elements to be tested in the image of the circuit board to be tested to obtain candidate images of the elements to be tested;
The second acquisition module is used for acquiring the position information of each element to be detected according to the candidate images of each element to be detected;
The extraction module is used for extracting element features of each candidate image based on the aggregation channel feature method to obtain a first feature vector of each candidate image;
the first identification module is used for identifying the element type of each element to be detected according to the first feature vector of each candidate image;
the judging module is used for judging whether the circuit board to be tested has faults according to the element types and the position information of each element to be tested, and outputting fault information when the circuit board to be tested has faults.
An electronic device, the electronic device comprising:
a memory storing at least one instruction, and
And the processor acquires the instructions stored in the memory to realize the circuit board fault identification method.
A computer readable storage medium having stored therein at least one instruction that is fetched by a processor in an electronic device to implement the circuit board fault identification method.
According to the technical scheme, whether the circuit board to be tested has faults or not is judged according to the element types of the elements to be tested and the position information of the elements to be tested, and the fault identification efficiency of the circuit board to be tested can be improved.
Drawings
FIG. 1 is a flow chart of a circuit board fault identification method according to a preferred embodiment of the present invention.
FIG. 2 is a functional block diagram of a preferred embodiment of the circuit board fault identification device of the present invention.
Fig. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention for implementing a circuit board fault recognition method.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flowchart of a circuit board fault recognition method according to a preferred embodiment of the present invention. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The Circuit board fault recognition method is applied to an electronic device, wherein the electronic device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and hardware of the electronic device comprises, but is not limited to, a microprocessor, an Application SPECIFIC INTEGRATED Circuit (ASIC), a Programmable gate array (Field-Programmable GATE ARRAY, FPGA), a digital Processor (DIGITAL SIGNAL Processor, DSP), an embedded device and the like.
The electronic device may be any electronic product that can interact with a user, such as a Personal computer, tablet computer, smart phone, personal digital assistant (Personal DIGITAL ASSISTANT, PDA), etc.
The electronic device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The network in which the electronic device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
S10, obtaining a circuit board image to be tested of a circuit board to be tested, wherein the circuit board to be tested comprises a plurality of elements to be tested.
In at least one embodiment of the present invention, the circuit board under test image includes an image of an entire circuit board under test of the electronic device, or an image of a portion of the circuit board under test of the electronic device.
In at least one embodiment of the invention, the circuit board image to be tested is acquired by an industrial camera.
For example, an image of the entire circuit board to be tested may be captured by an industrial camera to obtain the circuit board image to be tested.
In at least one embodiment of the invention, the industrial camera can be controlled by the motion control system to carry out block shooting on the whole circuit board to be tested of the electronic equipment, so as to obtain an image of part of the circuit board to be tested of the electronic equipment.
In at least one embodiment of the invention, the front and the back of the whole circuit board to be tested of the electronic equipment are photographed in blocks through the industrial camera, so that the image of part of the circuit board to be tested of the electronic equipment is obtained.
S11, image labeling is carried out on the plurality of to-be-tested elements in the to-be-tested circuit board image, and candidate images of the to-be-tested elements are obtained.
In at least one embodiment of the present invention, the image labeling the plurality of components under test in the circuit board image under test includes:
sliding on the circuit board image to be detected by sliding windows with different sizes so as to intercept a plurality of sliding images;
Identifying each element to be tested from the plurality of sliding images by using the trained element identification model;
Labeling each identified element to be detected in the image of the circuit board to be detected to obtain candidate images of each element to be detected, wherein the element identification model is a two-class neural network.
In at least one embodiment of the invention, the circuit board fault recognition method further comprises training the component recognition model before the trained component recognition model recognizes each component under test from the plurality of sliding images.
The training the element identification model includes:
Acquiring an element image sample, wherein the element image sample is provided with a corresponding element image label;
taking the element image sample as input, and calculating a recognition result of the element image sample through the element recognition model;
And optimizing the element identification model based on a back propagation algorithm according to the identification result and the element image label to obtain a trained element identification model.
When the element image sample is a complete element, the element image label corresponding to the element image sample is 1 (indicating that the element image sample is an image of a complete element), and when the element image sample is not a complete element, the element image label corresponding to the element image sample is 0 (indicating that the element image sample is not an image of a complete element, or that the element image sample is not an image of an element).
In at least one embodiment of the present invention, before the image labeling of the plurality of components to be tested in the image of the circuit board to be tested, the circuit board fault recognition method further includes:
And preprocessing and calibrating the image of the circuit board to be tested.
S12, acquiring the position information of each element to be detected according to the candidate images of each element to be detected.
In at least one embodiment of the present invention, the obtaining the positional information of each element to be measured according to the candidate image of each element to be measured includes:
Acquiring a first pixel point of the upper left corner of each candidate image;
Determining a first coordinate of the first pixel point in the circuit board image to be detected;
and determining the first coordinates as position information of the element to be detected corresponding to the candidate image.
In at least one embodiment of the present invention, the obtaining the positional information of each element to be measured according to the candidate image of each element to be measured includes:
Acquiring a second pixel point of the center of each candidate image;
determining a second coordinate of the second pixel point in the circuit board image to be detected;
And determining the second coordinates as position information of the element to be detected corresponding to the candidate image.
And S13, extracting element features of each candidate image based on the aggregation channel feature method to obtain a first feature vector of each candidate image.
In at least one embodiment of the present invention, the aggregate channel feature method may superimpose a plurality of different features (e.g., color features, gradient features, and edge features) of each candidate image to form a unified feature.
In at least one embodiment of the present invention, the extracting the element features of each candidate image based on the aggregate channel feature method includes:
Transforming the candidate image to a YUV color space;
determining Y-channel features of the candidate image as first channel features;
Respectively shrinking the feature graphs of the Y, U, V channels of the candidate image by half, taking the feature graphs as the upper left corner, the upper right corner and the lower left corner of the second channel feature, and filling the lower right corner of the second channel feature with 0;
and converting feature images of Y, U, V channels of the candidate image by Sobel operator and performing size scaling to obtain three edge images, wherein the three edge images are used as an upper left corner, an upper right corner and a lower left corner of the features of the second channel, and each position in the three edge images is used as a lower right corner by taking a pixel value with the largest amplitude value.
The element features of each candidate image may efficiently describe the element features corresponding to the candidate image.
S14, identifying the element type of each element to be tested according to the first feature vector of each candidate image.
In at least one embodiment of the present invention, an AdaBoost classifier may be trained, through which the element type of each element to be tested is identified according to the first feature vector of each candidate image.
A first candidate image sample and a first tag of the first candidate image sample may be acquired;
Extracting element features of the first candidate image sample based on an aggregation channel feature method to obtain a first feature vector sample of the first candidate image sample;
taking a decision tree as a weak classifier, taking a first feature vector sample of the first candidate image sample as an input, and carrying out combined training on a plurality of weak classifiers according to the first label;
the weak classifiers are weighted and combined to obtain a strong classifier applied to element type classification;
And identifying the element type of each element to be detected according to the first feature vector of each candidate image through the strong classifier.
In at least one embodiment of the invention, the element types include chip elements, resistive elements, capacitive elements, and the like.
S15, judging whether the circuit board to be tested has faults according to the element types and the position information of each element to be tested, and outputting fault information when the circuit board to be tested has faults.
In at least one embodiment of the present invention, the determining whether the circuit board to be tested has a fault according to the component type and the position information of each component to be tested includes:
Determining the element number of each element type of the circuit board to be tested according to the element type of each element to be tested;
acquiring the element number of each element type of a standard circuit board and the standard position of each element to be tested;
judging whether the number of the elements of each given element type of the circuit board to be tested is smaller than the number of the elements of the given element type of the standard circuit board;
If the number of the components of the given component type of the circuit board to be tested is smaller than the number of the components of the given component type of the standard circuit board, determining that the circuit board to be tested has a component dropping fault;
Judging whether the position information of each given element to be tested of the circuit board to be tested is consistent with the standard position of the given element to be tested of the standard circuit board;
And if the position information of the given element to be tested of the circuit board to be tested is inconsistent with the standard position of the given element to be tested of the standard circuit board, the circuit board to be tested has a collision piece fault.
In at least one embodiment of the present invention, if the number of components of the given component type of the circuit board under test is equal to the number of components of the given component type of the standard circuit board, and the positional information of the given component under test of the circuit board under test is identical to the standard position of the given component under test of the standard circuit board, it is determined that the circuit board under test is free from a fault.
In at least one embodiment of the present invention, the circuit board fault recognition method further includes:
and identifying the fault element in each element to be detected according to each candidate image through a support vector machine.
In at least one embodiment of the present invention, the identifying, by the support vector machine, the faulty component among the components to be tested according to the candidate images includes:
acquiring a plurality of second candidate image samples and second labels of the second candidate image samples;
extracting second feature vectors of each second candidate image by adopting a local binary pattern algorithm;
Training the support vector machine classifier according to the second feature vector of each second candidate image and the second label of each second candidate image sample to obtain a trained support vector machine classifier;
and identifying the fault element in each element to be tested through the trained support vector machine classifier.
Before the trained support vector machine classifier identifies the fault element in each element to be tested, the circuit board fault identification method further comprises the following steps:
Generating a type vector of each second candidate image sample according to the element type of each second candidate image sample;
Connecting the second feature vector and the type vector of each second candidate image sample to obtain a third feature vector of each second candidate image;
And training the support vector machine classifier according to the third feature vector of each second candidate image and the second label of each second candidate image sample to obtain a trained support vector machine classifier.
The support vector machine classifier can be trained through small samples, so that the problem of difficult sample collection is solved, and the support vector machine classifier has good robustness and high accuracy.
In at least one embodiment of the present invention, the classification types of the trained support vector machine classifier may include normal elements, damaged elements, blank-welded elements, residual glue elements, and the like.
In at least one embodiment of the present invention, the classification type of the trained support vector machine classifier may include normal elements and fault elements.
The average fault recognition time of the method for a circuit board image with the resolution of 2448 x 2048 is 2.51 seconds, so that the fault recognition efficiency is improved.
According to the technical scheme, the method judges whether the circuit board to be tested has faults or not according to the element types of the elements to be tested and the position information of the elements to be tested, and can improve the fault identification efficiency of the circuit board to be tested. In addition, the method can identify the fault element in each element to be detected according to each candidate image through the support vector machine, can accurately identify the fault element in the circuit board to be detected, and improves the accuracy of identifying the fault of the circuit board to be detected.
Fig. 2 is a functional block diagram of a circuit board fault recognition device according to a preferred embodiment of the present invention. The circuit board fault recognition device operates in the electronic equipment. The circuit board fault recognition device 11 includes a first acquisition module 110, a labeling module 111, a second acquisition module 112, an extraction module 113, a recognition module 114, and a judgment module 115. The module referred to in the present invention refers to a series of computer program segments, which are stored in a memory, that can be fetched by a processor and that can fulfill a fixed function. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
The first obtaining module 110 is configured to obtain an image of a circuit board to be tested of the circuit board to be tested, where the circuit board to be tested includes a plurality of components to be tested.
In at least one embodiment of the present invention, the circuit board under test image includes an image of an entire circuit board under test of the electronic device, or an image of a portion of the circuit board under test of the electronic device.
In at least one embodiment of the invention, the circuit board image to be tested is acquired by an industrial camera.
For example, an image of the entire circuit board to be tested may be captured by an industrial camera to obtain the circuit board image to be tested.
In at least one embodiment of the invention, the industrial camera can be controlled by the motion control system to carry out block shooting on the whole circuit board to be tested of the electronic equipment, so as to obtain an image of part of the circuit board to be tested of the electronic equipment.
In at least one embodiment of the invention, the front and the back of the whole circuit board to be tested of the electronic equipment are photographed in blocks through the industrial camera, so that the image of part of the circuit board to be tested of the electronic equipment is obtained.
The labeling module 111 is configured to label the images of the plurality of to-be-tested elements in the to-be-tested circuit board image, so as to obtain candidate images of each to-be-tested element.
In at least one embodiment of the present invention, the image labeling the plurality of components under test in the circuit board image under test includes:
sliding on the circuit board image to be detected by sliding windows with different sizes so as to intercept a plurality of sliding images;
Identifying each element to be tested from the plurality of sliding images by using the trained element identification model;
Labeling each identified element to be detected in the image of the circuit board to be detected to obtain candidate images of each element to be detected, wherein the element identification model is a two-class neural network.
In at least one embodiment of the present invention, the circuit board fault recognition device 11 further includes a training module 116 for training the component recognition model after the trained component recognition model is used to recognize each component under test from the plurality of sliding images.
The training the element identification model includes:
Acquiring an element image sample, wherein the element image sample is provided with a corresponding element image label;
taking the element image sample as input, and calculating a recognition result of the element image sample through the element recognition model;
And optimizing the element identification model based on a back propagation algorithm according to the identification result and the element image label to obtain a trained element identification model.
When the element image sample is a complete element, the element image label corresponding to the element image sample is 1 (indicating that the element image sample is an image of a complete element), and when the element image sample is not a complete element, the element image label corresponding to the element image sample is 0 (indicating that the element image sample is not an image of a complete element, or that the element image sample is not an image of an element).
In at least one embodiment of the present invention, the circuit board fault recognition device 11 further includes a preprocessing module 117 for preprocessing and calibrating the circuit board image to be tested before the image labeling of the plurality of components to be tested in the circuit board image to be tested.
The second obtaining module 112 is configured to obtain the position information of each element to be tested according to the candidate image of each element to be tested.
In at least one embodiment of the present invention, the obtaining the positional information of each element to be measured according to the candidate image of each element to be measured includes:
Acquiring a first pixel point of the upper left corner of each candidate image;
Determining a first coordinate of the first pixel point in the circuit board image to be detected;
and determining the first coordinates as position information of the element to be detected corresponding to the candidate image.
In at least one embodiment of the present invention, the obtaining the positional information of each element to be measured according to the candidate image of each element to be measured includes:
Acquiring a second pixel point of the center of each candidate image;
determining a second coordinate of the second pixel point in the circuit board image to be detected;
And determining the second coordinates as position information of the element to be detected corresponding to the candidate image.
The extracting module 113 is configured to extract element features of each candidate image based on the aggregate channel feature method, so as to obtain a first feature vector of each candidate image.
In at least one embodiment of the present invention, the aggregate channel feature method may superimpose a plurality of different features (e.g., color features, gradient features, and edge features) of each candidate image to form a unified feature.
In at least one embodiment of the present invention, the extracting the element features of each candidate image based on the aggregate channel feature method includes:
Transforming the candidate image to a YUV color space;
determining Y-channel features of the candidate image as first channel features;
Respectively shrinking the feature graphs of the Y, U, V channels of the candidate image by half, taking the feature graphs as the upper left corner, the upper right corner and the lower left corner of the second channel feature, and filling the lower right corner of the second channel feature with 0;
and converting feature images of Y, U, V channels of the candidate image by Sobel operator and performing size scaling to obtain three edge images, wherein the three edge images are used as an upper left corner, an upper right corner and a lower left corner of the features of the second channel, and each position in the three edge images is used as a lower right corner by taking a pixel value with the largest amplitude value.
The element features of each candidate image may efficiently describe the element features corresponding to the candidate image.
The identifying module 114 is configured to identify a component type of each component to be tested according to the first feature vector of each candidate image.
In at least one embodiment of the present invention, an AdaBoost classifier may be trained, through which the element type of each element to be tested is identified according to the first feature vector of each candidate image.
A first candidate image sample and a first tag of the first candidate image sample may be acquired;
Extracting element features of the first candidate image sample based on an aggregation channel feature method to obtain a first feature vector sample of the first candidate image sample;
taking a decision tree as a weak classifier, taking a first feature vector sample of the first candidate image sample as an input, and carrying out combined training on a plurality of weak classifiers according to the first label;
the weak classifiers are weighted and combined to obtain a strong classifier applied to element type classification;
And identifying the element type of each element to be detected according to the first feature vector of each candidate image through the strong classifier.
In at least one embodiment of the invention, the element types include chip elements, resistive elements, capacitive elements, and the like.
The judging module 115 is configured to judge whether the circuit board to be tested has a fault according to the element type and the position information of each element to be tested, and output fault information when the circuit board to be tested has a fault.
In at least one embodiment of the present invention, the determining whether the circuit board to be tested has a fault according to the component type and the position information of each component to be tested includes:
Determining the element number of each element type of the circuit board to be tested according to the element type of each element to be tested;
acquiring the element number of each element type of a standard circuit board and the standard position of each element to be tested;
judging whether the number of the elements of each given element type of the circuit board to be tested is smaller than the number of the elements of the given element type of the standard circuit board;
If the number of the components of the given component type of the circuit board to be tested is smaller than the number of the components of the given component type of the standard circuit board, determining that the circuit board to be tested has a component dropping fault;
Judging whether the position information of each given element to be tested of the circuit board to be tested is consistent with the standard position of the given element to be tested of the standard circuit board;
And if the position information of the given element to be tested of the circuit board to be tested is inconsistent with the standard position of the given element to be tested of the standard circuit board, the circuit board to be tested has a collision piece fault.
In at least one embodiment of the present invention, if the number of components of the given component type of the circuit board under test is equal to the number of components of the given component type of the standard circuit board, and the positional information of the given component under test of the circuit board under test is identical to the standard position of the given component under test of the standard circuit board, it is determined that the circuit board under test is free from a fault.
In at least one embodiment of the present invention, the identifying module 114 is further configured to identify, by means of a support vector machine, a faulty component in each component under test according to each candidate image.
In at least one embodiment of the present invention, the identifying, by the support vector machine, the faulty component among the components to be tested according to the candidate images includes:
acquiring a plurality of second candidate image samples and second labels of the second candidate image samples;
extracting second feature vectors of each second candidate image by adopting a local binary pattern algorithm;
Training the support vector machine classifier according to the second feature vector of each second candidate image and the second label of each second candidate image sample to obtain a trained support vector machine classifier;
and identifying the fault element in each element to be tested through the trained support vector machine classifier.
The training module is further used for generating a type vector of each second candidate image sample according to the element type of each second candidate image sample before the trained support vector machine classifier identifies the fault element in each element to be tested;
Connecting the second feature vector and the type vector of each second candidate image sample to obtain a third feature vector of each second candidate image;
And training the support vector machine classifier according to the third feature vector of each second candidate image and the second label of each second candidate image sample to obtain a trained support vector machine classifier.
The support vector machine classifier can be trained through small samples, so that the problem of difficult sample collection is solved, and the support vector machine classifier has good robustness and high accuracy.
In at least one embodiment of the present invention, the classification types of the trained support vector machine classifier may include normal elements, damaged elements, blank-welded elements, residual glue elements, and the like.
In at least one embodiment of the present invention, the classification type of the trained support vector machine classifier may include normal elements and fault elements.
The device has the advantages that the average fault recognition time of the device for a circuit board image with the resolution of 2448 x 2048 is 2.51 seconds, and the fault recognition efficiency is improved.
According to the technical scheme, the device judges whether the circuit board has faults or not according to the element types of the elements to be detected and the position information of the elements to be detected, and can improve the fault identification efficiency of the circuit board. In addition, the device can identify the fault element in each element to be detected according to each candidate image through the support vector machine, so that the fault element in the circuit board can be accurately identified, and the accuracy of identifying the fault of the circuit board is improved.
Fig. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention for implementing the method for identifying a circuit board fault.
In one embodiment of the invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and a computer program, such as a circuit board fault identification program, stored in the memory 12 and executable on the processor 13.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and may include more or less components than illustrated, or may combine certain components, or different components, e.g. the electronic device 1 may further include input-output devices, network access devices, buses, etc.
The Processor 13 may be a central processing module (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc., and the processor 13 is an operation core and a control center of the electronic device 1, connects various parts of the entire electronic device 1 by using various interfaces and lines, and obtains an operating system of the electronic device 1 and various installed application programs, program codes, etc.
The processor 13 obtains an operating system of the electronic device 1 and various applications installed. The processor 13 obtains the application program to implement the steps in the embodiments of the method for identifying a fault of a circuit board described above, for example, the steps shown in fig. 1.
Illustratively, the computer program may be split into one or more modules that are stored in the memory 12 and retrieved by the processor 13 to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function for describing the acquisition process of the computer program in the electronic device 1. For example, the computer program may be divided into a first acquisition module 110, a labeling module 111, a second acquisition module 112, an extraction module 113, an identification module 114, a judgment module 115.
The memory 12 may be used to store the computer program and/or module, and the processor 13 may implement various functions of the electronic device 1 by running or retrieving the computer program and/or module stored in the memory 12 and invoking data stored in the memory 12. The memory 12 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), etc., and a storage data area that may store data created according to the use of the electronic device, etc. In addition, the memory 12 may include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart memory card (SMARTMEDIA CARD, SMC), secure Digital (SD) card, flash memory card (FLASH CARD), at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
The memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a physical memory, such as a memory bank, a TF card (Trans-FLASH CARD), or the like.
The modules integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand alone product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when acquired by a processor, may implement the steps of each of the method embodiments described above.
Wherein the computer program comprises computer program code which may be in the form of source code, object code, an available file or some intermediate form, etc. The computer readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
In combination with fig. 1, the memory 12 in the electronic device 1 stores a plurality of instructions to implement a circuit board fault identification method, and the processor 13 may acquire the plurality of instructions to implement that MAC values of a plurality of machine nodes are acquired, ID addresses are allocated to the plurality of machine nodes according to the MAC values of the plurality of machine nodes, a machine node state table is generated according to the MAC values of the plurality of machine nodes and the ID addresses, a heartbeat instruction is sent to the plurality of machine nodes according to the machine node state table, a heartbeat packet returned by the plurality of machine nodes in response to the heartbeat instruction is received, and states of the plurality of machine nodes are determined according to the heartbeat packet and the machine node state table.
Specifically, the specific implementation method of the above instructions by the processor 13 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in hardware plus software functional modules.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other modules or steps, and that the singular does not exclude a plurality. A plurality of modules or means recited in the system claims can also be implemented by means of one module or means in software or hardware. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (8)

1.一种电路板故障识别方法,应用于电子设备中,其特征在于,所述电路板故障识别方法包括:1. A circuit board fault identification method, applied to electronic equipment, characterized in that the circuit board fault identification method comprises: 获取待测电路板的待测电路板图像,所述待测电路板包括多个待测元件;Acquire a circuit board image of a circuit board to be tested, wherein the circuit board to be tested includes a plurality of components to be tested; 在所述待测电路板图像中对所述多个待测元件进行图像标注,得到各个待测元件的候选图像;Annotating the plurality of components to be tested in the image of the circuit board to be tested to obtain a candidate image of each component to be tested; 根据各个待测元件的候选图像获取各个待测元件的位置信息;Acquire position information of each component to be tested according to the candidate image of each component to be tested; 基于聚合通道特征方法提取各个候选图像的元件特征,得到各个候选图像的第一特征向量,包括:通过所述聚合通道特征方法将所述各个候选图像的颜色特征、梯度特征以及边缘特征进行叠加;Extracting component features of each candidate image based on the aggregated channel feature method to obtain a first feature vector of each candidate image includes: superimposing color features, gradient features, and edge features of each candidate image by the aggregated channel feature method; 根据各个候选图像的第一特征向量识别各个待测元件的元件类型;Identifying the component type of each component to be tested according to the first feature vector of each candidate image; 根据各个待测元件的元件类型和位置信息判断所述待测电路板是否存在故障,并在所述待测电路板存在故障时,输出故障信息;Determine whether the circuit board to be tested has a fault according to the component type and position information of each component to be tested, and output fault information when the circuit board to be tested has a fault; 通过支持向量机,根据各个候选图像识别各个待测元件中的故障元件,包括:获取多个第二候选图像样本和各个第二候选图像样本的第二标签;采用局部二值模式算法提取各个第二候选图像的第二特征向量;根据各个第二候选图像样本的元件类型生成各个第二候选图像样本的类型向量;连接各个第二候选图像样本的第二特征向量和类型向量,得到各个第二候选图像的第三特征向量;根据各个第二候选图像样本的第三特征向量和各个第二候选图像样本的第二标签对支持向量机分类器进行训练,得到训练后的支持向量机分类器;通过所述训练后的支持向量机分类器识别各个待测元件中的故障元件。By using a support vector machine, faulty components in each component under test are identified according to each candidate image, including: obtaining multiple second candidate image samples and a second label of each second candidate image sample; extracting a second feature vector of each second candidate image by using a local binary pattern algorithm; generating a type vector of each second candidate image sample according to the component type of each second candidate image sample; connecting the second feature vector and the type vector of each second candidate image sample to obtain a third feature vector of each second candidate image; training a support vector machine classifier according to the third feature vector of each second candidate image sample and the second label of each second candidate image sample to obtain a trained support vector machine classifier; and identifying the faulty components in each component under test by using the trained support vector machine classifier. 2.如权利要求1所述的电路板故障识别方法,其特征在于,所述在所述待测电路板图像中对所述多个待测元件进行图像标注包括:2. The circuit board fault identification method according to claim 1, wherein the step of annotating the plurality of components to be tested in the circuit board image to be tested comprises: 以不同大小的滑动窗口在所述待测电路板图像上滑动,以截取多个滑动图像;Sliding windows of different sizes on the image of the circuit board to be tested to capture a plurality of sliding images; 用训练后的元件识别模型从所述多个滑动图像中识别出各个待测元件;Using the trained component recognition model to identify each component to be tested from the plurality of sliding images; 在所述待测电路板图像中对识别出的各个待测元件进行标注,得到各个待测元件的候选图像。Each identified component to be tested is marked in the image of the circuit board to be tested to obtain a candidate image of each component to be tested. 3.如权利要求2所述的电路板故障识别方法,其特征在于,进一步包括训练元件识别模型,所述训练元件识别模型包括:3. The circuit board fault identification method according to claim 2, further comprising a training component identification model, wherein the training component identification model comprises: 获取元件图像样本,所述元件图像样本存在对应的元件图像标签;Acquire a component image sample, wherein the component image sample has a corresponding component image label; 以所述元件图像样本为输入,通过所述元件识别模型计算对所述元件图像样本的识别结果;Taking the component image sample as input, calculating the recognition result of the component image sample through the component recognition model; 基于反向传播算法根据所述识别结果和所述元件图像标签优化所述元件识别模型,得到训练后的元件识别模型。The component recognition model is optimized according to the recognition result and the component image label based on a back propagation algorithm to obtain a trained component recognition model. 4.如权利要求1所述的电路板故障识别方法,其特征在于,所述根据各个待测元件的候选图像获取各个待测元件的位置信息包括:4. The circuit board fault identification method according to claim 1, wherein the step of acquiring the position information of each component under test according to the candidate image of each component under test comprises: 获取每个候选图像的左上角的第一像素点;Get the first pixel point in the upper left corner of each candidate image; 确定所述第一像素点在所述待测电路板图像的第一坐标;Determine a first coordinate of the first pixel point in the image of the circuit board to be tested; 将所述第一坐标确定为该候选图像对应的待测元件的位置信息。The first coordinate is determined as the position information of the component to be measured corresponding to the candidate image. 5.如权利要求1所述的电路板故障识别方法,其特征在于,所述根据各个待测元件的元件类型和位置信息判断所述待测电路板是否存在故障包括:5. The circuit board fault identification method according to claim 1, wherein judging whether the circuit board to be tested has a fault according to the component type and position information of each component to be tested comprises: 根据各个待测元件的元件类型确定所述待测电路板的每个元件类型的元件数量;Determine the number of components of each component type of the circuit board to be tested according to the component type of each component to be tested; 获取标准电路板的各个元件类型的元件数量和各个待测元件的标准位置;Obtain the number of components of each component type on the standard circuit board and the standard position of each component to be tested; 响应于所述待测电路板的元件类型的元件数量小于所述标准电路板的所述元件类型的元件数量,确定所述待测电路板存在掉件故障;及/或In response to the number of components of the component type of the circuit board to be tested being less than the number of components of the component type of the standard circuit board, determining that the circuit board to be tested has a component loss fault; and/or 响应于所述待测电路板的待测元件的位置信息与所述标准电路板的所述待测元件的标准位置不一致,确定所述待测电路板存在撞件故障。In response to the position information of the component under test of the circuit board under test being inconsistent with the standard position of the component under test of the standard circuit board, it is determined that a collision fault exists in the circuit board under test. 6.一种电路板故障识别装置,运行于电子设备,所述电子设备与多个机器节点通信,其特征在于,所述电路板故障识别装置包括:6. A circuit board fault identification device, running on an electronic device, the electronic device communicating with a plurality of machine nodes, characterized in that the circuit board fault identification device comprises: 第一获取模块,用于获取待测电路板的待测电路板图像,所述待测电路板包括多个待测元件;A first acquisition module is used to acquire a circuit board image of a circuit board to be tested, wherein the circuit board to be tested includes a plurality of components to be tested; 标注模块,用于在所述待测电路板图像中对所述多个待测元件进行图像标注,得到各个待测元件的候选图像;A labeling module, used for labeling the plurality of components to be tested in the image of the circuit board to be tested, so as to obtain a candidate image of each component to be tested; 第二获取模块,用于根据各个待测元件的候选图像获取各个待测元件的位置信息;A second acquisition module, used for acquiring position information of each component to be tested according to the candidate image of each component to be tested; 提取模块,用于基于聚合通道特征方法提取各个候选图像的元件特征,得到各个候选图像的第一特征向量,包括:通过所述聚合通道特征方法将所述各个候选图像的颜色特征、梯度特征以及边缘特征进行叠加;An extraction module, used to extract component features of each candidate image based on an aggregate channel feature method to obtain a first feature vector of each candidate image, including: superimposing color features, gradient features, and edge features of each candidate image by using the aggregate channel feature method; 第一识别模块,用于根据各个候选图像的第一特征向量识别各个待测元件的元件类型;A first identification module, used for identifying the component type of each component to be tested according to the first feature vector of each candidate image; 判断模块,用于根据各个待测元件的元件类型和位置信息判断所述待测电路板是否存在故障,并在所述待测电路板存在故障时,输出故障信息;通过支持向量机,根据各个候选图像识别各个待测元件中的故障元件,包括:获取多个第二候选图像样本和各个第二候选图像样本的第二标签;采用局部二值模式算法提取各个第二候选图像的第二特征向量;根据各个第二候选图像样本的元件类型生成各个第二候选图像样本的类型向量;连接各个第二候选图像样本的第二特征向量和类型向量,得到各个第二候选图像的第三特征向量;根据各个第二候选图像样本的第三特征向量和各个第二候选图像样本的第二标签对支持向量机分类器进行训练,得到训练后的支持向量机分类器;通过所述训练后的支持向量机分类器识别各个待测元件中的故障元件。A judgment module is used to judge whether the circuit board to be tested has a fault according to the component type and position information of each component to be tested, and output fault information when the circuit board to be tested has a fault; through a support vector machine, the faulty component in each component to be tested is identified according to each candidate image, including: obtaining multiple second candidate image samples and the second label of each second candidate image sample; using a local binary pattern algorithm to extract the second feature vector of each second candidate image; generating a type vector of each second candidate image sample according to the component type of each second candidate image sample; connecting the second feature vector and the type vector of each second candidate image sample to obtain a third feature vector of each second candidate image; training a support vector machine classifier according to the third feature vector of each second candidate image sample and the second label of each second candidate image sample to obtain a trained support vector machine classifier; identifying the faulty component in each component to be tested by the trained support vector machine classifier. 7. 一种电子设备,其特征在于,所述电子设备包括:7. An electronic device, characterized in that the electronic device comprises: 存储器,存储至少一个指令;及a memory storing at least one instruction; and 处理器,获取所述存储器中存储的指令以实现如权利要求1至5中任意一项所述的电路板故障识别方法。A processor is used to obtain instructions stored in the memory to implement the circuit board fault identification method as described in any one of claims 1 to 5. 8.一种计算机可读存储介质,其特征在于:所述计算机可读存储介质中存储有至少一个指令,所述至少一个指令被一电子设备中的处理器获取以实现如权利要求1至5中任意一项所述的电路板故障识别方法。8. A computer-readable storage medium, characterized in that: at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is obtained by a processor in an electronic device to implement the circuit board fault identification method as described in any one of claims 1 to 5.
CN202010324236.6A 2020-04-22 2020-04-22 Circuit board fault identification method and related equipment Active CN113536868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010324236.6A CN113536868B (en) 2020-04-22 2020-04-22 Circuit board fault identification method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010324236.6A CN113536868B (en) 2020-04-22 2020-04-22 Circuit board fault identification method and related equipment

Publications (2)

Publication Number Publication Date
CN113536868A CN113536868A (en) 2021-10-22
CN113536868B true CN113536868B (en) 2025-07-18

Family

ID=78124064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010324236.6A Active CN113536868B (en) 2020-04-22 2020-04-22 Circuit board fault identification method and related equipment

Country Status (1)

Country Link
CN (1) CN113536868B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114511112B (en) * 2022-01-24 2024-07-19 北京通建泰利特智能系统工程技术有限公司 Intelligent operation and maintenance method and system based on Internet of things and readable storage medium
CN115205575A (en) * 2022-05-07 2022-10-18 奥蒂玛光学科技(深圳)有限公司 Circuit element labeling method, related method, equipment, terminal and storage medium
CN115937170A (en) * 2022-12-23 2023-04-07 正泰集团研发中心(上海)有限公司 Circuit board detection method, device, computer equipment and storage medium
CN116664491A (en) * 2023-04-23 2023-08-29 深圳市世宗自动化设备有限公司 Soft film circuit board defect detection method and related device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110070536A (en) * 2019-04-24 2019-07-30 南京邮电大学 A kind of pcb board component detection method based on deep learning

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7721140B2 (en) * 2007-01-02 2010-05-18 International Business Machines Corporation Systems and methods for improving serviceability of a memory system
CN106960178B (en) * 2017-02-23 2020-02-07 中国科学院自动化研究所 Training method of insulator recognition model and insulator recognition and positioning method
CN108875447A (en) * 2017-05-09 2018-11-23 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of method and system of flow detection
CN109918969B (en) * 2017-12-12 2021-03-05 深圳云天励飞技术有限公司 Face detection method and device, computer device and computer readable storage medium
CN108520514B (en) * 2018-04-04 2020-05-12 国网上海市电力公司 Consistency detection method of printed circuit board electronic components based on computer vision
CN110967615B (en) * 2018-09-30 2022-06-21 鸿富锦精密电子(成都)有限公司 Circuit board fault diagnosis device and diagnosis method
CN109765462A (en) * 2019-03-05 2019-05-17 国家电网有限公司 Fault detection method, device and the terminal device of transmission line of electricity
CN110334775B (en) * 2019-07-12 2023-07-18 广东工业大学 A method and device for UAV line fault identification based on breadth learning

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110070536A (en) * 2019-04-24 2019-07-30 南京邮电大学 A kind of pcb board component detection method based on deep learning

Also Published As

Publication number Publication date
CN113536868A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN113536868B (en) Circuit board fault identification method and related equipment
US11145080B2 (en) Method and apparatus for three-dimensional object pose estimation, device and storage medium
JP2021103555A (en) Image detection method, device, electronic apparatus, storage medium, and program
CN109727275B (en) Object detection method, device, system and computer readable storage medium
CN112258507B (en) Object detection method, device and electronic device for Internet data center
CN112446363A (en) Image splicing and de-duplication method and device based on video frame extraction
CN107977633A (en) Age recognition methods, device and the storage medium of facial image
CN109116129B (en) Terminal detection method, detection device, system and storage medium
CN110837580A (en) Pedestrian picture marking method and device, storage medium and intelligent device
CN110097068A (en) The recognition methods of similar vehicle and device
CN116416190B (en) Defect detection method and device, electronic device and storage medium
JP2018512567A (en) Barcode tag detection in side view sample tube images for laboratory automation
CN106327546B (en) Test method and device for face detection algorithm
CN112328822B (en) Picture pre-marking method and device and terminal equipment
CN113780116B (en) Invoice classification method, device, computer equipment and storage medium
CN112381092A (en) Tracking method, device and computer readable storage medium
CN110826646A (en) Robot vision testing method, device, storage medium and terminal equipment
CN111967529B (en) Identification method, device, equipment and system
CN112819953A (en) Three-dimensional reconstruction method, network model training method and device and electronic equipment
CN109977875A (en) Gesture identification method and equipment based on deep learning
CN113887441B (en) Table data processing method, device, equipment and storage medium
CN110502961A (en) A kind of facial image detection method and device
CN113111713B (en) Image detection method and device, electronic equipment and storage medium
US20220122341A1 (en) Target detection method and apparatus, electronic device, and computer storage medium
CN112686122B (en) Human body and shadow detection method and device, electronic equipment and storage medium

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