WO2017088553A1 - Method and system for rapidly identifying and marking electronic component polarity direction - Google Patents

Method and system for rapidly identifying and marking electronic component polarity direction Download PDF

Info

Publication number
WO2017088553A1
WO2017088553A1 PCT/CN2016/098228 CN2016098228W WO2017088553A1 WO 2017088553 A1 WO2017088553 A1 WO 2017088553A1 CN 2016098228 W CN2016098228 W CN 2016098228W WO 2017088553 A1 WO2017088553 A1 WO 2017088553A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic component
image
polarity direction
electronic components
target electronic
Prior art date
Application number
PCT/CN2016/098228
Other languages
French (fr)
Chinese (zh)
Inventor
杨铭
Original Assignee
广州视源电子科技股份有限公司
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 广州视源电子科技股份有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2017088553A1 publication Critical patent/WO2017088553A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]

Definitions

  • the invention relates to the field of automatic optical detection, and in particular to a method and a system for quickly identifying and marking the polarity direction of an electronic component.
  • a method for quickly identifying the polarity direction of an electronic component includes the following steps:
  • the image data of the target electronic component is forwardly calculated, and the classification features of the polarity direction category of the target electronic component are obtained, and the target electronic components are obtained according to the classification features. Probability distribution of sexual direction categories;
  • the polarity direction category with the highest probability is selected as the polarity direction category of the target electronic component.
  • the image is obtained by including the target electronic component, and then subjected to the forward calculation by using the trained convolutional neural network to obtain the classification feature of the polarity direction category of the target electronic component, and then the target electronic component is obtained.
  • Probability distribution of various polar direction categories belonging to various electronic components The polarity direction category with the highest probability is selected as the polarity direction category of the target electronic component.
  • a convolutional neural network is used.
  • the convolutional neural network can automatically and accurately identify the polarity direction of electronic components, and it is not specific to the structure of electronic components. It is applicable to various electronic components with polarity to achieve cross- The polarity direction identification of the electronic components of the category is widely applicable.
  • the step of calculating the image data of the target electronic component by using the trained convolutional neural network to perform the forward calculation of the image data of the target electronic component includes the following steps:
  • the image data is convoluted by the convolution layer, then nonlinearly transformed by the activation function layer, and then pooled by the pooling layer, and then the classification feature of the polarity direction category of the target electronic component is obtained through the fully connected layer.
  • the convolutional neural network includes a convolution module and a fully connected layer, and the convolution module includes a convolution layer, an activation function layer, and a pooling layer that are sequentially connected.
  • the trained convolutional neural network is obtained by the following steps:
  • the step of establishing a sample set of various polarity directions of various types of electronic components includes the following steps:
  • the precise position of the components, the corresponding electronic components are adjusted according to the precise position of the corresponding electronic components, so that the corresponding electronic components are located at the center of the image of various electronic components, and image sample sets of various polar directions of various electronic components are obtained.
  • there are five convolutional modules wherein the number of convolution kernels of the five convolutional layers is 24, 64, 96, 96, and 64, respectively, and the convolution kernel sizes of the five convolutional layers are respectively 7 ⁇ 7, 5 ⁇ 5, 3 ⁇ 3, 3 ⁇ 3, 3 ⁇ 3, 5 convolutional layers have a step size of 1; the total connection layer is 2, and the number of hidden nodes of the 2 fully connected layers is 512 and 4, respectively.
  • a method for marking the polarity direction of an electronic component includes the following steps:
  • the polarity direction information of the target electronic component is marked in the panel file, and the panel file is used to store various attribute information of the electronic component.
  • the above-mentioned method for labeling the polarity direction of the electronic component can be applied to the AOI board production, and the polarity direction of the components on the PCB board is automatically and accurately marked, thereby improving the automation level of the panel production and improving the efficiency and accuracy of the panel production.
  • a rapid identification system for the polarity direction of electronic components comprising the following units:
  • the calculating unit is configured to perform forward calculation on the image data including the target electronic component by using the trained convolutional neural network, obtain a classification feature of the polarity direction category of the target electronic component, and acquire the target electronic component according to the classification feature to belong to various types of electronic Probability distribution of various polar direction categories of components;
  • the selection unit is configured to select the polarity direction category with the highest probability as the polarity direction category of the target electronic component.
  • the image is obtained by including the target electronic component, and then subjected to the forward calculation by using the trained convolutional neural network to obtain the classification feature of the polarity direction category of the target electronic component, and then the target electronic component is obtained.
  • the probability distribution of various polarity direction categories belonging to various electronic components is selected as the polarity direction category of the target electronic component.
  • a convolutional neural network is used, which can automatically and accurately identify the polarity direction of electronic components through a convolutional neural network, and is not specific to a specific electronic component structure, and is applicable to various electronic components with polarity. It realizes the polarity direction identification of electronic components across categories and has wide applicability.
  • An annotation system for the polarity direction of an electronic component comprising a labeling unit and a quick identification system for the polarity direction of the electronic component, wherein the labeling unit is used to mark the polarity direction information of the target electronic component in the panel file, and the panel file is used for Save various attribute information of electronic components.
  • the above-mentioned electronic component polarity direction labeling system can be applied to AOI board production, and the polarity direction of the components on the PCB board is automatically and accurately marked, thereby improving the automation level of the panel production and improving the efficiency and accuracy of the panel production.
  • FIG. 1 is a schematic flow chart of a method for quickly identifying a polarity direction of an electronic component in one embodiment
  • FIG. 2 is a schematic structural view of a convolution module in one embodiment
  • FIG. 3 is a schematic structural view of a convolutional neural network in one embodiment
  • FIG. 4 is a schematic structural view of a rapid identification system for the polarity direction of an electronic component in one embodiment
  • FIG. 5 is a schematic structural view of a rapid identification system for the polarity direction of an electronic component in one embodiment
  • FIG. 6 is a partial structural schematic view of a rapid identification system for the polarity direction of an electronic component in one embodiment
  • FIG. 7 is a schematic structural view of a rapid identification system for the polarity direction of an electronic component in one embodiment
  • FIG. 8 is a schematic structural view of a rapid identification system for the polarity direction of an electronic component in one embodiment
  • Figure 9 is a block diagram showing the structure of the polarity of the electronic component in one embodiment.
  • the method for quickly identifying the polarity direction of an electronic component of the present invention includes the following steps:
  • Step S101 Acquire an image including the target electronic component
  • the image containing the electronic component may be a PCB card image that needs to identify the polarity of the electronic component, or other images that need to identify the polarity of the electronic component.
  • Step S102 Perform forward calculation on the image data including the target electronic component by using the trained convolutional neural network to obtain a classification feature of the polarity direction category of the target electronic component, and obtain the target electronic component belonging to various electronic components according to the classification feature. Probability distribution of various polar direction categories;
  • the image data including the target electronic component is forwardly calculated by using the convolution module and the fully connected layer in the convolutional neural network after training, and the image data including the target electronic component is passed through the convolution module.
  • the fully connected layer can obtain the classification characteristics of the polarity direction category of the target electronic component;
  • the various polarity direction categories refer to various polarity directions of various electronic components, including various electronic components, and the probability distribution obtained can be obtained.
  • the trained convolutional neural network can operate on the image, identify the polarity direction of the target electronic components, and obtain the probability distribution.
  • Step S103 Select the polarity direction category with the highest probability as the polarity direction category of the target electronic component.
  • the above steps S101, S102 and S103 are processes for performing online testing using the trained convolutional neural network.
  • the step of calculating the image data of the target electronic component by using the trained convolutional neural network to perform the forward calculation of the image data of the target electronic component includes the following steps:
  • the image data is convoluted by the convolution layer, then nonlinearly transformed by the activation function layer, and then pooled by the pooling layer, and then the classification feature of the polarity direction category of the target electronic component is obtained through the fully connected layer.
  • the convolutional neural network includes a convolution module and a fully connected layer, and the convolution module includes a convolution layer, an activation function layer, and a pooling layer that are sequentially connected.
  • the activation function layer may be a ReLU function layer.
  • the convolution module includes a convolution layer, a ReLU function layer, and a pooling layer that are sequentially connected, and convolves the image data of the target electronic component through the convolution layer, and then performs nonlinear transformation through the ReLU function layer. Then, the pooling operation is performed through the pooling layer, and then the classification feature of the polarity direction category of the target electronic component is obtained through the fully connected layer.
  • the ReLU function in the convolutional module of the convolutional neural network is an activation function that can be used for nonlinear transformation;
  • the pooling layer is used for pooling operations, and can aggregate statistics on features of different positions of image samples, and This will cause the final result to be over-fitting.
  • the convolutional neural network has a very strong expression ability, which can effectively solve the problem of low precision in multi-classification tasks. Even in the cross-class electronic component polarity direction recognition task, a very high accuracy can be achieved.
  • the trained convolutional neural network is obtained by the following steps:
  • the feature training convolutional neural network enables the convolutional neural network to identify various polar directions of various electronic components.
  • the use of external data sets to train convolutional neural networks can enhance the identification of convolutional neural networks, but High hardware computing power requirements, usually require high-end GPUs to meet the actual computing speed requirements, thus increasing hardware costs.
  • the technical solution of the invention does not need to use the external data set to train the convolutional neural network, and can accurately and quickly determine the automatic polarity direction of the electronic component under the low-cost hardware configuration, and is suitable for various electronic components (such as capacitors and sockets). , resistance, etc.).
  • the main feature of the scheme is that it does not depend on special hardware mechanisms, and the cost is low, which greatly reduces the requirements of the algorithm for hardware computing power and storage space, and solves the problem of high cost of high-precision technical solutions.
  • the convolutional neural network can be offlinely trained according to the image sample sets of various polarity directions of various electronic components, so that the convolutional neural network can recognize the polarity direction information of the electronic components in the image, thereby being online
  • the trained convolutional neural network is used in the test to identify the polarity direction of the target electronic component.
  • the step of establishing a sample set of various polarity directions of various types of electronic components includes the following steps:
  • the precise position of the components, the corresponding electronic components are adjusted according to the precise position of the corresponding electronic components, so that the corresponding electronic components are located at the center of the image of various electronic components, and image sample sets of various polar directions of various electronic components are obtained.
  • the image sample sets obtained by the above methods are directly taken from the PCB card image, and are images of actual electronic components, which are more instructive.
  • the camera can be set up on the PCB board production line, and different types of PCBs can be collected in batches. Card image, and board tracking technology to avoid repeating a certain PCB board, so each type of PCB board contains multiple image samples, each image sample corresponds to a certain type of PCB board; The corresponding PCB template map needs to be saved when collecting the PCB board image;
  • the position of the PCB card image in multiple image samples may be offset. It is necessary to use the corresponding template PCB template map as a reference, perform image registration for each image sample, and use the electronic component position information of the model PCB card (from The panel file or manual labeling automatically intercepts the electronic component image and automatically labels the electronic component image according to the electronic component category information (from the panel file or manual labeling);
  • the precise position of the electronic components in the image sample is further obtained by matching the electronic components in the PCB template image, and the electronic component images are aligned and adjusted to ensure that the electronic components are located at the center of the image, and image samples of various polar directions of the electronic components are obtained. set.
  • FIG. 3 there are five convolutional modules, wherein the number of convolution kernels of the five convolutional layers is 24, 64, 96, 96, and 64, respectively, and 5 convolutional layers.
  • the size of the convolution kernel is 7 ⁇ 7, 5 ⁇ 5, 3 ⁇ 3, 3 ⁇ 3, 3 ⁇ 3, and the steps of the five convolution layers are all 1; the total connection layer is 2, of which 2 are all.
  • the number of hidden nodes in the connection layer is 512 and 4, respectively.
  • the rapid identification of the polarity direction of the electronic component can be better achieved.
  • the target electronic components in the image are adjusted by the template image of the target electronic component, so that the trained convolutional neural network can more easily identify the target electronic component.
  • the following steps are further included:
  • the above steps are a process of detecting the polarity direction, and it is possible to judge whether or not the electronic component is correctly mounted.
  • the image of the target electronic component acquired by the online test is a PCB card image
  • the corresponding PCB template is matched and matched to obtain the precise position of the target electronic component, and the target electronic component in the image is aligned and adjusted. To ensure that the target electronic component is at the center of the image.
  • the corresponding PCB template is used for the matching, and the PCB template may be a PCB template corresponding to the image sample set image, or may be a PCB template different from the PCB template corresponding to the image sample set image, if In the former, the PCB template corresponding to the image sample set image has been saved during offline training, and can be directly used. In the latter case, in addition to obtaining the PCB board image, the online PCB template needs to obtain the corresponding PCB template from the outside to achieve the subsequent matching match.
  • the implementation of the solution can identify the polarity direction of all electronic components in the acquired PCB card image.
  • the steps of establishing a sample set of various polarity directions of various electronic components and the step of acquiring an image containing the target electronic component include the following steps:
  • the size of the adjusted image is normalized.
  • normalizing the size of the adjusted image may facilitate training of the convolutional neural network to make the convolutional neural network image sample The learning of multi-layer features is more accurate.
  • the normalized processing of the size of the adjusted image facilitates the forward calculation processing of the image of the target electronic component by the convolutional neural network, and accelerates the recognition process of the electronic component.
  • the method for quickly identifying the polarity direction of the electronic component of the present invention uses a convolutional neural network to automatically and accurately identify the polarity direction of the electronic component, and is not specific to a specific electronic component structure, and is applicable to various polarities.
  • the electronic component as long as the image sample set for training the convolutional neural network covers a plurality of types of electronic components, the polarity direction identification of the electronic components across the categories can be realized, and the applicability is wide.
  • Running on the current mainstream GPU can also judge the regular PCB board (including about 20-30 components with polarity), and judge the average calculation time of a component on the GPU even within 1 millisecond. Meet a variety of real-time judgment scenarios; whether it is offline training or online testing, minimize manual intervention, and does not rely on special hardware mechanisms, the cost is lower; no need Powerful computing resources can even run on inexpensive embedded platforms in some scenarios.
  • the invention also provides a method for marking the polarity direction of an electronic component, comprising the following steps:
  • the polarity direction information of the target electronic component is marked in the panel file, and the panel file is used to store various attribute information of the electronic component.
  • the above-mentioned method for labeling the polarity direction of the electronic component can be applied to the AOI board production, and the polarity direction of the components on the PCB board is automatically and accurately marked, thereby improving the automation level of the panel production and improving the efficiency and accuracy of the panel production.
  • the present invention also provides a rapid identification system for the polarity direction of the electronic component.
  • a rapid identification system for the polarity direction of the electronic component of the present invention will be described in detail.
  • the fast identification system of the polarity direction of the electronic component in this embodiment includes the acquisition unit 210, the calculation unit 220 and the selection unit 230 in FIG. 4;
  • An acquiring unit 210 configured to acquire an image that includes the target electronic component
  • the calculating unit 220 is configured to perform forward calculation on the image data including the target electronic component by using the trained convolutional neural network, obtain a classification feature of the polarity direction category of the target electronic component, and obtain the target electronic component according to the classification feature. Probability distribution of various polar direction categories of electronic components;
  • the selecting unit 230 is configured to select a polarity direction category with the highest probability as the polarity direction category of the target electronic component.
  • the image is obtained by including the target electronic component, and then subjected to the forward calculation by using the trained convolutional neural network to obtain the classification feature of the polarity direction category of the target electronic component, and then the target electronic component is obtained.
  • the probability distribution of various polarity direction categories belonging to various electronic components is selected as the polarity direction category of the target electronic component.
  • This scheme uses a convolutional neural network to automatically and accurately identify the poles of electronic components through convolutional neural networks. Sexual orientation, and is not specific to the structure of electronic components. It is applicable to various electronic components with polarity, and realizes the polarity direction identification of electronic components across categories, and has wide applicability.
  • the calculation unit 220 performs convolution operation on the image data through the convolution layer, then performs nonlinear transformation through the activation function layer, performs pooling operation through the pooling layer, and then obtains target electrons through the fully connected layer.
  • a classification feature of a polarity direction category of the component wherein the convolutional neural network includes a convolution module and a fully connected layer, and the convolution module includes a convolution layer, an activation function layer, and a pooling layer that are sequentially connected.
  • the rapid identification system of the polarity direction of the electronic component further includes an establishing unit 240 and a training unit 250;
  • the establishing unit 240 is configured to establish an image sample set of various polarity directions of various electronic components
  • the training unit 250 is configured to perform forward calculation on each image sample data of the image sample set by using the convolution module and the fully connected layer in the convolutional neural network, and obtain classifications of various polarity direction categories of various electronic components.
  • the feature trains the convolutional neural network according to each classification feature, so that the convolutional neural network can recognize various polar directions of various electronic components.
  • the establishing unit 240 includes a registration unit 241 and an intercept processing unit 242;
  • the registration unit 241 is configured to acquire a PCB card image and a PCB template image, and perform position registration on the PCB card image by using the PCB template image as a reference;
  • the intercepting processing unit 242 is configured to intercept the electronic component image on the PCB card image after the position registration, and match various electronic components in the electronic component images by various electronic components in the PCB template image to obtain various electronic components.
  • the precise position of the corresponding electronic components in the image, the corresponding electronic components are adjusted according to the precise position of the corresponding electronic components, so that the corresponding electronic components are located at the center of the image of various electronic components, and image samples of various polar directions of various electronic components are obtained. set.
  • there are five convolutional modules wherein the number of convolution kernels of the five convolutional layers is 24, 64, 96, 96, and 64, respectively, and the convolution kernel sizes of the five convolutional layers are respectively 7 ⁇ 7, 5 ⁇ 5, 3 ⁇ 3, 3 ⁇ 3, 3 ⁇ 3, the steps of the five convolutional layers are all 1; the total connection layer is 2, wherein the number of hidden nodes of the 2 fully connected layers They are 512 and 4 respectively.
  • the rapid identification system of the polarity direction of the electronic component is further Include a pre-processing unit 260;
  • the pre-processing unit 260 is configured to match the target electronic component in the image with the template image of the target electronic component after acquiring the image of the target electronic component, to obtain the precise position of the target electronic component in the image, according to the precise position
  • the target electronic components in the image are adjusted such that the target electronic components in the image are located at the center of the image, and the adjusted images are used for forward calculation by the trained convolutional neural network.
  • the fast identification system of the polarity direction of the electronic component further includes an alarm unit 270 for selecting the polarity direction category with the highest probability and the preset polarity direction of the electronic component. Different, the error alarm information is given.
  • the rapid identification system of the polarity direction of the electronic component of the present invention corresponds to the rapid identification method of the polarity direction of the electronic component of the present invention, and the technical features described in the embodiment of the rapid identification method of the polarity direction of the electronic component are beneficial.
  • the effects are all applicable to embodiments of the fast identification system for the polarity direction of the electronic components.
  • the present invention also provides an annotation system for the polarity direction of an electronic component, as shown in FIG. 9, comprising an identification unit 300 and the above-described identification system for the polarity direction of the electronic component, and the labeling unit 300 is configured to be based on the polarity direction of the electronic component.
  • the polar identification direction of the target electronic component determined by the system is quickly identified, the polarity direction information of the electronic component is marked in the panel file, and the panel file is used to store various attribute information of the electronic component.
  • the above-mentioned electronic component polarity direction labeling system can be applied to AOI board production, and the polarity direction of the components on the PCB board is automatically and accurately marked, thereby improving the automation level of the panel production and improving the efficiency and accuracy of the panel production.

Landscapes

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

Abstract

A method and system for rapidly identifying and marking an electronic component polarity direction. The method comprises: acquiring an image containing a target electronic component (S101); performing forward calculation on image data of the target electronic component by using a trained convolutional neural network, acquiring a classification characteristic of a polarity direction category of the target electronic component, and acquiring, according to the classification characteristic, a probability distribution of polarity direction categories of the target electronic component belonging to the all kinds of electronic components (S102); and selecting a polarity direction category having a maximum probability as the polarity direction category of the target electronic component (S103). In the method, a convolutional neural network is used, and accordingly polarity directions of electronic components can be identified automatically and precisely; the method is not aimed at a specified electronic component structure but is suitable for all kinds of electronic components having polarity, and accordingly cross-category polarity direction identification of electronic components is implemented, and the method has broad applicability.

Description

电子元件极性方向的快速识别、标注的方法和系统Method and system for quickly identifying and marking the polarity direction of electronic components 技术领域Technical field
本发明涉及自动光学检测领域,特别是涉及一种电子元件极性方向的快速识别、标注的方法和系统。The invention relates to the field of automatic optical detection, and in particular to a method and a system for quickly identifying and marking the polarity direction of an electronic component.
背景技术Background technique
目前,对于PCB板,需要在对其上的电子元件进行极性方向判断。现在对于电子元件极性方向判断,主要有两种方法:一是基于元件结构特征的极性方向判断,这种方法是基于特定的元件结构特征,通常只针对某类元件设计,适用性受限,另外,部分结构特征在不同环境下(如光照不同、拍摄角度不同、噪声干扰等)不稳定,导致判断准确率较低;二是基于正反模板匹配的极性方向判断,只要针对每种元件都设定一个模板,但这样可能会因多类别模板混用而导致准确率降低,而且元件只要外观稍有不同就得引入新的模板,可扩展性受限,计算时间也会因模板库的增大而增加。At present, for the PCB board, it is necessary to judge the polarity direction of the electronic components thereon. At present, there are two main methods for judging the polarity direction of electronic components: one is based on the polarity direction judgment of component structural features. This method is based on specific component structure features, and is usually only designed for certain types of components, and the applicability is limited. In addition, some structural features are unstable under different environments (such as different illumination, different shooting angles, noise interference, etc.), resulting in lower accuracy of judgment; second, based on the polarity direction of positive and negative template matching, as long as The components are all set to a template, but this may result in a lower accuracy due to the mixing of multiple categories of templates, and the components have to introduce new templates as long as the appearance is slightly different, the scalability is limited, and the calculation time is also due to the template library. Increase and increase.
发明内容Summary of the invention
基于此,有必要针对电子元件极性方向判断准确率低、适用性有限的问题,提供一种电子元件极性方向的快速识别、标注的方法和系统。Based on this, it is necessary to provide a method and system for quickly identifying and marking the polarity direction of electronic components in order to solve the problem of low accuracy and limited applicability for the polarity direction of electronic components.
一种电子元件极性方向的快速识别方法,包括以下步骤:A method for quickly identifying the polarity direction of an electronic component includes the following steps:
获取包含目标电子元件的图像;Obtain an image containing the target electronic component;
利用训练后的卷积神经网络对包含目标电子元件的图像数据作前向计算,获得目标电子元件的极性方向类别的分类特征,根据分类特征获取目标电子元件属于各类电子元件的各种极性方向类别的概率分布;Using the trained convolutional neural network, the image data of the target electronic component is forwardly calculated, and the classification features of the polarity direction category of the target electronic component are obtained, and the target electronic components are obtained according to the classification features. Probability distribution of sexual direction categories;
选取概率最大的极性方向类别作为目标电子元件的极性方向类别。The polarity direction category with the highest probability is selected as the polarity direction category of the target electronic component.
根据上述快速识别方法,其是获取包括目标电子元件的图像,再利用训练后的卷积神经网络对其作前向计算,获得目标电子元件的极性方向类别的分类特征,再获取目标电子元件属于各类电子元件的各种极性方向类别的概率分布, 选取其中概率最大的极性方向类别作为目标电子元件的极性方向类别。此方案中使用了卷积神经网络,通过卷积神经网络可以自动精准地识别电子元件的极性方向,而且并不针对特定的电子元件结构,适用于各种带极性的电子元件,实现跨类别的电子元件的极性方向识别,适用性较广。According to the above fast identification method, the image is obtained by including the target electronic component, and then subjected to the forward calculation by using the trained convolutional neural network to obtain the classification feature of the polarity direction category of the target electronic component, and then the target electronic component is obtained. Probability distribution of various polar direction categories belonging to various electronic components, The polarity direction category with the highest probability is selected as the polarity direction category of the target electronic component. In this scheme, a convolutional neural network is used. The convolutional neural network can automatically and accurately identify the polarity direction of electronic components, and it is not specific to the structure of electronic components. It is applicable to various electronic components with polarity to achieve cross- The polarity direction identification of the electronic components of the category is widely applicable.
在其中一个实施例中,利用训练后的卷积神经网络对包含目标电子元件的图像数据作前向计算,获得目标电子元件的极性方向类别的分类特征的步骤包括以下步骤:In one embodiment, the step of calculating the image data of the target electronic component by using the trained convolutional neural network to perform the forward calculation of the image data of the target electronic component includes the following steps:
通过卷积层对图像数据进行卷积运算,接着通过激活函数层进行非线性变换,再通过池化层进行池化操作,然后通过全连接层获得目标电子元件的极性方向类别的分类特征,其中,卷积神经网络包括卷积模块和全连接层,卷积模块包括依次连接的卷积层、激活函数层和池化层。The image data is convoluted by the convolution layer, then nonlinearly transformed by the activation function layer, and then pooled by the pooling layer, and then the classification feature of the polarity direction category of the target electronic component is obtained through the fully connected layer. The convolutional neural network includes a convolution module and a fully connected layer, and the convolution module includes a convolution layer, an activation function layer, and a pooling layer that are sequentially connected.
在其中一个实施例中,训练后的卷积神经网络通过以下步骤获得:In one of the embodiments, the trained convolutional neural network is obtained by the following steps:
建立各类电子元件的各种极性方向的图像样本集;Establishing image sample sets of various polarity directions of various electronic components;
利用卷积神经网络中相互连接的卷积模块和全连接层对图像样本集的各图像样本数据分别进行前向计算,获得各类电子元件的各种极性方向类别的分类特征,根据各分类特征训练卷积神经网络,使卷积神经网络识别各类电子元件的各种极性方向。Using the convolution module and the fully connected layer in the convolutional neural network to perform forward calculation on each image sample data of the image sample set, and obtain classification features of various polarity direction categories of various electronic components, according to each classification The feature training convolutional neural network enables the convolutional neural network to identify various polar directions of various electronic components.
在其中一个实施例中,建立各类电子元件的各种极性方向的样本集的步骤包括以下步骤:In one of the embodiments, the step of establishing a sample set of various polarity directions of various types of electronic components includes the following steps:
获取PCB板卡图像和PCB模板图,并以PCB模板图为参考,对PCB板卡图像进行位置配准;Obtaining the PCB board image and the PCB template map, and using the PCB template map as a reference to position the PCB board image;
截取位置配准后PCB板卡图像上的各类电子元件图像,以PCB模板图中的各类电子元件对各类电子元件图像中相应的电子元件进行匹配,获得各类电子元件图像中相应电子元件的精确位置,根据相应电子元件的精确位置对相应电子元件进行调整,使相应电子元件位于各类电子元件图像的中心,获得各类电子元件的各种极性方向的图像样本集。Intercepting the image of various electronic components on the PCB board image after registration, and matching the corresponding electronic components in the image of various electronic components with various electronic components in the PCB template image, and obtaining corresponding electrons in the image of various electronic components. The precise position of the components, the corresponding electronic components are adjusted according to the precise position of the corresponding electronic components, so that the corresponding electronic components are located at the center of the image of various electronic components, and image sample sets of various polar directions of various electronic components are obtained.
在其中一个实施例中,卷积模块为5个,其中,5个卷积层的卷积核数目分别为24,64,96,96和64,5个卷积层的卷积核大小分别为7×7,5×5,3 ×3,3×3,3×3,5个卷积层的步长均为1;全连接层为2个,其中,2个全连接层的隐节点数分别为512和4。In one embodiment, there are five convolutional modules, wherein the number of convolution kernels of the five convolutional layers is 24, 64, 96, 96, and 64, respectively, and the convolution kernel sizes of the five convolutional layers are respectively 7×7, 5×5, 3 ×3, 3×3, 3×3, 5 convolutional layers have a step size of 1; the total connection layer is 2, and the number of hidden nodes of the 2 fully connected layers is 512 and 4, respectively.
在其中一个实施例中,在获取包含目标电子元件的图像的步骤之后,包括以下步骤:In one of the embodiments, after the step of acquiring the image containing the target electronic component, the following steps are included:
获取目标电子元件的模板图,以目标电子元件的模板图对图像中的目标电子元件进行匹配,获得图像中的目标电子元件的精确位置,根据精确位置对图像中的目标电子元件进行调整,使图像中的目标电子元件位于图像的中心,调整后的图像供训练后的卷积神经网络作前向计算。Obtaining a template image of the target electronic component, matching the target electronic component in the image with a template image of the target electronic component, obtaining an accurate position of the target electronic component in the image, and adjusting the target electronic component in the image according to the precise position, so that The target electronic component in the image is located at the center of the image, and the adjusted image is used for forward calculation by the trained convolutional neural network.
一种电子元件极性方向的标注方法,包括以下步骤:A method for marking the polarity direction of an electronic component includes the following steps:
根据上述电子元件极性方向的快速识别方法确定的目标电子元件的极性方向,在板式文件中标注目标电子元件的极性方向信息,板式文件用于保存电子元件的各种属性信息。According to the polarity direction of the target electronic component determined by the fast identification method of the polarity direction of the electronic component, the polarity direction information of the target electronic component is marked in the panel file, and the panel file is used to store various attribute information of the electronic component.
上述电子元件极性方向的标注方法可以应用于AOI板式制作,自动、精准地对PCB板卡上的元件进行极性方向标注,从而提升板式制作的自动化水平,改善板式制作的效率与准确性。The above-mentioned method for labeling the polarity direction of the electronic component can be applied to the AOI board production, and the polarity direction of the components on the PCB board is automatically and accurately marked, thereby improving the automation level of the panel production and improving the efficiency and accuracy of the panel production.
一种电子元件极性方向的快速识别系统,包括以下单元:A rapid identification system for the polarity direction of electronic components, comprising the following units:
获取单元,获取包含目标电子元件的图像;Acquiring a unit to obtain an image containing the target electronic component;
计算单元,用于利用训练后的卷积神经网络对包含目标电子元件的图像数据作前向计算,获得目标电子元件的极性方向类别的分类特征,根据分类特征获取目标电子元件属于各类电子元件的各种极性方向类别的概率分布;The calculating unit is configured to perform forward calculation on the image data including the target electronic component by using the trained convolutional neural network, obtain a classification feature of the polarity direction category of the target electronic component, and acquire the target electronic component according to the classification feature to belong to various types of electronic Probability distribution of various polar direction categories of components;
选取单元,用于选取概率最大的极性方向类别作为目标电子元件的极性方向类别。The selection unit is configured to select the polarity direction category with the highest probability as the polarity direction category of the target electronic component.
根据上述快速识别系统,其是获取包括目标电子元件的图像,再利用训练后的卷积神经网络对其作前向计算,获得目标电子元件的极性方向类别的分类特征,再获取目标电子元件属于各类电子元件的各种极性方向类别的概率分布,选取其中概率最大的极性方向类别作为目标电子元件的极性方向类别。此方案中使用了卷积神经网络,通过卷积神经网络可以自动精准地识别电子元件的极性方向,而且并不针对特定的电子元件结构,适用于各种带极性的电子元件, 实现跨类别的电子元件的极性方向识别,适用性较广。According to the above fast recognition system, the image is obtained by including the target electronic component, and then subjected to the forward calculation by using the trained convolutional neural network to obtain the classification feature of the polarity direction category of the target electronic component, and then the target electronic component is obtained. The probability distribution of various polarity direction categories belonging to various electronic components is selected as the polarity direction category of the target electronic component. In this scheme, a convolutional neural network is used, which can automatically and accurately identify the polarity direction of electronic components through a convolutional neural network, and is not specific to a specific electronic component structure, and is applicable to various electronic components with polarity. It realizes the polarity direction identification of electronic components across categories and has wide applicability.
在其中一个实施例中,计算单元通过卷积层对图像数据进行卷积运算,接着通过激活函数层进行非线性变换,再通过池化层进行池化操作,然后通过全连接层获得目标电子元件的极性方向类别的分类特征,其中,卷积神经网络包括卷积模块和全连接层,卷积模块包括依次连接的卷积层、激活函数层和池化层。In one embodiment, the computing unit performs convolution operation on the image data through the convolution layer, then performs nonlinear transformation through the activation function layer, performs pooling operation through the pooling layer, and then obtains the target electronic component through the fully connected layer. The classification feature of the polarity direction category, wherein the convolutional neural network comprises a convolution module and a fully connected layer, and the convolution module comprises a convolution layer, an activation function layer and a pooling layer connected in sequence.
一种电子元件极性方向的标注系统,包括标注单元和上述电子元件极性方向的快速识别系统,其中,标注单元用于在板式文件中标注目标电子元件的极性方向信息,板式文件用于保存电子元件的各种属性信息。An annotation system for the polarity direction of an electronic component, comprising a labeling unit and a quick identification system for the polarity direction of the electronic component, wherein the labeling unit is used to mark the polarity direction information of the target electronic component in the panel file, and the panel file is used for Save various attribute information of electronic components.
上述电子元件极性方向的标注系统可以应用于AOI板式制作,自动、精准地对PCB板卡上的元件进行极性方向标注,从而提升板式制作的自动化水平,改善板式制作的效率与准确性。The above-mentioned electronic component polarity direction labeling system can be applied to AOI board production, and the polarity direction of the components on the PCB board is automatically and accurately marked, thereby improving the automation level of the panel production and improving the efficiency and accuracy of the panel production.
附图说明DRAWINGS
图1是其中一个实施例中电子元件极性方向的快速识别方法的流程示意图;1 is a schematic flow chart of a method for quickly identifying a polarity direction of an electronic component in one embodiment;
图2是其中一个实施例中卷积模块的结构示意图;2 is a schematic structural view of a convolution module in one embodiment;
图3是其中一个实施例中卷积神经网络的结构示意图;3 is a schematic structural view of a convolutional neural network in one embodiment;
图4是其中一个实施例中电子元件极性方向的快速识别系统的结构示意图;4 is a schematic structural view of a rapid identification system for the polarity direction of an electronic component in one embodiment;
图5是其中一个实施例中电子元件极性方向的快速识别系统的结构示意图;5 is a schematic structural view of a rapid identification system for the polarity direction of an electronic component in one embodiment;
图6是其中一个实施例中电子元件极性方向的快速识别系统的部分结构示意图;6 is a partial structural schematic view of a rapid identification system for the polarity direction of an electronic component in one embodiment;
图7是其中一个实施例中电子元件极性方向的快速识别系统的结构示意图;7 is a schematic structural view of a rapid identification system for the polarity direction of an electronic component in one embodiment;
图8是其中一个实施例中电子元件极性方向的快速识别系统的结构示意图;8 is a schematic structural view of a rapid identification system for the polarity direction of an electronic component in one embodiment;
图9是其中一个实施例中电子元件极性方向的标注系统的结构示意图。Figure 9 is a block diagram showing the structure of the polarity of the electronic component in one embodiment.
具体实施方式detailed description
为使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步的详细说明。应当理解,此处所描述的具体实施方式 仅仅用以解释本发明,并不限定本发明的保护范围。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein The invention is only intended to be illustrative, and does not limit the scope of the invention.
参见图1所示,为本发明的电子元件极性方向的快速识别方法实施例。如图1所示,该实施例中的电子元件极性方向的快速识别方法包括以下步骤:Referring to FIG. 1, an embodiment of a method for quickly identifying a polarity direction of an electronic component of the present invention is shown. As shown in FIG. 1, the method for quickly identifying the polarity direction of an electronic component in this embodiment includes the following steps:
步骤S101:获取包含目标电子元件的图像;Step S101: Acquire an image including the target electronic component;
在本步骤中,包含电子元件的图像可以是需要识别电子元件极性的PCB板卡图像,也可以是其他需要识别电子元件极性的图像。In this step, the image containing the electronic component may be a PCB card image that needs to identify the polarity of the electronic component, or other images that need to identify the polarity of the electronic component.
步骤S102:利用训练后的卷积神经网络对包含目标电子元件的图像数据作前向计算,获得目标电子元件的极性方向类别的分类特征,根据分类特征获取目标电子元件属于各类电子元件的各种极性方向类别的概率分布;Step S102: Perform forward calculation on the image data including the target electronic component by using the trained convolutional neural network to obtain a classification feature of the polarity direction category of the target electronic component, and obtain the target electronic component belonging to various electronic components according to the classification feature. Probability distribution of various polar direction categories;
在本步骤中,主要是利用训练后的卷积神经网络中相互连接的卷积模块和全连接层对包含目标电子元件的图像数据作前向计算,包含目标电子元件的图像数据经过卷积模块和全连接层后可以获得目标电子元件的极性方向类别的分类特征;各种极性方向类别是指各种电子元件的各种极性方向,包括了多种电子元件,获取的概率分布可以适用于各种电子元件;训练后的卷积神经网络可以对图像进行操作,对其中的目标电子元件的极性方向进行识别,获得概率分布。In this step, the image data including the target electronic component is forwardly calculated by using the convolution module and the fully connected layer in the convolutional neural network after training, and the image data including the target electronic component is passed through the convolution module. And the fully connected layer can obtain the classification characteristics of the polarity direction category of the target electronic component; the various polarity direction categories refer to various polarity directions of various electronic components, including various electronic components, and the probability distribution obtained can be obtained. Applicable to all kinds of electronic components; the trained convolutional neural network can operate on the image, identify the polarity direction of the target electronic components, and obtain the probability distribution.
步骤S103:选取概率最大的极性方向类别作为目标电子元件的极性方向类别。Step S103: Select the polarity direction category with the highest probability as the polarity direction category of the target electronic component.
上述步骤S101、S102和S103是使用训练后的卷积神经网络进行在线测试的过程。The above steps S101, S102 and S103 are processes for performing online testing using the trained convolutional neural network.
本实施方式的电子元件极性方向的快速识别方法,其是获取包括目标电子元件的图像,再利用训练后的卷积神经网络对其作前向计算,获得目标电子元件的极性方向类别的分类特征,再获取目标电子元件属于各类电子元件的各种极性方向类别的概率分布,选取其中概率最大的极性方向类别作为目标电子元件的极性方向类别。此方案中使用了卷积神经网络,通过卷积神经网络可以自动精准地识别电子元件的极性方向,而且并不针对特定的电子元件结构,适用于各种带极性的电子元件,实现跨类别的电子元件的极性方向识别,适用性较 广。The method for quickly identifying the polarity direction of an electronic component according to the present embodiment is to acquire an image including a target electronic component, and then perform forward calculation using the trained convolutional neural network to obtain a polarity direction category of the target electronic component. The classification feature is obtained, and then the probability distribution of the target electronic components belonging to various polarity direction categories of various electronic components is obtained, and the polarity direction category with the highest probability is selected as the polarity direction category of the target electronic component. In this scheme, a convolutional neural network is used. The convolutional neural network can automatically and accurately identify the polarity direction of electronic components, and it is not specific to the structure of electronic components. It is applicable to various electronic components with polarity to achieve cross- Polarity identification of electronic components of the category, applicability wide.
在其中一个实施例中,利用训练后的卷积神经网络对包含目标电子元件的图像数据作前向计算,获得目标电子元件的极性方向类别的分类特征的步骤包括以下步骤:In one embodiment, the step of calculating the image data of the target electronic component by using the trained convolutional neural network to perform the forward calculation of the image data of the target electronic component includes the following steps:
通过卷积层对图像数据进行卷积运算,接着通过激活函数层进行非线性变换,再通过池化层进行池化操作,然后通过全连接层获得目标电子元件的极性方向类别的分类特征,其中,卷积神经网络包括卷积模块和全连接层,卷积模块包括依次连接的卷积层、激活函数层和池化层。The image data is convoluted by the convolution layer, then nonlinearly transformed by the activation function layer, and then pooled by the pooling layer, and then the classification feature of the polarity direction category of the target electronic component is obtained through the fully connected layer. The convolutional neural network includes a convolution module and a fully connected layer, and the convolution module includes a convolution layer, an activation function layer, and a pooling layer that are sequentially connected.
在本实施例中,通过卷积模块中依次连接的卷积层、激活函数层和池化层以及与卷积模块连接的全连接层可以获得较好的分类特征。In this embodiment, better classification features can be obtained by convolution layers, activation function layers and pooling layers sequentially connected in the convolution module, and fully connected layers connected to the convolution module.
优选的,激活函数层可以为ReLU函数层。Preferably, the activation function layer may be a ReLU function layer.
如图2所示,卷积模块包括依次连接的卷积层、ReLU函数层和池化层,通过卷积层对目标电子元件的图像数据进行卷积运算,接着通过ReLU函数层进行非线性变换,再通过池化层进行池化操作,然后通过全连接层获得目标电子元件的极性方向类别的分类特征。As shown in FIG. 2, the convolution module includes a convolution layer, a ReLU function layer, and a pooling layer that are sequentially connected, and convolves the image data of the target electronic component through the convolution layer, and then performs nonlinear transformation through the ReLU function layer. Then, the pooling operation is performed through the pooling layer, and then the classification feature of the polarity direction category of the target electronic component is obtained through the fully connected layer.
卷积神经网络的卷积模块中的ReLU函数是一种激活函数,可以用于非线性变换;池化层用于进行池化操作,可以对图像样本的不同位置的特征进行聚合统计,而且不会使最后的结果出现过拟合的问题。The ReLU function in the convolutional module of the convolutional neural network is an activation function that can be used for nonlinear transformation; the pooling layer is used for pooling operations, and can aggregate statistics on features of different positions of image samples, and This will cause the final result to be over-fitting.
卷积神经网络的表达能力非常强,可有效解决在多分类任务中的精度不高问题,即便在跨类别的电子元件极性方向识别任务中,亦可达到非常高的准确率。The convolutional neural network has a very strong expression ability, which can effectively solve the problem of low precision in multi-classification tasks. Even in the cross-class electronic component polarity direction recognition task, a very high accuracy can be achieved.
在其中一个实施例中,训练后的卷积神经网络通过以下步骤获得:In one of the embodiments, the trained convolutional neural network is obtained by the following steps:
建立各类电子元件的各种极性方向的图像样本集;Establishing image sample sets of various polarity directions of various electronic components;
利用卷积神经网络中相互连接的卷积模块和全连接层对图像样本集的各图像样本数据分别进行前向计算,获得各类电子元件的各种极性方向类别的分类特征,根据各分类特征训练卷积神经网络,使卷积神经网络识别各类电子元件的各种极性方向。Using the convolution module and the fully connected layer in the convolutional neural network to perform forward calculation on each image sample data of the image sample set, and obtain classification features of various polarity direction categories of various electronic components, according to each classification The feature training convolutional neural network enables the convolutional neural network to identify various polar directions of various electronic components.
在训练卷积神经网络时使用外部数据集可以加强卷积神经网络的识别,但 对硬件计算能力要求较高,通常需要中高端GPU才能满足实际的计算速度需求,因此提高了硬件成本。本发明技术方案不必使用外部数据集对卷积神经网络进行训练,可在低成本的硬件配置下,精准快速地对电子元件进行自动极性方向判断,适用于各类电子元件(如电容、插座、电阻等)。该方案主要特点是不依赖于特殊硬件机构,成本较低,大大降低了算法对硬件计算能力和存储空间的要求,解决了高精度技术方案成本较高的问题。The use of external data sets to train convolutional neural networks can enhance the identification of convolutional neural networks, but High hardware computing power requirements, usually require high-end GPUs to meet the actual computing speed requirements, thus increasing hardware costs. The technical solution of the invention does not need to use the external data set to train the convolutional neural network, and can accurately and quickly determine the automatic polarity direction of the electronic component under the low-cost hardware configuration, and is suitable for various electronic components (such as capacitors and sockets). , resistance, etc.). The main feature of the scheme is that it does not depend on special hardware mechanisms, and the cost is low, which greatly reduces the requirements of the algorithm for hardware computing power and storage space, and solves the problem of high cost of high-precision technical solutions.
目前,现有的电子元件极性方向的识别方法往往利用的是电子元件的颜色信息等低层图像特征,这种传统方法对于许多应用场景都过于简单,鲁棒性较低,适用范围也受限,效果较差;而本方案中使用卷积神经网络学习多层特征表示方式(包括低层、中层、高层图像特征,而不仅仅是低层图像特征),并综合这样的多层特征去识别电子元件极性方向,从而大大提升识别精度,也扩展了适用范围。At present, existing methods for identifying the polarity direction of electronic components often utilize low-level image features such as color information of electronic components. This conventional method is too simple for many application scenarios, has low robustness, and is limited in scope of application. The effect is poor; in this scheme, the convolutional neural network is used to learn multi-layer feature representation (including low-level, middle-level, high-level image features, not just low-level image features), and such multi-layer features are combined to identify electronic components. The polarity direction greatly enhances the recognition accuracy and extends the scope of application.
通过本步骤,可以根据各类电子元件的各种极性方向的图像样本集对卷积神经网络进行离线训练,使卷积神经网络能够识别图像中电子元件的极性方向信息,从而可以在在线测试中使用该训练后的卷积神经网络对目标电子元件的极性方向进行识别。Through this step, the convolutional neural network can be offlinely trained according to the image sample sets of various polarity directions of various electronic components, so that the convolutional neural network can recognize the polarity direction information of the electronic components in the image, thereby being online The trained convolutional neural network is used in the test to identify the polarity direction of the target electronic component.
在其中一个实施例中,建立各类电子元件的各种极性方向的样本集的步骤包括以下步骤:In one of the embodiments, the step of establishing a sample set of various polarity directions of various types of electronic components includes the following steps:
获取PCB板卡图像和PCB模板图,并以PCB模板图为参考,对PCB板卡图像进行位置配准;Obtaining the PCB board image and the PCB template map, and using the PCB template map as a reference to position the PCB board image;
截取位置配准后PCB板卡图像上的各类电子元件图像,以PCB模板图中的各类电子元件对各类电子元件图像中相应的电子元件进行匹配,获得各类电子元件图像中相应电子元件的精确位置,根据相应电子元件的精确位置对相应电子元件进行调整,使相应电子元件位于各类电子元件图像的中心,获得各类电子元件的各种极性方向的图像样本集。Intercepting the image of various electronic components on the PCB board image after registration, and matching the corresponding electronic components in the image of various electronic components with various electronic components in the PCB template image, and obtaining corresponding electrons in the image of various electronic components. The precise position of the components, the corresponding electronic components are adjusted according to the precise position of the corresponding electronic components, so that the corresponding electronic components are located at the center of the image of various electronic components, and image sample sets of various polar directions of various electronic components are obtained.
通过上述方式获取的图像样本集均是直接从PCB板卡图像上截取的,都是实际电子元件的图像,更具有指导性。The image sample sets obtained by the above methods are directly taken from the PCB card image, and are images of actual electronic components, which are more instructive.
优选的,可以在PCB板卡生产线上架设摄像头,并批量采集不同型号的PCB 板卡图像,并以板卡跟踪技术避免重复拍摄某一张PCB板卡,这样每种型号的PCB板卡均包含多个图像样本,每个图像样本对应某一型号的某张PCB板卡;在采集PCB板卡图像时需要保存相应的PCB模板图;Preferably, the camera can be set up on the PCB board production line, and different types of PCBs can be collected in batches. Card image, and board tracking technology to avoid repeating a certain PCB board, so each type of PCB board contains multiple image samples, each image sample corresponds to a certain type of PCB board; The corresponding PCB template map needs to be saved when collecting the PCB board image;
多个图像样本中的PCB板卡图像位置可能偏移,需要以相应型号的PCB模板图作为参考,对每个图像样本进行图像配准,并利用该型号PCB板卡的电子元件位置信息(来自板式文件或人工标注)自动截取电子元件图片,并根据电子元件类别信息(来自板式文件或人工标注)对电子元件图片进行自动标注;The position of the PCB card image in multiple image samples may be offset. It is necessary to use the corresponding template PCB template map as a reference, perform image registration for each image sample, and use the electronic component position information of the model PCB card (from The panel file or manual labeling automatically intercepts the electronic component image and automatically labels the electronic component image according to the electronic component category information (from the panel file or manual labeling);
以PCB模板图中的电子元件匹配进一步求得图像样本中电子元件的精确位置,对电子元件图像进行对齐调整,以保证电子元件位于图像中心位置,获得电子元件的各种极性方向的图像样本集。The precise position of the electronic components in the image sample is further obtained by matching the electronic components in the PCB template image, and the electronic component images are aligned and adjusted to ensure that the electronic components are located at the center of the image, and image samples of various polar directions of the electronic components are obtained. set.
在其中一个实施例中,如图3所示,卷积模块为5个,其中,5个卷积层的卷积核数目分别为24,64,96,96和64,5个卷积层的卷积核大小分别为7×7,5×5,3×3,3×3,3×3,5个卷积层的步长均为1;全连接层为2个,其中,2个全连接层的隐节点数分别为512和4。In one embodiment, as shown in FIG. 3, there are five convolutional modules, wherein the number of convolution kernels of the five convolutional layers is 24, 64, 96, 96, and 64, respectively, and 5 convolutional layers. The size of the convolution kernel is 7×7, 5×5, 3×3, 3×3, 3×3, and the steps of the five convolution layers are all 1; the total connection layer is 2, of which 2 are all The number of hidden nodes in the connection layer is 512 and 4, respectively.
用本实施例中的卷积神经网络可以较好地实现电子元件极性方向的快速识别。With the convolutional neural network in this embodiment, the rapid identification of the polarity direction of the electronic component can be better achieved.
在其中一个实施例中,在获取包含目标电子元件的图像的步骤之后,包括以下步骤:In one of the embodiments, after the step of acquiring the image containing the target electronic component, the following steps are included:
获取目标电子元件的模板图,以目标电子元件的模板图对图像中的目标电子元件进行匹配,获得图像中的目标电子元件的精确位置,根据精确位置对图像中的目标电子元件进行调整,使目标电子元件位于图像的中心,调整后的图像供训练后的卷积神经网络作前向计算。Obtaining a template image of the target electronic component, matching the target electronic component in the image with a template image of the target electronic component, obtaining an accurate position of the target electronic component in the image, and adjusting the target electronic component in the image according to the precise position, so that The target electronic component is located at the center of the image, and the adjusted image is used for forward calculation by the trained convolutional neural network.
用目标电子元件的模板图对图像中的目标电子元件进行调整,使得训练后的卷积神经网络更加容易识别目标电子元件。The target electronic components in the image are adjusted by the template image of the target electronic component, so that the trained convolutional neural network can more easily identify the target electronic component.
在其中一个实施例中,在选取概率最大的极性方向类别作为电子元件的极性方向类别的步骤之后,还包括以下步骤:In one of the embodiments, after the step of selecting the polarity direction category having the highest probability as the polarity direction category of the electronic component, the following steps are further included:
若选取的概率最大的极性方向类别与预设的电子元件极性方向类别不同,则给出错误报警信息。 If the polarity direction category with the highest probability of selection is different from the preset polarity direction category of the electronic component, an error alarm message is given.
上述步骤是对极性方向的检测过程,可以对电子元件是否安装正确进行判断。The above steps are a process of detecting the polarity direction, and it is possible to judge whether or not the electronic component is correctly mounted.
在其中一个实施例中,在线测试获取的包含目标电子元件的图像为PCB板卡图像,以相应的PCB模板来对照匹配,获得目标电子元件的精确位置,对图像中的目标电子元件进行对齐调整,以保证目标电子元件位于图像的中心位置。In one embodiment, the image of the target electronic component acquired by the online test is a PCB card image, and the corresponding PCB template is matched and matched to obtain the precise position of the target electronic component, and the target electronic component in the image is aligned and adjusted. To ensure that the target electronic component is at the center of the image.
在本实施例中,对照匹配时使用的是相应的PCB模板,该PCB模板可以是图像样品集中图像对应的PCB模板,也可以是与图像样品集中图像对应的PCB模板不同的PCB模板,如果是前者,在离线训练时已经保存了与图像样品集中图像对应的PCB模板,可以直接获取使用。如果是后者,在线测试时除了获取PCB板卡图像时还需要从外界获取相应的PCB模板,以实现之后的对照匹配。实施本方案可以对获取的PCB板卡图像中的所有电子元件进行极性方向的识别。In this embodiment, the corresponding PCB template is used for the matching, and the PCB template may be a PCB template corresponding to the image sample set image, or may be a PCB template different from the PCB template corresponding to the image sample set image, if In the former, the PCB template corresponding to the image sample set image has been saved during offline training, and can be directly used. In the latter case, in addition to obtaining the PCB board image, the online PCB template needs to obtain the corresponding PCB template from the outside to achieve the subsequent matching match. The implementation of the solution can identify the polarity direction of all electronic components in the acquired PCB card image.
在其中一个实施例中,建立各类电子元件的各种极性方向的样本集的步骤和在获取包含目标电子元件的图像的步骤之后均包括以下步骤:In one of the embodiments, the steps of establishing a sample set of various polarity directions of various electronic components and the step of acquiring an image containing the target electronic component include the following steps:
对调整后的图像的大小进行归一化处理。The size of the adjusted image is normalized.
在建立各类电子元件的各种极性方向的样本集的步骤中,对调整后的图像的大小进行归一化处理,可便于对卷积神经网络的训练,使卷积神经网络对图像样本的多层特征的学习更为准确。In the step of establishing a sample set of various polarity directions of various electronic components, normalizing the size of the adjusted image may facilitate training of the convolutional neural network to make the convolutional neural network image sample The learning of multi-layer features is more accurate.
在获取包含目标电子元件的图像的步骤之后,对调整后的图像的大小进行归一化处理,可便于卷积神经网络对目标电子元件的图像的前向计算处理,加快电子元件的识别过程。After the step of acquiring the image including the target electronic component, the normalized processing of the size of the adjusted image facilitates the forward calculation processing of the image of the target electronic component by the convolutional neural network, and accelerates the recognition process of the electronic component.
本发明的电子元件极性方向的快速识别方法,使用了卷积神经网络,可以自动精准地识别电子元件的极性方向,而且并不针对特定的电子元件结构,适用于各种带极性的电子元件,只要训练卷积神经网络用的图像样本集覆盖了多个种类的电子元件,就可以实现跨类别的电子元件的极性方向识别,适用性较广。在目前主流的GPU下运行也可以对常规的PCB板卡(包含大约20-30个带极性的元件)进行实时判断,在GPU上判断一个元件的平均计算时间甚至在1毫秒之内,因此满足各种实时判断场景;无论是离线训练阶段还是在线测试阶段,均尽可能减少人工干预,并且不依赖于特殊硬件机构,成本较低;不需要 强大的计算资源,在某些场景下甚至可以在廉价的嵌入式平台运行。The method for quickly identifying the polarity direction of the electronic component of the present invention uses a convolutional neural network to automatically and accurately identify the polarity direction of the electronic component, and is not specific to a specific electronic component structure, and is applicable to various polarities. As for the electronic component, as long as the image sample set for training the convolutional neural network covers a plurality of types of electronic components, the polarity direction identification of the electronic components across the categories can be realized, and the applicability is wide. Running on the current mainstream GPU can also judge the regular PCB board (including about 20-30 components with polarity), and judge the average calculation time of a component on the GPU even within 1 millisecond. Meet a variety of real-time judgment scenarios; whether it is offline training or online testing, minimize manual intervention, and does not rely on special hardware mechanisms, the cost is lower; no need Powerful computing resources can even run on inexpensive embedded platforms in some scenarios.
本发明还提供一种电子元件极性方向的标注方法,包括以下步骤:The invention also provides a method for marking the polarity direction of an electronic component, comprising the following steps:
根据上述电子元件极性方向的快速识别方法确定的目标电子元件的极性方向,在板式文件中标注目标电子元件的极性方向信息,板式文件用于保存电子元件的各种属性信息。According to the polarity direction of the target electronic component determined by the fast identification method of the polarity direction of the electronic component, the polarity direction information of the target electronic component is marked in the panel file, and the panel file is used to store various attribute information of the electronic component.
上述电子元件极性方向的标注方法可以应用于AOI板式制作,自动、精准地对PCB板卡上的元件进行极性方向标注,从而提升板式制作的自动化水平,改善板式制作的效率与准确性。The above-mentioned method for labeling the polarity direction of the electronic component can be applied to the AOI board production, and the polarity direction of the components on the PCB board is automatically and accurately marked, thereby improving the automation level of the panel production and improving the efficiency and accuracy of the panel production.
根据上述电子元件极性方向的快速识别方法,本发明还提供一种电子元件极性方向的快速识别系统,以下就本发明的电子元件极性方向的快速识别系统的实施例进行详细说明。According to the above-described rapid identification method for the polarity direction of the electronic component, the present invention also provides a rapid identification system for the polarity direction of the electronic component. Hereinafter, an embodiment of the rapid identification system for the polarity direction of the electronic component of the present invention will be described in detail.
参见图4所示,为本发明的电子元件极性方向的快速识别系统的实施例。该实施例中的电子元件极性方向的快速识别系统,包括图4中的获取单元210、计算单元220和选取单元230;Referring to Fig. 4, there is shown an embodiment of a rapid identification system for the polarity direction of an electronic component of the present invention. The fast identification system of the polarity direction of the electronic component in this embodiment includes the acquisition unit 210, the calculation unit 220 and the selection unit 230 in FIG. 4;
获取单元210,用于获取包含目标电子元件的图像;An acquiring unit 210, configured to acquire an image that includes the target electronic component;
计算单元220,用于利用训练后的卷积神经网络对包含目标电子元件的图像数据作前向计算,获得目标电子元件的极性方向类别的分类特征,根据分类特征获取目标电子元件属于各类电子元件的各种极性方向类别的概率分布;The calculating unit 220 is configured to perform forward calculation on the image data including the target electronic component by using the trained convolutional neural network, obtain a classification feature of the polarity direction category of the target electronic component, and obtain the target electronic component according to the classification feature. Probability distribution of various polar direction categories of electronic components;
选取单元230,用于选取概率最大的极性方向类别作为目标电子元件的极性方向类别。The selecting unit 230 is configured to select a polarity direction category with the highest probability as the polarity direction category of the target electronic component.
根据上述快速识别系统,其是获取包括目标电子元件的图像,再利用训练后的卷积神经网络对其作前向计算,获得目标电子元件的极性方向类别的分类特征,再获取目标电子元件属于各类电子元件的各种极性方向类别的概率分布,选取其中概率最大的极性方向类别作为目标电子元件的极性方向类别。此方案中使用了卷积神经网络,通过卷积神经网络可以自动精准地识别电子元件的极 性方向,而且并不针对特定的电子元件结构,适用于各种带极性的电子元件,实现跨类别的电子元件的极性方向识别,适用性较广。According to the above fast recognition system, the image is obtained by including the target electronic component, and then subjected to the forward calculation by using the trained convolutional neural network to obtain the classification feature of the polarity direction category of the target electronic component, and then the target electronic component is obtained. The probability distribution of various polarity direction categories belonging to various electronic components is selected as the polarity direction category of the target electronic component. This scheme uses a convolutional neural network to automatically and accurately identify the poles of electronic components through convolutional neural networks. Sexual orientation, and is not specific to the structure of electronic components. It is applicable to various electronic components with polarity, and realizes the polarity direction identification of electronic components across categories, and has wide applicability.
在其中一个实施例中,计算单元220通过卷积层对图像数据进行卷积运算,接着通过激活函数层进行非线性变换,再通过池化层进行池化操作,然后通过全连接层获得目标电子元件的极性方向类别的分类特征,其中,卷积神经网络包括卷积模块和全连接层,卷积模块包括依次连接的卷积层、激活函数层和池化层。In one embodiment, the calculation unit 220 performs convolution operation on the image data through the convolution layer, then performs nonlinear transformation through the activation function layer, performs pooling operation through the pooling layer, and then obtains target electrons through the fully connected layer. A classification feature of a polarity direction category of the component, wherein the convolutional neural network includes a convolution module and a fully connected layer, and the convolution module includes a convolution layer, an activation function layer, and a pooling layer that are sequentially connected.
在其中一个实施例中,如图5所示,电子元件极性方向的快速识别系统还包括建立单元240和训练单元250;In one embodiment, as shown in FIG. 5, the rapid identification system of the polarity direction of the electronic component further includes an establishing unit 240 and a training unit 250;
建立单元240用于建立各类电子元件的各种极性方向的图像样本集;The establishing unit 240 is configured to establish an image sample set of various polarity directions of various electronic components;
训练单元250用于利用卷积神经网络中相互连接的卷积模块和全连接层对图像样本集的各图像样本数据分别进行前向计算,获得各类电子元件的各种极性方向类别的分类特征,根据各分类特征训练卷积神经网络,使卷积神经网络识别各类电子元件的各种极性方向。The training unit 250 is configured to perform forward calculation on each image sample data of the image sample set by using the convolution module and the fully connected layer in the convolutional neural network, and obtain classifications of various polarity direction categories of various electronic components. The feature trains the convolutional neural network according to each classification feature, so that the convolutional neural network can recognize various polar directions of various electronic components.
在其中一个实施例中,如图6所示,建立单元240包括配准单元241、截取处理单元242;In one embodiment, as shown in FIG. 6, the establishing unit 240 includes a registration unit 241 and an intercept processing unit 242;
配准单元241用于获取PCB板卡图像和PCB模板图,并以PCB模板图为参考,对PCB板卡图像进行位置配准;The registration unit 241 is configured to acquire a PCB card image and a PCB template image, and perform position registration on the PCB card image by using the PCB template image as a reference;
截取处理单元242用于截取位置配准后PCB板卡图像上的电子元件图像,以PCB模板图中的各类电子元件对各类电子元件图像中相应的电子元件进行匹配,获得各类电子元件图像中相应电子元件的精确位置,根据相应电子元件的精确位置对相应电子元件进行调整,使相应电子元件位于各类电子元件图像的中心,获得各类电子元件的各种极性方向的图像样本集。The intercepting processing unit 242 is configured to intercept the electronic component image on the PCB card image after the position registration, and match various electronic components in the electronic component images by various electronic components in the PCB template image to obtain various electronic components. The precise position of the corresponding electronic components in the image, the corresponding electronic components are adjusted according to the precise position of the corresponding electronic components, so that the corresponding electronic components are located at the center of the image of various electronic components, and image samples of various polar directions of various electronic components are obtained. set.
在其中一个实施例中,卷积模块为5个,其中,5个卷积层的卷积核数目分别为24,64,96,96和64,5个卷积层的卷积核大小分别为7×7,5×5,3×3,3×3,3×3,5个卷积层的步长均为1;全连接层为2个,其中,2个全连接层的隐节点数分别为512和4。In one embodiment, there are five convolutional modules, wherein the number of convolution kernels of the five convolutional layers is 24, 64, 96, 96, and 64, respectively, and the convolution kernel sizes of the five convolutional layers are respectively 7×7, 5×5, 3×3, 3×3, 3×3, the steps of the five convolutional layers are all 1; the total connection layer is 2, wherein the number of hidden nodes of the 2 fully connected layers They are 512 and 4 respectively.
在其中一个实施例中,如图7所示,电子元件极性方向的快速识别系统还 包括预处理单元260;In one embodiment, as shown in FIG. 7, the rapid identification system of the polarity direction of the electronic component is further Include a pre-processing unit 260;
预处理单元260用于在获取单元获取包含目标电子元件的图像后,以目标电子元件的模板图对图像中的目标电子元件进行匹配,获得图像中的目标电子元件的精确位置,根据精确位置对图像中的目标电子元件进行调整,使图像中的目标电子元件位于图像的中心,调整后的图像供训练后的卷积神经网络作前向计算。The pre-processing unit 260 is configured to match the target electronic component in the image with the template image of the target electronic component after acquiring the image of the target electronic component, to obtain the precise position of the target electronic component in the image, according to the precise position The target electronic components in the image are adjusted such that the target electronic components in the image are located at the center of the image, and the adjusted images are used for forward calculation by the trained convolutional neural network.
在其中一个实施例中,如图8所示,电子元件极性方向的快速识别系统还包括报警单元270,用于若选取的概率最大的极性方向类别与预设的电子元件极性方向类别不同,则给出错误报警信息。In one embodiment, as shown in FIG. 8, the fast identification system of the polarity direction of the electronic component further includes an alarm unit 270 for selecting the polarity direction category with the highest probability and the preset polarity direction of the electronic component. Different, the error alarm information is given.
本发明的电子元件极性方向的快速识别系统与本发明的电子元件极性方向的快速识别方法一一对应,在上述电子元件极性方向的快速识别方法的实施例阐述的技术特征及其有益效果均适用于电子元件极性方向的快速识别系统的实施例中。The rapid identification system of the polarity direction of the electronic component of the present invention corresponds to the rapid identification method of the polarity direction of the electronic component of the present invention, and the technical features described in the embodiment of the rapid identification method of the polarity direction of the electronic component are beneficial. The effects are all applicable to embodiments of the fast identification system for the polarity direction of the electronic components.
本发明还提供一种电子元件极性方向的标注系统,如图9所示,包括标注单元300以及上述的电子元件极性方向的识别系统,标注单元300用于根据上述电子元件极性方向的快速识别系统确定的目标电子元件的极性方向,在板式文件中标注电子元件的极性方向信息,板式文件用于保存电子元件的各种属性信息。The present invention also provides an annotation system for the polarity direction of an electronic component, as shown in FIG. 9, comprising an identification unit 300 and the above-described identification system for the polarity direction of the electronic component, and the labeling unit 300 is configured to be based on the polarity direction of the electronic component. The polar identification direction of the target electronic component determined by the system is quickly identified, the polarity direction information of the electronic component is marked in the panel file, and the panel file is used to store various attribute information of the electronic component.
上述电子元件极性方向的标注系统可以应用于AOI板式制作,自动、精准地对PCB板卡上的元件进行极性方向标注,从而提升板式制作的自动化水平,改善板式制作的效率与准确性。The above-mentioned electronic component polarity direction labeling system can be applied to AOI board production, and the polarity direction of the components on the PCB board is automatically and accurately marked, thereby improving the automation level of the panel production and improving the efficiency and accuracy of the panel production.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细, 但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。 The above described embodiments merely express several embodiments of the present invention, and the description thereof is more specific and detailed. However, it cannot be construed as limiting the scope of the invention patent. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the scope of the invention should be determined by the appended claims.

Claims (10)

  1. 一种电子元件极性方向的快速识别方法,其特征在于,包括以下步骤:A method for quickly identifying a polarity direction of an electronic component, comprising the steps of:
    获取包含目标电子元件的图像;Obtain an image containing the target electronic component;
    利用训练后的卷积神经网络对包含目标电子元件的图像数据作前向计算,获得所述目标电子元件的极性方向类别的分类特征,根据所述分类特征获取所述目标电子元件属于各类电子元件的各种极性方向类别的概率分布;Performing forward calculation on the image data including the target electronic component by using the trained convolutional neural network to obtain a classification feature of the polarity direction category of the target electronic component, and acquiring the target electronic component according to the classification feature Probability distribution of various polar direction categories of electronic components;
    选取概率最大的极性方向类别作为所述目标电子元件的极性方向类别。The polarity direction category with the highest probability is selected as the polarity direction category of the target electronic component.
  2. 根据权利要求1所述的电子元件极性方向的快速识别方法,其特征在于,所述利用训练后的卷积神经网络对包含目标电子元件的图像数据作前向计算,获得所述目标电子元件的极性方向类别的分类特征的步骤包括以下步骤:The method for quickly identifying a polarity direction of an electronic component according to claim 1, wherein said using said trained convolutional neural network performs forward calculation on image data including target electronic components to obtain said target electronic component The steps of the classification feature of the polarity direction category include the following steps:
    通过卷积层对所述图像数据进行卷积运算,接着通过激活函数层进行非线性变换,再通过池化层进行池化操作,然后通过全连接层获得所述目标电子元件的极性方向类别的分类特征,其中,所述卷积神经网络包括卷积模块和全连接层,所述卷积模块包括依次连接的所述卷积层、所述激活函数层和所述池化层。Convoluting the image data by a convolution layer, then performing nonlinear transformation through an activation function layer, performing a pooling operation through the pooling layer, and then obtaining a polarity direction category of the target electronic component through the fully connected layer The classification feature, wherein the convolutional neural network comprises a convolution module and a fully connected layer, the convolution module comprising the convolution layer, the activation function layer and the pooling layer connected in sequence.
  3. 根据权利要求1所述的电子元件极性方向的快速识别方法,其特征在于,所述训练后的卷积神经网络通过以下步骤获得:The method for quickly identifying a polarity direction of an electronic component according to claim 1, wherein the trained convolutional neural network is obtained by the following steps:
    建立各类电子元件的各种极性方向的图像样本集;Establishing image sample sets of various polarity directions of various electronic components;
    利用卷积神经网络中相互连接的卷积模块和全连接层对所述图像样本集的各图像样本数据分别进行前向计算,获得各类电子元件的各种极性方向类别的分类特征,根据各所述分类特征训练所述卷积神经网络,使所述卷积神经网络识别所述各类电子元件的各种极性方向。Performing forward calculation on each image sample data of the image sample set by using a convolution module and a fully connected layer in the convolutional neural network to obtain classification features of various polarity direction categories of various electronic components, according to Each of the classification features trains the convolutional neural network to cause the convolutional neural network to identify various polar directions of the various types of electronic components.
  4. 根据权利要求3所述的电子元件极性方向的快速识别方法,其特征在于,建立各类电子元件的各种极性方向的样本集的步骤包括以下步骤:The method for quickly identifying a polarity direction of an electronic component according to claim 3, wherein the step of establishing a sample set of various polarity directions of the various types of electronic components comprises the following steps:
    获取PCB板卡图像和PCB模板图,并以所述PCB模板图为参考,对所述PCB板卡图像进行位置配准;Obtaining a PCB card image and a PCB template image, and performing position registration on the PCB card image by using the PCB template image as a reference;
    截取位置配准后PCB板卡图像上的各类电子元件图像,以所述PCB模板图中的各类电子元件对所述各类电子元件图像中相应的电子元件进行匹配,获得 所述各类电子元件图像中相应电子元件的精确位置,根据所述相应电子元件的精确位置对所述相应电子元件进行调整,使所述相应电子元件位于各类电子元件图像的中心,获得所述各类电子元件的各种极性方向的图像样本集。Obtaining various types of electronic component images on the PCB card image after the position registration, and matching the corresponding electronic components in the image of the various types of electronic components with various electronic components in the PCB template image to obtain The precise position of the corresponding electronic component in the image of the various types of electronic components, the corresponding electronic component is adjusted according to the precise position of the corresponding electronic component, so that the corresponding electronic component is located at the center of the image of each electronic component, and obtains A collection of image samples of various polarity directions of various types of electronic components.
  5. 根据权利要求2所述的电子元件极性方向的快速识别方法,其特征在于,所述卷积模块为5个,其中,5个所述卷积层的卷积核数目分别为24,64,96,96和64,5个所述卷积层的卷积核大小分别为7×7,5×5,3×3,3×3,3×3,5个所述卷积层的步长均为1;所述全连接层为2个,其中,2个所述全连接层的隐节点数分别为512和4。The method for quickly identifying the polarity direction of an electronic component according to claim 2, wherein the number of convolution modules is five, wherein the number of convolution kernels of the five convolution layers is 24, 64, respectively. 96, 96 and 64, the convolution kernel sizes of the five convolutional layers are 7×7, 5×5, 3×3, 3×3, 3×3, and the steps of the five convolution layers are respectively All of the two are connected to each other, and the number of hidden nodes of the two fully connected layers is 512 and 4, respectively.
  6. 根据权利要求1至5中任意一项所述的电子元件极性方向的快速识别方法,其特征在于,在所述获取包含目标电子元件的图像的步骤之后,包括以下步骤:The method for quickly identifying a polarity direction of an electronic component according to any one of claims 1 to 5, characterized in that after the step of acquiring an image including the target electronic component, the following steps are included:
    获取所述目标电子元件的模板图,以所述目标电子元件的模板图对所述图像中的目标电子元件进行匹配,获得所述图像中的目标电子元件的精确位置,根据所述精确位置对所述图像中的目标电子元件进行调整,使所述图像中的目标电子元件位于所述图像的中心,调整后的图像供所述训练后的卷积神经网络作前向计算。Obtaining a template image of the target electronic component, matching a target electronic component in the image with a template image of the target electronic component, obtaining an accurate position of the target electronic component in the image, according to the precise position The target electronic component in the image is adjusted such that the target electronic component in the image is located at the center of the image, and the adjusted image is used for forward calculation by the trained convolutional neural network.
  7. 一种电子元件极性方向的标注方法,其特征在于,包括以下步骤:A method for marking a polarity direction of an electronic component, comprising the steps of:
    根据权利要求1至6中任意一项所述的电子元件极性方向的快速识别方法确定的目标电子元件的极性方向,在板式文件中标注所述目标电子元件的极性方向信息,所述板式文件用于保存电子元件的各种属性信息。The polarity direction of the target electronic component determined by the rapid identification method of the polarity direction of the electronic component according to any one of claims 1 to 6, wherein the polarity direction information of the target electronic component is marked in the panel file, A panel file is used to store various attribute information of electronic components.
  8. 一种电子元件极性方向的快速识别系统,其特征在于,包括以下单元:A rapid identification system for the polarity direction of electronic components, characterized in that it comprises the following units:
    获取单元,获取包含目标电子元件的图像;Acquiring a unit to obtain an image containing the target electronic component;
    计算单元,用于利用训练后的卷积神经网络对包含目标电子元件的图像数据作前向计算,获得所述目标电子元件的极性方向类别的分类特征,根据所述分类特征获取所述目标电子元件属于各类电子元件的各种极性方向类别的概率分布;a calculating unit, configured to perform forward calculation on the image data including the target electronic component by using the trained convolutional neural network, obtain a classification feature of the polarity direction category of the target electronic component, and acquire the target according to the classification feature Electronic components belong to the probability distribution of various polarity direction categories of various electronic components;
    选取单元,用于选取概率最大的极性方向类别作为所述目标电子元件的极性方向类别。 The selecting unit is configured to select a polarity direction category with the highest probability as the polarity direction category of the target electronic component.
  9. 根据权利要求8所述的电子元件极性方向的快速识别系统,其特征在于,A rapid identification system for polarity direction of an electronic component according to claim 8, wherein
    所述计算单元通过卷积层对所述图像数据进行卷积运算,接着通过激活函数层进行非线性变换,再通过池化层进行池化操作,然后通过全连接层获得所述目标电子元件的极性方向类别的分类特征,其中,所述卷积神经网络包括卷积模块和全连接层,所述卷积模块包括依次连接的所述卷积层、所述激活函数层和所述池化层。The calculating unit performs convolution operation on the image data through a convolution layer, then performs nonlinear transformation through an activation function layer, performs a pooling operation through the pooling layer, and then obtains the target electronic component through the fully connected layer. a classification feature of a polarity direction category, wherein the convolutional neural network comprises a convolution module and a fully connected layer, the convolution module comprising the convolution layer sequentially connected, the activation function layer, and the pooling Floor.
  10. 一种电子元件极性方向的标注系统,其特征在于,包括标注单元和如权利要求8或9所述的电子元件极性方向的快速识别系统,其中,所述标注单元用于在板式文件中标注所述目标电子元件的极性方向信息,所述板式文件用于保存电子元件的各种属性信息。 An annotation system for polarity direction of an electronic component, comprising: a labeling unit and a rapid identification system for polarity direction of an electronic component according to claim 8 or 9, wherein the labeling unit is used in a panel file Polarity direction information of the target electronic component is marked, and the panel file is used to store various attribute information of the electronic component.
PCT/CN2016/098228 2015-11-23 2016-09-06 Method and system for rapidly identifying and marking electronic component polarity direction WO2017088553A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510823564.X 2015-11-23
CN201510823564.XA CN105469400B (en) 2015-11-23 2015-11-23 The quick method and system for identifying, marking of electronic component polar orientation

Publications (1)

Publication Number Publication Date
WO2017088553A1 true WO2017088553A1 (en) 2017-06-01

Family

ID=55607059

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/098228 WO2017088553A1 (en) 2015-11-23 2016-09-06 Method and system for rapidly identifying and marking electronic component polarity direction

Country Status (2)

Country Link
CN (1) CN105469400B (en)
WO (1) WO2017088553A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112378908A (en) * 2020-11-09 2021-02-19 日立楼宇技术(广州)有限公司 Capacitor polarity installation detection device and detection method
CN114024597A (en) * 2021-11-03 2022-02-08 浙江大学湖州研究院 Laser communication coarse aiming device based on neural network pattern recognition
CN115479891A (en) * 2022-08-12 2022-12-16 深圳市共进电子股份有限公司 Automatic detection system and method for circuit board mounted components based on image recognition

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426917A (en) * 2015-11-23 2016-03-23 广州视源电子科技股份有限公司 Component classification method and apparatus
CN105469400B (en) * 2015-11-23 2019-02-26 广州视源电子科技股份有限公司 The quick method and system for identifying, marking of electronic component polar orientation
CN105821538B (en) * 2016-04-20 2018-07-17 广州视源电子科技股份有限公司 The detection method and system of spun yarn fracture
CN107305636A (en) * 2016-04-22 2017-10-31 株式会社日立制作所 Target identification method, Target Identification Unit, terminal device and target identification system
CN106530284A (en) * 2016-10-21 2017-03-22 广州视源电子科技股份有限公司 Solder joint type detection method and apparatus based on image identification
CN109429473A (en) * 2017-08-28 2019-03-05 株洲中车时代电气股份有限公司 Automatic check method and device with polarity electronic component in circuit board
CN107886131A (en) * 2017-11-24 2018-04-06 佛山科学技术学院 One kind is based on convolutional neural networks detection circuit board element polarity method and apparatus
CN108446659A (en) * 2018-03-28 2018-08-24 百度在线网络技术(北京)有限公司 Method and apparatus for detecting facial image
CN109146919B (en) * 2018-06-21 2020-08-04 全球能源互联网研究院有限公司 Tracking and aiming system and method combining image recognition and laser guidance
CN108830850B (en) * 2018-06-28 2020-10-23 信利(惠州)智能显示有限公司 Automatic optical detection picture analysis method and equipment
CN110070536B (en) * 2019-04-24 2022-08-30 南京邮电大学 Deep learning-based PCB component detection method
CN111310806B (en) * 2020-01-22 2024-03-15 北京迈格威科技有限公司 Classification network, image processing method, device, system and storage medium
CN111640088B (en) * 2020-04-22 2023-12-01 深圳拓邦股份有限公司 Electronic element polarity detection method and system based on deep learning and electronic device
CN116168040B (en) * 2023-04-26 2023-07-07 四川元智谷科技有限公司 Component direction detection method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927534A (en) * 2014-04-26 2014-07-16 无锡信捷电气股份有限公司 Sprayed character online visual detection method based on convolutional neural network
CN103984959A (en) * 2014-05-26 2014-08-13 中国科学院自动化研究所 Data-driven and task-driven image classification method
CN104850845A (en) * 2015-05-30 2015-08-19 大连理工大学 Traffic sign recognition method based on asymmetric convolution neural network
CN105469400A (en) * 2015-11-23 2016-04-06 广州视源电子科技股份有限公司 Rapid identification and marking method of electronic component polarity direction and system thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100668303B1 (en) * 2004-08-04 2007-01-12 삼성전자주식회사 Method for detecting face based on skin color and pattern matching
CN103544705B (en) * 2013-10-25 2016-03-02 华南理工大学 A kind of image quality test method based on degree of depth convolutional neural networks
CN104459421B (en) * 2014-12-30 2017-07-11 广州视源电子科技股份有限公司 A kind of diode polarity detection method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927534A (en) * 2014-04-26 2014-07-16 无锡信捷电气股份有限公司 Sprayed character online visual detection method based on convolutional neural network
CN103984959A (en) * 2014-05-26 2014-08-13 中国科学院自动化研究所 Data-driven and task-driven image classification method
CN104850845A (en) * 2015-05-30 2015-08-19 大连理工大学 Traffic sign recognition method based on asymmetric convolution neural network
CN105469400A (en) * 2015-11-23 2016-04-06 广州视源电子科技股份有限公司 Rapid identification and marking method of electronic component polarity direction and system thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112378908A (en) * 2020-11-09 2021-02-19 日立楼宇技术(广州)有限公司 Capacitor polarity installation detection device and detection method
CN114024597A (en) * 2021-11-03 2022-02-08 浙江大学湖州研究院 Laser communication coarse aiming device based on neural network pattern recognition
CN115479891A (en) * 2022-08-12 2022-12-16 深圳市共进电子股份有限公司 Automatic detection system and method for circuit board mounted components based on image recognition

Also Published As

Publication number Publication date
CN105469400A (en) 2016-04-06
CN105469400B (en) 2019-02-26

Similar Documents

Publication Publication Date Title
WO2017088553A1 (en) Method and system for rapidly identifying and marking electronic component polarity direction
WO2017088552A1 (en) Method and system for identifying electronic component polarity, and method and system for marking electronic component polarity
WO2017032311A1 (en) Detection method and apparatus
CN110070536B (en) Deep learning-based PCB component detection method
CN111179251B (en) Defect detection system and method based on twin neural network and by utilizing template comparison
CN111612763B (en) Mobile phone screen defect detection method, device and system, computer equipment and medium
WO2017088537A1 (en) Component classification method and apparatus
CN111899241B (en) Quantitative on-line detection method and system for defects of PCB (printed Circuit Board) patches in front of furnace
CN110610197A (en) Method and device for mining difficult sample and training model and electronic equipment
CN105654066A (en) Vehicle identification method and device
CN109376580B (en) Electric power tower component identification method based on deep learning
CN112766218B (en) Cross-domain pedestrian re-recognition method and device based on asymmetric combined teaching network
TW202009681A (en) Sample labeling method and device, and damage category identification method and device
CN110738164A (en) Part abnormity detection method, model training method and device
Xie et al. A method for surface defect detection of printed circuit board based on improved YOLOv4
CN114037645A (en) Coating defect detection method and device for pole piece, electronic equipment and readable medium
CN115775246A (en) Method for detecting defects of PCB (printed circuit board) components
CN115359016A (en) PCB small target defect detection method and system based on improved YOLOv5
CN111444911A (en) Training method and device of license plate recognition model and license plate recognition method and device
Cui et al. Real-time detection of wood defects based on SPP-improved YOLO algorithm
CN114387230A (en) PCB defect detection method based on re-verification detection
CN112991410A (en) Text image registration method, electronic equipment and storage medium thereof
CN113743434A (en) Training method of target detection network, image augmentation method and device
CN116580232A (en) Automatic image labeling method and system and electronic equipment
CN110335274B (en) Three-dimensional mold defect detection method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16867780

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16867780

Country of ref document: EP

Kind code of ref document: A1