WO2017032311A1 - 一种检测方法及装置 - Google Patents

一种检测方法及装置 Download PDF

Info

Publication number
WO2017032311A1
WO2017032311A1 PCT/CN2016/096551 CN2016096551W WO2017032311A1 WO 2017032311 A1 WO2017032311 A1 WO 2017032311A1 CN 2016096551 W CN2016096551 W CN 2016096551W WO 2017032311 A1 WO2017032311 A1 WO 2017032311A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
component
template
sample set
test
Prior art date
Application number
PCT/CN2016/096551
Other languages
English (en)
French (fr)
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 WO2017032311A1 publication Critical patent/WO2017032311A1/zh

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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • 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 present invention relates to the field of AOI, and in particular to a detection method and apparatus.
  • Image matching refers to the technique of judging whether two images are similar by using image features. It has been applied to various fields, such as image matching technology for component detection, face recognition, etc., but currently due to image features used for image matching. The robustness is low, and it is easy to be affected by the environment such as illumination, resulting in errors in matching and low matching accuracy.
  • PCB Printed circuit board
  • lines and connections on the PCB are more and more dense, so that it is inevitable that the missing parts will occur when soldering/hand-inserted electronic components. Therefore, it is necessary to detect whether the PCB board has missing parts after the PCB board is soldered.
  • the embodiment of the invention provides a detection method and device, which can improve the similarity detection accuracy of the image and has high reliability.
  • a first aspect of the embodiments of the present invention provides a detection method, including:
  • Whether the test image matches the template image is determined according to the similarity.
  • a second aspect of the embodiments of the present invention provides a detecting apparatus, including:
  • An image input module configured to input the template image and the test image into the trained Siamese network, and perform forward calculation to obtain the feature vector of the template image and the test image respectively;
  • a calculation module configured to calculate a similarity between the module image and a feature vector of the test image
  • a determining module configured to determine, according to the similarity, whether the test image matches the template image.
  • the template image and the test image are input into the trained Siamese network, and the feature vectors of the template image and the test image are obtained by forward calculation respectively; a similarity between the template image and a feature vector of the test image; determining whether the test image matches the template image according to the similarity. Since the Siamese network can extract the advanced features of the image, inputting the image into the trained Siamese network can accurately determine whether the template image matches the test image, and the judgment accuracy is high.
  • FIG. 1 is a network structure diagram of a Siamese network according to an embodiment of the present invention
  • FIG. 1 is a schematic flowchart of a detection method according to a first embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a detecting method according to a second embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a detecting device according to a third embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a detecting device according to a fourth embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a detecting apparatus according to a fifth embodiment of the present invention.
  • the embodiments of the present invention provide a detection method and device, which can improve the similarity detection accuracy of an image and has high reliability.
  • a detection method includes:
  • FIG. 1 is a schematic diagram of a network structure of a Siamese network according to an embodiment of the present invention
  • FIG. 1B is a schematic flowchart of a detection method according to a first embodiment of the present invention.
  • a detection method provided by the first embodiment of the present invention may include:
  • the Siamese network is a deep neural network. According to the characteristics of the Siamese network, the features of each level of the image can be calculated, including low-level features and high-level features, so that the image can be analyzed according to the high-level features of the image. More accurate results will be obtained.
  • the Siamese network is designed to contain two convolutional neural networks with the same structure and shared parameters.
  • the template image and test image of the image are input separately, so that two input images can be calculated separately.
  • the feature vector is used to calculate the similarity between the two feature vectors, so that the similarity between the two images is judged according to the value of the similarity, that is, whether the two images match.
  • the trained Siamese network has the ability to accurately match the template image and the test image due to the training of a large number of sample images.
  • the template image is a standard picture for comparison, and the test image is passed through with the template image. The line is compared to determine if it matches the template image.
  • the similarity is a parameter for determining a program similar to the template image and the test image.
  • the Euclidean distance of the feature vector may be calculated after calculating the feature vector of the module image and the test image to obtain a similarity between the template image and the feature vector of the test image.
  • the similarity is a measure of the similarity of the features of the two images input by the Siamese network, whether the template image is similar to the test image, that is, whether the template image matches the test image, can be judged by the similarity.
  • the template image and the test image are input into the trained Siamese network, and the feature vectors of the template image and the test image are obtained by forward calculation respectively; and the template image is calculated. a similarity with a feature vector of the test image; determining whether the test image matches the template image according to the similarity. Since the Siamese network can extract the advanced features of the image, inputting the image into the trained Siamese network can accurately determine whether the template image matches the test image, and the judgment accuracy is high.
  • the template image is a corresponding component image when the component exists and is in a standard position
  • the template image may be a PCB template image, so that the component image or the test image corresponding to the input image is also a PCB image, and the template image may also be an image respectively containing each independent component intercepted from the PCB image, thereby corresponding thereto.
  • the input test image is also an image containing individual components.
  • the template image generally input in the Siamese network is an image including a single component, and then input during the training phase.
  • the component image is also the component image of the position taken from the PCB image
  • the image input during the test phase is also the component image of the position intercepted from the PCB image in different cases.
  • the template image is a template image of the component
  • the template image is a component in which the component exists and the position of the component is in a correct position.
  • the image of the test the test image is based on the template image to determine whether the missing piece.
  • the Siamese network can judge whether the test image and the template image match, when the template image and the test image are component images, whether the test image of the component image matches the template image, that is, the test image is determined according to the similarity. Whether the corresponding component exists.
  • the method before the inputting the template image and the test image into the trained Siamese network, the method further includes:
  • the component image is an image taken from the template image
  • the image may not be pre-processed.
  • the method before the inputting the template image and the test image into the trained Siamese network, the method further includes:
  • the positive sample set includes a component image pair of the template image and the component image when the component is present, the negative sample set including a template image pair formed by the template image when the template image is absent, and the negative sample set further includes a component image pair composed of the template image and a component image when other components are present;
  • the Siamese network is trained with the positive sample set and the negative sample set to trigger execution of the step of inputting the template image and the test image into a trained Siamese network.
  • the positive sample set in the sample set includes the template image and the template image.
  • the component image pair formed by the component image when the component is the correct component, and the negative sample set includes the component image pair composed of the template image and the component image when the component position may not exist at each component position, and the negative sample set further includes the template image and each component A pair of component images that are formed by the component image when the components in the position are present but may be inserted with the wrong component.
  • the templates image and the test image are both images captured from the PCB image, respectively, the images of the respective independent components are included, so that the positive sample set in the sample set includes the template image.
  • a pair of component images consisting of an image containing elements in the template image, the negative sample set comprising a component image pair of the template image and an image that does not include the component, the negative sample set further comprising a template image and a component included in the template image
  • it includes a component image pair composed of component images of other error elements.
  • the positive sample set includes the template image, and samples that are present in the component and are taken under various scenes, such as a positive sample taken in poor light conditions. Images, as well as positive sample images taken from different positions or angles, or positive sample images taken in other complex scenes, using the positive sample images taken in each scene to train the Siamese network, thus making the Siamese network more recognizable The ability to correctly detect non-missing component images captured in different scenes in subsequent testing stages, improving recognition rate.
  • the Siamese network when using the Siamese network to detect missing parts of an image, it is first necessary to train the Siamese network to learn the parameters of the Siamese network, and then use the trained Siamese network to accurately detect the missing parts of the component image.
  • the Siamese network it is necessary to use the positive sample set and the negative sample set in various scenarios for training, so that the Siamese network can fully learn the picture when the component is not missing, and make the Siamese network fully learn. In the case of the picture when the component is missing, the subsequent detection of the missing part can be performed correctly.
  • the negative sample set includes the template image, and an image when the component is not present, or an element exists, but the welding position is obviously wrong, or is not The image of the correct component, etc.
  • the Siamese network can be trained by taking as many positive sample sets and negative sample sets as possible in different scenarios, so that the learning effect of the Siamese network is better, and the subsequent leak detection detection accuracy is high.
  • the positive sample set and the negative sample set of the component image include a training sample and a test sample.
  • the training sample refers to the training of the Siamese network
  • the test sample refers to the test of the effect of the trained Siamese network, which together constitute a sample of the training phase of the Siamese network.
  • the creating the component image alignment positive sample set and the negative sample set include:
  • the component image is collected as a positive sample set and a negative sample set.
  • the component image may be labeled after the component image is captured on the printed circuit board icon.
  • a camera may be installed on the production line, and different types of PCB card images may be collected in batches, and the card tracking technology may be used to avoid repeatedly shooting a certain PCB card.
  • each model of the PCB card contains a plurality of image samples, and each image sample corresponds to a certain type of PCB card, so that the component images on the acquired PCB card are also from different boards. Ensure that the sample is versatile.
  • the capturing an image of the component on the printed circuit board includes:
  • the component image is automatically captured using the positional information of the components on the printed board image.
  • the component image can be automatically intercepted according to the position information.
  • the location information of the acquiring component image may be obtained by using location information of the component recorded in the panel file or by manually labeling location information.
  • the labeling the component image includes:
  • the components may also be labeled by other means that distinguish the components.
  • the method further includes:
  • the component image is normalized to trigger the step of acquiring the component image alignment positive sample set and the negative sample set.
  • the image is aligned when the sample image of the Siamese network is acquired, so that the component is located at the center of the image, and the image is normalized. This process is called pre-processing of the image. Processing, pre-processing the image will make the Siamese network training better.
  • the component image is preprocessed when the Siamese network is trained, the component image is also required to be used for the missing component detection using the trained Siamese network.
  • Pre-processing if the Siamese network is trained without pre-processing the component image, the component image is not pre-processed during the missing component detection using the trained Siamese network.
  • determining, according to the similarity, whether an element corresponding to the test image exists includes:
  • the similarity is used to represent the degree of similarity between the template image and the test image, when the similarity is within the preset range, the template image is similar to the test image, then the component image exists, that is, the component is not Missing parts, otherwise, components leak.
  • the component when the similarity is greater than or equal to a preset value, the component exists, that is, the component does not leak; when the similarity is less than a preset value, Then the component does not exist.
  • FIG. 2 is a schematic flowchart of a detecting method according to a second embodiment of the present invention.
  • a detecting method according to a second embodiment of the present invention may include:
  • the Siamese network refers to a deep neural network. According to the characteristics of the Siamese network, the characteristics of each level of the component, including the low-level features and the high-level features, can be calculated, so that the image will be more accurately analyzed according to the high-level features of the image. the result of.
  • the Siamese network is designed to contain two convolutional neural networks with the same structure and shared parameters. When using the Siamese network for the detection of missing parts, the template image and the component image of the image are input separately, so that they can be separately calculated.
  • the feature vectors of the two input images are calculated, and then the similarity between the two feature vectors is calculated, thereby determining whether it is a type of component according to the value of the similarity to judge whether or not the component is missing.
  • the Siamese network needs to be trained to obtain the parameters of the Siamese network.
  • the samples of the images collected under various conditions are utilized, so that the image missing parts and the existence of the images in different situations can be trained.
  • the components are detected.
  • the two convolutional neural networks input different images during the training phase and the test phase.
  • one of the input template maps and the other input The component image, in the test phase, one of the input template maps, and the other one enters the test image. Moreover, in the training phase, the feature vectors of the two images are obtained by forward calculation, and the Euclidean distances of the two feature vectors are calculated to obtain the similarity.
  • the template map is a standard picture for comparison.
  • the template image may be a PCB template image, so that the component image or the test image corresponding to the input image is also a PCB image, and the template image may also be an image respectively containing the individual components intercepted from the PCB image, so as to correspond to the input.
  • the image is also an image containing individual elements.
  • the template image generally input in the Siamese network is an image including a single component, and then input during the training phase.
  • the component image is also the component image of the position taken from the PCB image
  • the image input during the test phase is also the component image of the position intercepted from the PCB image in different cases.
  • PCB image needs to be collected first to intercept the component image samples.
  • a camera may be installed on the production line, and different types of PCB card images may be collected in batches, and the card tracking technology may be used to avoid repeatedly shooting a certain PCB card.
  • each type of PCB board contains multiple image samples, and each image sample corresponds to a certain type of PCB board, so that the component images on the obtained PCB board are also different. On the board, the sample is guaranteed to be versatile.
  • the capturing an image of the component on the printed circuit board includes:
  • the component image is automatically captured using the positional information of the components on the printed board image.
  • the component image can be automatically intercepted according to the position information.
  • the location information of the acquiring component image may be obtained by using location information of the component recorded in the panel file or by manually labeling location information.
  • the labeling the component image includes:
  • the components may also be labeled by other means that distinguish the components.
  • the acquisition component image is aligned with the positive sample set and the negative sample set.
  • the positive sample set includes a component image pair composed of the template image and the component image when the component is present
  • the negative sample set includes the template image and the component when the component does not exist
  • a component image pair formed by an image the negative sample set further including a component image pair composed of the template image and a component image when other components are present.
  • the positive sample set in the sample set includes the template image and the template image.
  • the correct image of the component image when the component is the correct component negative sample
  • the set includes a component image pair composed of a template image and an image of the component when the component may not exist at each component position, and the negative sample set further includes a component when the template image and the component at each component position are present, but the wrong component may be inserted.
  • a component image pair composed of images.
  • the templates image and the test image are both images captured from the PCB image, respectively, the images of the respective independent components are included, so that the positive sample set in the sample set includes the template image.
  • a pair of component images consisting of an image containing elements in the template image, the negative sample set comprising a component image pair of the template image and an image that does not include the component, the negative sample set further comprising a template image and a component included in the template image
  • it includes a component image pair composed of component images of other error elements.
  • the positive sample set includes the template image, and samples that are present in the component and are taken under various scenes, such as a positive sample taken in poor light conditions. Images, as well as positive sample images taken from different positions or angles, or positive sample images taken in other complex scenes, using the positive sample images taken in each scene to train the Siamese network, thus making the Siamese network more recognizable The ability to correctly detect non-missing component images captured in different scenes in subsequent testing stages, improving recognition rate.
  • the Siamese network when using the Siamese network to detect missing parts of an image, it is first necessary to train the Siamese network to learn the parameters of the Siamese network, and then use the trained Siamese network to accurately detect the missing parts of the component image.
  • the Siamese network it is necessary to use the positive sample set and the negative sample set in various scenarios for training, so that the Siamese network can fully learn the picture when the component is not missing, and make the Siamese network fully learn. In the case of the picture when the component is missing, the subsequent detection of the missing part can be performed correctly.
  • the negative sample set includes the template image, and an image when the component is not present, or an element exists, but the welding position is obviously wrong, or is not The image of the correct component, etc.
  • the Siamese network can be trained by taking as many positive sample sets and negative sample sets as possible in different scenarios, so that the learning effect of the Siamese network is better, and the subsequent leak detection detection accuracy is high.
  • the positive sample set and the negative sample set of the component image include a training sample and a test sample.
  • the training sample refers to training the Siamese network
  • the test sample means that the test is trained.
  • the effect of the post-Siamese network, together with the two constitutes a sample of the training phase of the Siamese network.
  • the method before the collecting the component image alignment positive sample set and the negative sample set, the method further includes:
  • the component images are normalized.
  • the component image is an image taken from the template image
  • the image may not be pre-processed.
  • the Siamese network needs to be trained by using a positive sample set and a negative sample set, so that the Siamese network has a leak detection capability.
  • S205 Input the template image and the test image into the trained Siamese network, and perform forward calculation to obtain the feature vector of the template image and the test image respectively.
  • the template image is a component image corresponding to an element that exists in a standard position
  • the test image is a component image that needs to be tested.
  • the similarity is a measure of the similarity between the template image input by the Siamese network and the characteristics of the test image, and the similarity is a template image and a high-level feature of the test image learned by the Siamese network to determine whether the template image is similar to the test image.
  • the value of the degree is a measure of the similarity between the template image input by the Siamese network and the characteristics of the test image, and the similarity is a template image and a high-level feature of the test image learned by the Siamese network to determine whether the template image is similar to the test image.
  • the method before the inputting the template image and the test image into the trained Siamese network, the method further includes:
  • the template image and the test image are normalized.
  • the component image is an image taken from the template image
  • the process is called pre Processing.
  • the image may not be pre-processed.
  • the component image is preprocessed when the Siamese network is trained, the component image is also required to be used for the missing component detection using the trained Siamese network.
  • Pre-processing if the Siamese network is trained without pre-processing the component image, the component image is not pre-processed during the missing component detection using the trained Siamese network.
  • the similarity is a value that uses the template image and the advanced feature of the test image learned by the Siamese network to determine whether the template image is similar to the test image
  • the similarity can be used to determine whether the component is similar to the test image. That is, it is determined whether the component corresponding to the test image exists, that is, whether the component is missing or not.
  • determining, according to the similarity, whether an element corresponding to the test image exists includes:
  • the similarity is used to represent the degree of similarity between the template image and the test image, when the similarity is within the preset range, the template image is similar to the test image, then the component image exists, that is, the component is not Missing parts, otherwise, components leak.
  • the component when the similarity is greater than or equal to a preset value, the component exists, that is, the component does not leak; when the similarity is less than a preset value, Then the component does not exist.
  • the template image and the test image are input into the trained Siamese network, and the feature vectors of the template image and the test image are obtained by forward calculation respectively, and finally Calculating a similarity of two feature vectors, wherein the template image is a component image corresponding to an element that exists in a standard position, the test image is a component image that needs to be tested; and the test image is determined according to the similarity Whether the corresponding component exists. Since the Siamese network can extract the advanced features of the image, the image input into the trained Siamese network can accurately determine whether the component image is missing or not, and the recognition accuracy is high.
  • the embodiment of the invention further provides a component detecting device, the device comprising:
  • An image input module configured to input the template image and the test image into the trained Siamese network, and perform forward calculation to obtain a feature vector of the template image and the test image, wherein the template image is a component and a corresponding component image when in a standard position, the test image being a component image to be tested;
  • a calculation module configured to calculate a similarity between the module image and a feature vector of the test image
  • a determining module configured to determine, according to the similarity, whether an element corresponding to the test image exists.
  • FIG. 3 is a schematic structural diagram of a detecting apparatus according to a third embodiment of the present invention.
  • a detecting apparatus 300 according to a third embodiment of the present invention may include :
  • the image input module 310 the calculation module 320, and the determination module 330.
  • the image input module 310 is configured to input the template image and the test image into the trained Siamese network, and perform forward calculation to obtain feature vectors of the template image and the test image, respectively.
  • the Siamese network is a deep neural network. According to the characteristics of the Siamese network, the features of each level of the image can be calculated, including low-level features and high-level features, so that the image can be analyzed according to the high-level features of the image. More accurate results will be obtained.
  • the Siamese network is designed to contain two convolutional neural networks with the same structure and shared parameters.
  • the template image and test image of the image are input separately, so that two input images can be calculated separately.
  • the feature vector is used to calculate the similarity between the two feature vectors, so that the similarity between the two images is judged according to the value of the similarity, that is, whether the two images match.
  • the trained Siamese network has the ability to accurately match the template image and the test image due to the training of a large number of sample images.
  • the template image is a standard picture for comparison, and the test image is compared with the template image to determine whether it matches the template image.
  • the calculating module 320 is configured to calculate a similarity between the template image and a feature vector of the test image.
  • the similarity is a parameter for determining a program similar to the template image and the test image.
  • the determining module 330 is configured to determine, according to the similarity, whether the test image matches the template image.
  • the similarity is a measure of the similarity of the features of the two images input by the Siamese network
  • whether the template image is similar to the test image that is, whether the template image matches the test image, can be judged by the similarity.
  • the functions of the functional modules of the detecting apparatus 300 of the present embodiment may be specifically implemented according to the method in the foregoing method embodiments. For the specific implementation process, refer to the related description of the foregoing method embodiments, and details are not described herein again.
  • the detecting device 300 inputs the template image and the test image into the trained Siamese network, and performs forward calculation to obtain the feature vector of the template image and the test image, respectively; 300 calculating a similarity between the template image and a feature vector of the test image; the detecting device 300 determines whether the test image matches the template image according to the similarity. Since the Siamese network can extract the advanced features of the image, inputting the image into the trained Siamese network can accurately determine whether the template image matches the test image, and the judgment accuracy is high.
  • FIG. 4 is a schematic structural diagram of a detecting apparatus according to a fourth embodiment of the present invention.
  • a detecting apparatus 400 according to a fourth embodiment of the present invention may include:
  • the image input module 410 the calculation module 420, and the determination module 430.
  • the image input module 410 is configured to input the template image and the test image into the trained Siamese network, and perform forward calculation to obtain feature vectors of the template image and the test image, respectively.
  • the Siamese network is a deep neural network. According to the characteristics of the Siamese network, the features of each level of the image can be calculated, including low-level features and high-level features, so that the image can be analyzed according to the high-level features of the image. More accurate results will be obtained.
  • the Siamese network is designed to contain two convolutional neural networks with the same structure and shared parameters.
  • the template image and test image of the image are input separately, so that two input images can be calculated separately.
  • the feature vector is used to calculate the similarity between the two feature vectors, so that the similarity between the two images is judged according to the value of the similarity, that is, whether the two images match.
  • the trained Siamese network has the ability to accurately match the template image and the test image due to the training of a large number of sample images.
  • the template image is a standard picture for comparison, and the test image is passed through with the template image. The line is compared to determine if it matches the template image.
  • the calculating module 420 is configured to calculate a similarity between the template image and a feature vector of the test image.
  • the similarity is a parameter for determining a program similar to the template image and the test image.
  • the Euclidean distance of the feature vector may be calculated after calculating the feature vector of the module image and the test image to obtain a similarity between the template image and the feature vector of the test image.
  • the determining module 430 is configured to determine, according to the similarity, whether the test image matches the template image.
  • the similarity is a measure of the similarity of the features of the two images input by the Siamese network, whether the template image is similar to the test image, that is, whether the template image matches the test image, can be judged by the similarity.
  • the template image is a corresponding component image when the component exists and is in a standard position
  • the test image is a component image that needs to be tested
  • the determining module 430 is specifically Used for:
  • the template image may be a PCB template image, so that the component image or the test image corresponding to the input image is also a PCB image, and the template image may also be an image respectively containing each independent component intercepted from the PCB image, thereby corresponding thereto.
  • the input test image is also an image containing individual components.
  • the template image generally input in the Siamese network is an image including a single component, and then input during the training phase.
  • the component image is also the component image of the position taken from the PCB image
  • the image input during the test phase is also the component image of the position intercepted from the PCB image in different cases.
  • the template image is a template image of the component
  • the template image is a component image in which the component exists and the position of the component is in a correct position
  • the test image is based on the template. The image judges whether or not something is missing.
  • the Siamese network can judge whether the test image and the template image match, when the template image and the test image are component images, whether the test image of the component image matches the template image, that is, the test image is determined according to the similarity. Whether the corresponding component exists.
  • the component detecting apparatus 400 further includes:
  • a pre-processing module 440 configured to obtain, by template matching, a position of the template image and an element in the test image, and align the template image with the test image;
  • the component image is an image taken from the template image
  • the image may not be pre-processed.
  • the component detecting apparatus 400 further includes:
  • a sample creation module 450 configured to create the component image alignment sample set and the negative sample set, wherein the positive sample set includes a component image pair formed by the template image and the component image when the component exists,
  • the negative sample set includes a component image pair composed of the template image and the component image when the component is not present, and the negative sample set further includes a component composed of the template image and a component image when other components exist Image pair
  • the training module 460 is configured to train the Siamese network by using the positive sample set and the negative sample set to trigger the image input module to perform the input of the template image and the test image into the trained Siamese The steps of the network.
  • the positive sample set in the sample set includes the template image and the template image.
  • the component image pair formed by the component image when the component is the correct component, and the negative sample set includes the component image pair composed of the template image and the component image when the component position may not exist at each component position, and the negative sample set further includes the template image and each component A pair of component images that are formed by the component image when the components in the position are present but may be inserted with the wrong component.
  • the images of the respective independent components are included, so that the positive sample set in the sample set includes the template image.
  • the negative sample set includes a component image pair composed of a template image and an image that does not include an element, and the negative sample set further includes a template image pair and a component image pair including a component image that is not an element in the template image but includes other error elements.
  • the positive sample set includes the template image, and samples that are present in the component and are taken under various scenes, such as a positive sample taken in poor light conditions. Images, as well as positive sample images taken from different positions or angles, or positive sample images taken in other complex scenes, using the positive sample images taken in each scene to train the Siamese network, thus making the Siamese network more recognizable The ability to correctly detect non-missing component images captured in different scenes in subsequent testing stages, improving recognition rate.
  • the Siamese network when using the Siamese network to detect missing parts of an image, it is first necessary to train the Siamese network to learn the parameters of the Siamese network, and then use the trained Siamese network to accurately detect the missing parts of the component image.
  • the Siamese network it is necessary to use the positive sample set and the negative sample set in various scenarios for training, so that the Siamese network can fully learn the picture when the component is not missing, and make the Siamese network fully learn. In the case of the picture when the component is missing, the subsequent detection of the missing part can be performed correctly.
  • the negative sample set includes the template image, and an image when the component is not present, or an element exists, but the welding position is obviously wrong, or is not The image of the correct component, etc.
  • the Siamese network can be trained by taking as many positive sample sets and negative sample sets as possible in different scenarios, so that the learning effect of the Siamese network is better, and the subsequent leak detection detection accuracy is high.
  • the positive sample set and the negative sample set of the component image include a training sample and a test sample.
  • the training sample refers to the training of the Siamese network
  • the test sample refers to the test of the effect of the trained Siamese network, which together constitute a sample of the training phase of the Siamese network.
  • the sample creation module 450 includes:
  • the image acquisition unit 451 collects a printed circuit board image
  • the intercepting unit 452 is configured to take a component image on the printed circuit board image with reference to the printed circuit board template image;
  • the sample collection unit 453 is configured to collect the component image alignment positive sample set and the negative sample set.
  • the component image may be labeled after the component image is captured on the printed circuit board icon.
  • a camera may be installed on the production line, and different types of PCB card images may be collected in batches, and the card tracking technology may be used to avoid repeatedly shooting a certain PCB card.
  • each model of the PCB card contains a plurality of image samples, and each image sample corresponds to a certain type of PCB card, so that the component images on the acquired PCB card are also from different boards. Ensure that the sample is versatile.
  • the intercepting unit 452 intercepting the component image on the printed circuit board is specifically:
  • the component image is automatically captured using the positional information of the components on the printed board image.
  • the component image can be automatically intercepted according to the position information.
  • the location information of the acquiring component image may be obtained by using location information of the component recorded in the panel file or by manually labeling location information.
  • the intercepting unit 452 labels the component image as follows:
  • the components may also be labeled by other means that distinguish the components.
  • the sample creation module 450 further includes:
  • a pre-processing unit 454 configured to obtain a position of an element in the component image by using template matching, and align the component image;
  • the component image is normalized to trigger the sample acquisition unit to perform the step of acquiring the component image alignment sample set and the negative sample set.
  • the image is aligned when the sample image of the Siamese network is acquired, so that the component is located at the center of the image, and the image is normalized. This process is called pre-processing of the image. Processing, pre-processing the image will make the Siamese network training better.
  • the component image is preprocessed when the Siamese network is trained, the component image is also required to be used for the missing component detection using the trained Siamese network.
  • Pre-processing if the Siamese network is trained without pre-processing the component image, the component image is not pre-processed during the missing component detection using the trained Siamese network.
  • the determining module 430 is specifically configured to:
  • the similarity is used to represent the degree of similarity between the template image and the test image, when the similarity is within the preset range, the template image is similar to the test image, then the component image exists, that is, the component is not Missing parts, otherwise, components leak.
  • the component when the similarity is greater than or equal to a preset value, the component exists, that is, the component does not leak; when the similarity is less than a preset value, Then the component does not exist.
  • the detecting device 400 inputs the template image and the test image into the trained Siamese network, and performs forward calculation to obtain the feature vector of the template image and the test image, respectively; 400 calculating a similarity between the template image and a feature vector of the test image; the detecting device 400 determines whether the test image matches the template image according to the similarity. Since the Siamese network can extract the advanced features of the image, inputting the image into the trained Siamese network can accurately determine whether the template image matches the test image, and the judgment accuracy is high.
  • FIG. 5 is a schematic structural diagram of a detecting apparatus according to a fifth embodiment of the present invention.
  • a fifth embodiment of the present invention provides a detecting apparatus 500 that can include at least one bus 501, at least one processor 502 connected to the bus, and at least one memory 503 connected to the bus.
  • the processor 502 calls the code stored in the memory 503 through the bus 501 for inputting the template image and the test image into the trained Siamese network, and performing forward calculation to obtain the template image and the test image respectively.
  • a feature vector calculating a similarity between the template image and a feature vector of the test image; determining whether the test image matches the template image according to the similarity.
  • the trained Siamese network has the ability to accurately match the template image and the test image due to the training of a large number of sample images.
  • the template image is a standard picture for comparison, and the test image is compared with the template image to determine whether it matches the template image.
  • the similarity is a parameter for determining a program similar to the template image and the test image.
  • the template image is a corresponding component image when the component exists and is in a standard position
  • the test image is a component image that needs to be tested
  • the processor 502 is configured according to The similarity determines whether the test image matches the template image, and is further used to:
  • the template image may be a PCB template image, so that the component image or the test image corresponding to the input image is also a PCB image, and the template image may also be an image respectively containing each independent component intercepted from the PCB image, thereby corresponding thereto.
  • the input test image is also an image containing individual components.
  • the template image generally input in the Siamese network is an image including a single component, and then input during the training phase.
  • the component image is also the component image of the position taken from the PCB image
  • the image input during the test phase is also the component image of the position intercepted from the PCB image in different cases.
  • the similarity is a measure of the similarity of the features of the two images input to the Siamese network, and since the trained Siamese network can prepare to recognize whether the component images captured in different scenes are missing, The similarity value determines whether the component is missing.
  • the processor 502 before the inputting the template image and the test image into the trained Siamese network, the processor 502 is further configured to:
  • the processor 502 before the inputting the template image and the test image into the trained Siamese network, the processor 502 is further configured to:
  • the positive sample set includes a component image pair of the template image and the component image when the component is present, the negative sample set including a template image pair formed by the template image when the template image is absent, and the negative sample set further includes a component image pair composed of the template image and a component image when other components are present;
  • the Siamese network is trained with the positive sample set and the negative sample set to trigger execution of the step of inputting the template image and the test image into a trained Siamese network.
  • the positive sample set and the negative sample set of the component image include a training sample and a test sample.
  • the training sample refers to the training of the Siamese network
  • the test sample refers to the test of the effect of the trained Siamese network, which together constitute a sample of the training phase of the Siamese network.
  • the processor 502 when the component image alignment positive sample set and the negative sample set are created, the processor 502 is specifically configured to:
  • the component image is collected as a positive sample set and a negative sample set.
  • a camera may be installed on the production line, and different types of PCB card images may be collected in batches, and the card tracking technology may be used to avoid repeatedly shooting a certain PCB card.
  • each model of the PCB card contains a plurality of image samples, and each image sample corresponds to a certain type of PCB card, so that the component images on the acquired PCB card are also from different boards. Ensure that the samples are not duplicated and in sufficient quantities.
  • the component image is intercepted on the printed circuit board, and the processor 502 is specifically configured to:
  • the component image is automatically captured using the positional information of the components on the printed board image.
  • the component image can be automatically intercepted according to the position information.
  • the component image is labeled, and the processor 502 is specifically configured to:
  • the components may also be labeled by other means that distinguish the components.
  • the processor 502 before the collecting the component image alignment positive sample set and the negative sample set, the processor 502 is further configured to:
  • the component image is normalized to trigger the step of acquiring the component image alignment positive sample set and the negative sample set.
  • the processor 502 determines, according to the similarity, whether an element corresponding to the test image exists, and the processor 502 is specifically configured to:
  • the detecting device 500 inputs the template image and the test image into the trained Siamese network, and performs forward calculation to obtain the feature vector of the template image and the test image, respectively; 500 calculates a similarity between the template image and a feature vector of the test image; and the detecting device 500 determines whether the test image matches the template image according to the similarity. Since the Siamese network can extract the advanced features of the image, inputting the image into the trained Siamese network can accurately determine whether the template image matches the test image, and the judgment accuracy is high.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and the program includes some or all of the steps of any of the detection methods described in the foregoing method embodiments.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a computer device can be an embedded device, a personal computer, A server or network device, etc.
  • the foregoing storage medium includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Quality & Reliability (AREA)

Abstract

本发明实施例公开了一种检测方法及装置,所述方法,包括:将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;计算所述模板图像与所述测试图像的特征向量的相似度;根据所述相似度确定所述测试图像与所述模板图像是否匹配。由于Siamese网络可以提取到图像的高级特征,本发明实施例通过将图像输入经过训练后的Siamese网络可以准确地判断模板图像与测试图像是否匹配,判断准确率高。

Description

一种检测方法及装置 技术领域
本发明涉及AOI领域,具体涉及一种检测方法及装置。
背景技术
图像匹配是指利用图像特征判断两幅图像是否相似的技术,目前已应用于各种领域,如可利用图像匹配技术进行元件检测、人脸识别等,但是目前由于用于进行图像匹配的图像特征的鲁棒性低,容易受光照等环境的影响而导致匹配出现误差,匹配准确率低。
以元件检测领域的图像匹配为例:印刷线路板(Printed circuit board,简称PCB板)是指为各种电子元器件提供连接的电路板,随着电子设备越来越复杂,需要的零件自然越来越多,PCB上头的线路与连接也越来越密集,从而在焊接/手插电子元件的时候难免出现漏件现象,那么需要在PCB板焊接完毕后对PCB板是否出现漏件进行检测。
目前,对PCB板电子元件的漏件检测有些是通过人工检测来进行,此种方案耗时多、成本高以及效率低,所以现在一般采用自动检测方法来进行,最普遍的自动检测方法是基于模板匹配的漏件检测方法,但是该方案容易受光照等环境的影响而导致检测失误,也有些是基于颜色直方图或一些低层特征的来实现,但是这些方案由于电子元件的颜色信息不可靠或电子元件的低层特征不明显而导致检测失误。
发明内容
本发明实施例提供了一种检测方法及装置,以期可以提高图像的相似检测准确率,可靠性高。
本发明实施例第一方面提供一种检测方法,包括:
将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;
计算所述模板图像与所述测试图像的特征向量的相似度;
根据所述相似度确定所述测试图像与所述模板图像是否匹配。
本发明实施例第二方面提供一种检测装置,包括:
图像输入模块,用于将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;
计算模块,用于计算所述模块图像与所述测试图像的特征向量的相似度;
确定模块,用于根据所述相似度确定所述测试图像与所述模板图像是否匹配。
可以看出,在本发明实施例提供的技术方案中,将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;计算所述模板图像与所述测试图像的特征向量的相似度;根据所述相似度确定所述测试图像与所述模板图像是否匹配。由于Siamese网络可以提取到图像的高级特征,将图像输入经过训练后的Siamese网络可以准确地判断模板图像与测试图像是否匹配,判断准确率高。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1-a是本发明实施例提供的Siamese网络的网络结构图;
图1-b是本发明第一实施例提供的一种检测方法的流程示意图;
图2是本发明第二实施例提供的一种检测方法的流程示意图;
图3是本发明第三实施例提供的一种检测装置的结构示意图;
图4是本发明第四实施例提供的一种检测装置的结构示意图;
图5是本发明第五实施例提供的一种检测装置的结构示意图。
具体实施方式
本发明实施例提供了本发明实施例提供了一种检测方法及装置,以期可以提高图像的相似检测准确率,可靠性高。
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施 例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而非用于描述特定顺序。此外,术语“包括”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
本发明实施例的一种检测方法,一种检测方法包括:
将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;计算所述模板图像与所述测试图像的特征向量的相似度;根据所述相似度确定所述测试图像与所述模板图像是否匹配。
首先参见图1,图1-a是本发明实施例提供的Siamese网络的网络结构图;图1-b是本发明第一实施例提供的一种检测方法的流程示意图。其中,如图1-b所示,本发明第一实施例提供的一种检测方法可以包括:
S101、将所述模板图像与所述测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量。其中,参见图1-a,Siamese网络是一种深度神经网络,根据Siamese网络的特点,可计算出来图像各个层次的特征,包括低层特征和高层特征,从而根据图像的高层特征对图像进行分析时将得到更为精确的结果。为了进行图像匹配,设计Siamese网络包含两个结构一样并共享参数的卷积神经网络,在利用Siamese网络进行图像匹配时,分别输入图像的模板图像和测试图像,从而可分别计算出来两个输入图像的特征向量,再计算两个特征向量的相似度,从而根据相似度的值判断两幅图像的相似程度即判断两幅图像是否匹配。
其中,经过训练后的Siamese网络由于经过大量的样本图像的训练学习,具有了准确地对模板图像与测试图像进行图像匹配的能力。
其中,模板图像是用于对照的标准的图片,测试图像是通过与模板图像进 行对照从而判断与模板图像是否匹配。
S102、计算所述模板图像与所述测试图像的特征向量的相似度。
其中,相似度是用于判断模板图像与测试图像相似程序的参数。
可选地,在本发明的一些可能的实施方式中,可在计算模块图像与测试图像的特征向量后,再计算特征向量的欧氏距离得到模板图像与测试图像的特征向量的相似度。
S103、根据所述相似度确定所述测试图像与所述模板图像是否匹配。
其中,由于相似度是对Siamese网络输入的两个图像的特征的相似情况的度量,所以可通过相似度来判断模板图像与测试图像是否相似,也即判断模板图像与测试图像是否匹配。
可以看出,本实施例的方案中,将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;计算所述模板图像与所述测试图像的特征向量的相似度;根据所述相似度确定所述测试图像与所述模板图像是否匹配。由于Siamese网络可以提取到图像的高级特征,将图像输入经过训练后的Siamese网络可以准确地判断模板图像与测试图像是否匹配,判断准确率高。
可选地,在本发明的一些可能的实施方式中,所述模板图像为元件存在且处于标准位置时对应的元件图像,所述测试图像为需要进行测试的元件图像,所述根据所述相似度确定所述测试图像与所述模板图像是否匹配,包括:
根据所述相似度确定所述测试图像对应的元件是否存在。
其中,该模板图像可以为PCB模板图,从而与其对应输入的元件图像或测试图像也为PCB图像,该模板图也可以为从PCB图像上截取到的分别包含各个独立元件的图像,从而与其对应输入的测试图像也为包含各个独立元件的图像。
可选地,在本发明的一些可能的实施方式中,由于是对每个元件进行漏件检测,所以一般在Siamese网络中输入的模板图像为包含一个独立元件的图像,那么在训练阶段输入的元件图像也为从PCB图像上截取到的该位置的元件图像,在测试阶段输入的图像也为不同情况下从PCB图像上截取到的该位置的元件图像。
可选地,在本发明的一些可能的实施方式中,当模板图像为元件的模板图像时,可以理解,模板图像为元件存在并且元件的位置处于一个正确位置的元 件图像,测试图像则根据模板图像判断是否漏件。
可以理解,由于Siamese网络可以判断测试图像与模板图像是否匹配,所以当模板图像与测试图像为元件图像时,可以根据相似度确定元件图像的测试图像是否与模板图像是否匹配,也即确定测试图像对应的元件是否存在。
可选地,在本发明的一些可能的实施方式中,所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络之前,所述方法还包括:
利用模板匹配得到所述模板图像与所述测试图像中元件的位置并对所述模板图像与所述测试图像进行对齐;
对所述模板图像与所述测试图像进行归一化,以触发执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
可以理解,由于元件图像是从模板图像上截取下来的一块图像,为了使检测结果更为准确,需要使截取到的元件图像中的元件位于图像的中心位置,并同时对图像的大小进行归一化,这样以保证后续处理的准确性。该过程称为预处理过程。
可选地,在本发明的一些可能的实施方式中,也可以不对图像进行预处理。
可选地,在本发明的一些可能的实施方式中,所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络之前,所述方法还包括:
创建所述元件图像对正样本集合以及负样本集合,其中,所述正样本集合包括所述模板图像与所述元件存在时的所述元件图像构成的元件图像对,所述负样本集合包括所述模板图像与所述元件不存在时的所述元件图像构成的元件图像对,所述负样本集合还包括所述模板图像与其它元件存在时的元件图像构成的元件图像对;
利用所述正样本集合以及所述负样本集合训练所述Siamese网络,以触发执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
需要说明,可选地,在本发明的一些可能的实施方式中,当模板图像与测试图像为PCB图像时,则样本集合中的正样本集合包括模板图像与模板图像上各元件位置上均包含的是正确的元件时的元件图像构成的元件图像对,负样本集合包括模板图像与各元件位置上可能不存在元件时的元件图像构成的元件图像对,负样本集合还包括模板图像与各元件位置上的元件均存在、但是可能插入了错误的元件时的元件图像构成的元件图像对。
可选地,在本发明的另一些可能的实施方式中,当模板图像与测试图像均为从PCB图像上截取到的分别包含各个独立元件的图像,从而样本集合中的正样本集合包括模板图像与包含该模板图像中的元件的图像构成的元件图像对,负样本集合包括模板图像与不包含元件的图像构成的元件图像对,负样本集合还包括模板图像与包含了不是模板图像中的元件、但是包含了其它的错误元件的元件图像构成的元件图像对。
可选地,在本发明的一些可能的实施方式中,所述正样本集合包括所述模板图像,以及元件存在并且在各个场景下拍摄的样本,如在光线不好的情况下拍摄的正样本图像,以及从不同的位置或角度拍摄的正样本图像,或者其它复杂场景下拍摄的正样本图像,利用各个场景下拍摄的正样本图像对Siamese网络进行训练,从而使Siamese网络具有更强的识别能力,能够在后续测试阶段对不同场景下拍摄的非漏件的元件图像进行正确的检测,提高识别率。
可以理解,在利用Siamese网络对图像进行漏件检测时,首先需要对Siamese网络利用样本进行训练学习,得到Siamese网络的参数,从而再利用训练后的Siamese网络对元件图像准确地进行漏件检测。而在对Siamese网络进行训练时,需要分别利用各种场景下的正样本集合以及负样本集合进行训练,这样才能使Siamese网络充分学习到元件不是漏件时的图片情况,以及使Siamese网络充分学习到元件漏件时的图片情况,后续才能正确地进行漏件检测。
可选地,在本发明的一些可能的实施方式中,所述负样本集合包括所述模板图像,以及元件不存在时的图像,或者元件存在,但焊接位置明显有误时候的情况,或者不是正确的元件的时候的图像等。
可以理解,取不同情景下的尽可能多的正样本集合以及负样本集合对Siamese网络进行训练,可使得Siamese网络的学习效果更好,从而后续漏件检测识别准确率高。
可选地,在本发明的一些可能的实施方式中,所述元件图像的正样本集合和负样本集合包括训练样本和测试样本。
其中,训练样本是指对Siamese网络进行训练,测试样本是指测试经过训练后的Siamese网络的效果,两者一起构成对Siamese网络的训练阶段的样本。
可选地,在本发明的一些可能的实施方式中,所述创建所述元件图像对正样本集合以及负样本集合,包括:
采集印刷电路板图像;
以印刷电路板模板图像为参考,在所述印刷电路板图像上截取元件图像;
采集所述元件图像对正样本集合以及负样本集合。
可选地,在本发明的些可能的实施方式中,在印刷电路板图标上截取元件图像后可对所述元件图像进行标注。
可以理解,由于是需要对每个元件进行漏件检测,所以在对Siamese网络进行训练时,需要截取印刷电路板图像上面每个元件的图像的样本集合进行训练。并且,为了在训练的时候对各个元件图像进行区分,所以在训练之前需要对各个元件图像进行标注以区分不同元件。
可选地,在本发明的一些可能的实施方式中,可以在生产线上架设摄像头,批量采集不同型号的PCB板卡图像,并以板卡跟踪技术避免重复拍摄某一PCB板卡。这样每个型号的PCB板卡均包含多个图像样本,每个图像样本对应某一型号的某张PCB板卡,从而这样在获取到的PCB板卡上的元件图像也来自不同板卡上,保证样本具备多样性。
可选地,在本发明的一些可能的实施方式中,所述在所述印刷板电路上截取元件图像,包括:
利用印刷板图像上面的元件的位置信息自动截取元件图像。
可以理解,当知道元件的位置信息后,则可以根据该位置信息自动截取元件图像。
可选地,在本发明的一些可能的实施方式中,所述获取元件图像的位置信息可以通过板式文件中所记录的元件的位置信息,或者通过人工标注的位置信息来获取。
可选地,在本发明的一些可能的实施方式中,所述对元件图像进行标注包括:
根据元件类别信息进行标注。
可以理解,需要对元件的类别进行区分,从而在训练的时候记录元件的类别才能准确地对元件进行漏件检测。
可选地,在本发明的另一些可能的实施方式中,也可以通过其它能对元件进行区分的方式对元件进行标注。
可选地,在本发明的一些可能的实施方式中,所述采集所述元件图像对正 样本集合以及负样本集合之前,所述方法还包括:
利用模板匹配得到所述元件图像中元件的位置并对所述元件图像进行对齐;
对所述元件图像进行归一化,以触发执行所述采集所述元件图像对正样本集合以及负样本集合的步骤。
可以理解,与对Siamese网络进行测试的过程类似,在采集Siamese网络的样本图像时对图像进行对齐以使元件位于图像的中心位置,并对图像进行归一化,该过程称为对图像的预处理过程,对图像进行预处理将会使Siamese网络训练效果更好。
可选地,在本发明的一些可能的实施方式中,如果对Siamese网络进行训练的时候对元件图像进行预处理,那么在利用训练后的Siamese网络进行漏件检测时,也需要对元件图像进行预处理,如果对Siamese网络进行训练的时候不对元件图像进行预处理,那么在利用训练后的Siamese网络进行漏件检测时也不对元件图像进行预处理。
可选地,在本发明的一些可能的实施方式中,所述根据所述相似度确定所述测试图像对应的元件是否存在,包括:
判断所述相似度是否在预设范围内;
若所述相似度在预设范围内,则判定为所述元件存在;
若所述相似度不在预设范围内,则判定为所述元件不存在。
可以理解,由于所述相似度是用于表征模板图像与测试图像的相似程度,所以当相似度在预设范围内时,说明模板图像与测试图像相似,那么元件图像则存在,也就是元件不漏件,否则,元件漏件。
可选地,在本发明的一些可能的实施方式中,当所述相似度大于或等于预设值时,则元件存在,也就是元件不漏件;当所述相似度小于预设值时,则元件不存在。
为了便于更好理解和实施本发明实施例的上述方案,下面结合一些具体的应用场景进行举例说明。
请参见图2,图2是本发明第二实施例提供的一种检测方法的流程示意图,其中,如图2所示,本发明第二实施例提供的一种检测方法可以包括:
S201、采集印刷电路板图像。
可以理解,由于是需要利用Siamese网络进行漏件检测,所以首先需要采集样本图像。
其中,Siamese网络是指一种深度神经网络,根据Siamese网络的特点,可计算出来元件各个层次的特征,包括低层特征和高层特征,从而根据图像的高层特征对图像进行分析时将得到更为精确的结果。为了对元件进行漏件检测,设计Siamese网络包含两个结构一样并共享参数的卷积神经网络,在利用Siamese网络进行漏件检测时,分别输入图像的模板图像和元件图像,从而可分别计算出来两个输入图像的特征向量,再计算两个特征向量的相似度,从而根据相似度的值判断是否为一类元件从而判断是否漏件。首先需要对Siamese网络进行训练,得到Siamese网络的参数,在训练的过程中利用各种情况下采集到的图像的样本,从而可以训练不同情况下图像漏件以及图像存在的情况。然后再根据训练后的Siamese网络对元件进行漏件检测,这两个卷积神经网络在训练阶段和测试阶段所输入的图像都不一样,在训练阶段时,其中一个输入模板图,另外一个输入元件图像,在测试阶段时,其中一个输入模板图,另外一个输入测试图像。并且,在训练阶段时,通过分别作前向计算得到两个图像的特征向量,再计算两个特征向量的欧氏距离得到相似度。
其中,模板图为用于对照的标准的图片。该模板图可以为PCB模板图,从而与其对应输入的元件图像或测试图像也为PCB图像,该模板图也可以为从PCB图像上截取到的分别包含各个独立元件的图像,从而与其对应输入的图像也为包含各个独立元件的图像。
可选地,在本发明的一些可能的实施方式中,由于是对每个元件进行漏件检测,所以一般在Siamese网络中输入的模板图像为包含一个独立元件的图像,那么在训练阶段输入的元件图像也为从PCB图像上截取到的该位置的元件图像,在测试阶段输入的图像也为不同情况下从PCB图像上截取到的该位置的元件图像。
可以理解,首先需要采集PCB图像,才能截取元件图像样本。
可选地,在本发明的一些可能的实施方式中,可以在生产线上架设摄像头,批量采集不同型号的PCB板卡图像,并以板卡跟踪技术避免重复拍摄某一PCB板卡。这样每个型号的PCB板卡均包含多个图像样本,每个图像样本对应某一型号的某张PCB板卡,从而这样在获取到的PCB板卡上的元件图像也来自不同 板卡上,保证样本具备多样性。
S202、以印刷电路板模板图像为参考,在印刷电路板图像上截取元件图像并对元件图像进行标注。
可以理解,由于是需要对每个元件进行漏件检测,所以在对Siamese网络进行训练时,需要截取印刷电路板图像上面每个元件的图像的样本集合进行训练。并且,为了在训练的时候对各个元件图像进行区分,所以在训练之前需要对各个元件图像进行标注以区分不同元件。
可选地,在本发明的一些可能的实施方式中,所述在所述印刷板电路上截取元件图像,包括:
利用印刷板图像上面的元件的位置信息自动截取元件图像。
可以理解,当知道元件的位置信息后,则可以根据该位置信息自动截取元件图像。
可选地,在本发明的一些可能的实施方式中,所述获取元件图像的位置信息可以通过板式文件中所记录的元件的位置信息,或者通过人工标注的位置信息来获取。
可选地,在本发明的一些可能的实施方式中,所述对元件图像进行标注包括:
根据元件类别信息进行标注。
可以理解,需要对元件的类别进行区分,从而在训练的时候记录元件的类别才能准确地对元件进行漏件检测。
可选地,在本发明的另一些可能的实施方式中,也可以通过其它能对元件进行区分的方式对元件进行标注。
S203、采集元件图像对正样本集合以及负样本集合。
其中,所述正样本集合包括所述模板图像与所述元件存在时的所述元件图像构成的元件图像对,所述负样本集合包括所述模板图像与所述元件不存在时的所述元件图像构成的元件图像对,所述负样本集合还包括所述模板图像与其它元件存在时的元件图像构成的元件图像对。
需要说明,可选地,在本发明的一些可能的实施方式中,当模板图像与测试图像为PCB图像时,则样本集合中的正样本集合包括模板图像与模板图像上各元件位置上均包含的是正确的元件时的元件图像构成的元件图像对,负样本 集合包括模板图像与各元件位置上可能不存在元件时的元件图像构成的元件图像对,负样本集合还包括模板图像与各元件位置上的元件均存在、但是可能插入了错误的元件时的元件图像构成的元件图像对。
可选地,在本发明的另一些可能的实施方式中,当模板图像与测试图像均为从PCB图像上截取到的分别包含各个独立元件的图像,从而样本集合中的正样本集合包括模板图像与包含该模板图像中的元件的图像构成的元件图像对,负样本集合包括模板图像与不包含元件的图像构成的元件图像对,负样本集合还包括模板图像与包含了不是模板图像中的元件、但是包含了其它的错误元件的元件图像构成的元件图像对。
可选地,在本发明的一些可能的实施方式中,所述正样本集合包括所述模板图像,以及元件存在并且在各个场景下拍摄的样本,如在光线不好的情况下拍摄的正样本图像,以及从不同的位置或角度拍摄的正样本图像,或者其它复杂场景下拍摄的正样本图像,利用各个场景下拍摄的正样本图像对Siamese网络进行训练,从而使Siamese网络具有更强的识别能力,能够在后续测试阶段对不同场景下拍摄的非漏件的元件图像进行正确的检测,提高识别率。
可以理解,在利用Siamese网络对图像进行漏件检测时,首先需要对Siamese网络利用样本进行训练学习,得到Siamese网络的参数,从而再利用训练后的Siamese网络对元件图像准确地进行漏件检测。而在对Siamese网络进行训练时,需要分别利用各种场景下的正样本集合以及负样本集合进行训练,这样才能使Siamese网络充分学习到元件不是漏件时的图片情况,以及使Siamese网络充分学习到元件漏件时的图片情况,后续才能正确地进行漏件检测。
可选地,在本发明的一些可能的实施方式中,所述负样本集合包括所述模板图像,以及元件不存在时的图像,或者元件存在,但焊接位置明显有误时候的情况,或者不是正确的元件的时候的图像等。
可以理解,取不同情景下的尽可能多的正样本集合以及负样本集合对Siamese网络进行训练,可使得Siamese网络的学习效果更好,从而后续漏件检测识别准确率高。
可选地,在本发明的一些可能的实施方式中,所述元件图像的正样本集合和负样本集合包括训练样本和测试样本。
其中,训练样本是指对Siamese网络进行训练,测试样本是指测试经过训练 后的Siamese网络的效果,两者一起构成对Siamese网络的训练阶段的样本。
可选地,在本发明的一些可能的实施方式中,所述采集所述元件图像对正样本集合以及负样本集合之前,所述方法还包括:
利用模板匹配得到所述元件图像中元件的位置并对所述元件图像进行对齐;
对所述元件图像进行归一化。
可以理解,由于元件图像是从模板图像上截取下来的一块图像,为了使检测结果更为准确,需要使截取到的元件图像中的元件位于图像的中心位置,并同时对图像的大小进行归一化,这样以保证后续处理的准确性。该过程称为预处理过程。
可选地,在本发明的一些可能的实施方式中,也可以不对图像进行预处理。
S204、利用正样本集合以及负样本集合训练Siamese网络。
可以理解,需要利用正样本集合以及负样本集合对Siamese网络进行训练,从而使Siamese网络具有漏件检测能力。
S205、将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到模板图像与测试图像的特征向量。
S206、计算模块图像与测试图像的特征向量的相似度。
其中,所述模板图像为元件存在且处于标准位置时对应的元件图像,所述测试图像为需要进行测试的元件图像
其中,所述相似度为对Siamese网络输入的模板图像与测试图像的特征的相似情况的度量,相似度是利用Siamese网络学习到的模板图像与测试图像高级特征来判断模板图像与测试图像是否相似的程度的值。
可选地,在本发明的一些可能的实施方式中,所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络之前,所述方法还包括:
利用模板匹配得到所述模板图像与所述测试图像中元件的位置并对所述模板图像与所述测试图像进行对齐;
对所述模板图像与所述测试图像进行归一化。
可以理解,由于元件图像是从模板图像上截取下来的一块图像,为了使检测结果更为准确,需要使截取到的元件图像中的元件位于图像的中心位置,并同时对图像的大小进行归一化,这样以保证后续处理的准确性。该过程称为预 处理过程。
可选地,在本发明的一些可能的实施方式中,也可以不对图像进行预处理。
可选地,在本发明的一些可能的实施方式中,如果对Siamese网络进行训练的时候对元件图像进行预处理,那么在利用训练后的Siamese网络进行漏件检测时,也需要对元件图像进行预处理,如果对Siamese网络进行训练的时候不对元件图像进行预处理,那么在利用训练后的Siamese网络进行漏件检测时也不对元件图像进行预处理。
S207、根据相似度确定测试图像对应的元件是否存在。
可以理解,由于相似度是利用Siamese网络学习到的模板图像与测试图像高级特征来判断模板图像与测试图像是否相似的程度的值,从而可以用相似度来确定元件是否模板图像与测试图像是否相似,也即确定所述测试图像对应的元件是否存在,即判断元件是否漏件。
可选地,在本发明的一些可能的实施方式中,所述根据所述相似度确定所述测试图像对应的元件是否存在,包括:
判断所述相似度是否在预设范围内;
若所述相似度在预设范围内,则所述元件存在;
若所述相似度不在预设范围内,则所述元件不存在。
可以理解,由于所述相似度是用于表征模板图像与测试图像的相似程度,所以当相似度在预设范围内时,说明模板图像与测试图像相似,那么元件图像则存在,也就是元件不漏件,否则,元件漏件。
可选地,在本发明的一些可能的实施方式中,当所述相似度大于或等于预设值时,则元件存在,也就是元件不漏件;当所述相似度小于预设值时,则元件不存在。
可以看出,本实施例的方案中,将所述模板图像与所述测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量,最后计算两个特征向量的相似度,其中,所述模板图像为元件存在且处于标准位置时对应的元件图像,所述测试图像为需要进行测试的元件图像;根据所述相似度确定所述测试图像对应的元件是否存在。由于Siamese网络可以提取到图像的高级特征,将图像输入经过训练后的Siamese网络可以准确地判断元件图像是否漏件,识别准确率高。
本发明实施例还提供一种元件检测装置,该装置包括:
图像输入模块,用于将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量,其中,所述模板图像为元件存在且处于标准位置时对应的元件图像,所述测试图像为需要进行测试的元件图像;
计算模块,用于计算所述模块图像与所述测试图像的特征向量的相似度;
确定模块,用于根据所述相似度确定所述测试图像对应的元件是否存在。
具体的,请参见图3,图3是本发明第三实施例提供的一种检测装置的结构示意图,其中,如图3所示,本发明第三实施例提供的一种检测装置300可以包括:
图像输入模块310、计算模块320和确定模块330。
其中,图像输入模块310,用于将所述模板图像与所述测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量。
其中,参见图1-a,Siamese网络是一种深度神经网络,根据Siamese网络的特点,可计算出来图像各个层次的特征,包括低层特征和高层特征,从而根据图像的高层特征对图像进行分析时将得到更为精确的结果。为了进行图像匹配,设计Siamese网络包含两个结构一样并共享参数的卷积神经网络,在利用Siamese网络进行图像匹配时,分别输入图像的模板图像和测试图像,从而可分别计算出来两个输入图像的特征向量,再计算两个特征向量的相似度,从而根据相似度的值判断两幅图像的相似程度即判断两幅图像是否匹配。
其中,经过训练后的Siamese网络由于经过大量的样本图像的训练学习,具有了准确地对模板图像与测试图像进行图像匹配的能力。
其中,模板图像是用于对照的标准的图片,测试图像是通过与模板图像进行对照从而判断与模板图像是否匹配。
计算模块320,用于计算所述模板图像与所述测试图像的特征向量的相似度。
其中,相似度是用于判断模板图像与测试图像相似程序的参数。
可选地,在本发明的一些可能的实施方式中,可在计算模块图像与测试图像的特征向量后,再计算特征向量的欧氏距离得到模板图像与测试图像的特征 向量的相似度。
确定模块330,用于根据所述相似度确定所述测试图像与所述模板图像是否匹配。
其中,由于相似度是对Siamese网络输入的两个图像的特征的相似情况的度量,所以可通过相似度来判断模板图像与测试图像是否相似,也即判断模板图像与测试图像是否匹配。可以理解的是,本实施例的检测装置300的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。
可以看出,本实施例的方案中,检测装置300将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;检测装置300计算所述模板图像与所述测试图像的特征向量的相似度;检测装置300根据所述相似度确定所述测试图像与所述模板图像是否匹配。由于Siamese网络可以提取到图像的高级特征,将图像输入经过训练后的Siamese网络可以准确地判断模板图像与测试图像是否匹配,判断准确率高。
请参见图4,图4是本发明第四实施例提供的一种检测装置的结构示意图,其中,如图4所示,本发明第四实施例提供的一种检测装置400可以包括:
图像输入模块410、计算模块420和确定模块430。
其中,图像输入模块410,用于将所述模板图像与所述测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量。
其中,参见图1-a,Siamese网络是一种深度神经网络,根据Siamese网络的特点,可计算出来图像各个层次的特征,包括低层特征和高层特征,从而根据图像的高层特征对图像进行分析时将得到更为精确的结果。为了进行图像匹配,设计Siamese网络包含两个结构一样并共享参数的卷积神经网络,在利用Siamese网络进行图像匹配时,分别输入图像的模板图像和测试图像,从而可分别计算出来两个输入图像的特征向量,再计算两个特征向量的相似度,从而根据相似度的值判断两幅图像的相似程度即判断两幅图像是否匹配。
其中,经过训练后的Siamese网络由于经过大量的样本图像的训练学习,具有了准确地对模板图像与测试图像进行图像匹配的能力。
其中,模板图像是用于对照的标准的图片,测试图像是通过与模板图像进 行对照从而判断与模板图像是否匹配。
计算模块420,用于计算所述模板图像与所述测试图像的特征向量的相似度。
其中,相似度是用于判断模板图像与测试图像相似程序的参数。
可选地,在本发明的一些可能的实施方式中,可在计算模块图像与测试图像的特征向量后,再计算特征向量的欧氏距离得到模板图像与测试图像的特征向量的相似度。
确定模块430,用于根据所述相似度确定所述测试图像与所述模板图像是否匹配。
其中,由于相似度是对Siamese网络输入的两个图像的特征的相似情况的度量,所以可通过相似度来判断模板图像与测试图像是否相似,也即判断模板图像与测试图像是否匹配。
可选地,在本发明的一些可能的实施方式中,所述模板图像为元件存在且处于标准位置时对应的元件图像,所述测试图像为需要进行测试的元件图像,所述确定模块430具体用于:
根据所述相似度确定所述测试图像对应的元件是否存在。
其中,该模板图像可以为PCB模板图,从而与其对应输入的元件图像或测试图像也为PCB图像,该模板图也可以为从PCB图像上截取到的分别包含各个独立元件的图像,从而与其对应输入的测试图像也为包含各个独立元件的图像。
可选地,在本发明的一些可能的实施方式中,由于是对每个元件进行漏件检测,所以一般在Siamese网络中输入的模板图像为包含一个独立元件的图像,那么在训练阶段输入的元件图像也为从PCB图像上截取到的该位置的元件图像,在测试阶段输入的图像也为不同情况下从PCB图像上截取到的该位置的元件图像。
可选地,在本发明的一些可能的实施方式中,当模板图像为元件的模板图像时,可以理解,模板图像为元件存在并且元件的位置处于一个正确位置的元件图像,测试图像则根据模板图像判断是否漏件。
可以理解,由于Siamese网络可以判断测试图像与模板图像是否匹配,所以当模板图像与测试图像为元件图像时,可以根据相似度确定元件图像的测试图像是否与模板图像是否匹配,也即确定测试图像对应的元件是否存在。
可选地,在本发明的一些可能的实施方式中,所述元件检测装置400还包括:
预处理模块440,用于利用模板匹配得到所述模板图像与所述测试图像中元件的位置并对所述模板图像与所述测试图像进行对齐;
对所述模板图像与所述测试图像进行归一化,以触发所述图像输入模块执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
可以理解,由于元件图像是从模板图像上截取下来的一块图像,为了使检测结果更为准确,需要使截取到的元件图像中的元件位于图像的中心位置,并同时对图像的大小进行归一化,这样以保证后续处理的准确性。该过程称为预处理过程。
可选地,在本发明的一些可能的实施方式中,也可以不对图像进行预处理。
可选地,在本发明的一些可能的实施方式中,所述元件检测装置400还包括:
样本创建模块450,用于创建所述元件图像对正样本集合以及负样本集合,其中,所述正样本集合包括所述模板图像与所述元件存在时的所述元件图像构成的元件图像对,所述负样本集合包括所述模板图像与所述元件不存在时的所述元件图像构成的元件图像对,所述负样本集合还包括所述模板图像与其它元件存在时的元件图像构成的元件图像对;
训练模块460,用于利用所述正样本集合以及所述负样本集合训练所述Siamese网络,以触发所述图像输入模块执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
需要说明,可选地,在本发明的一些可能的实施方式中,当模板图像与测试图像为PCB图像时,则样本集合中的正样本集合包括模板图像与模板图像上各元件位置上均包含的是正确的元件时的元件图像构成的元件图像对,负样本集合包括模板图像与各元件位置上可能不存在元件时的元件图像构成的元件图像对,负样本集合还包括模板图像与各元件位置上的元件均存在、但是可能插入了错误的元件时的元件图像构成的元件图像对。
可选地,在本发明的另一些可能的实施方式中,当模板图像与测试图像均为从PCB图像上截取到的分别包含各个独立元件的图像,从而样本集合中的正样本集合包括模板图像与包含该模板图像中的元件的图像构成的元件图像对, 负样本集合包括模板图像与不包含元件的图像构成的元件图像对,负样本集合还包括模板图像与包含了不是模板图像中的元件、但是包含了其它的错误元件的元件图像构成的元件图像对。
可选地,在本发明的一些可能的实施方式中,所述正样本集合包括所述模板图像,以及元件存在并且在各个场景下拍摄的样本,如在光线不好的情况下拍摄的正样本图像,以及从不同的位置或角度拍摄的正样本图像,或者其它复杂场景下拍摄的正样本图像,利用各个场景下拍摄的正样本图像对Siamese网络进行训练,从而使Siamese网络具有更强的识别能力,能够在后续测试阶段对不同场景下拍摄的非漏件的元件图像进行正确的检测,提高识别率。
可以理解,在利用Siamese网络对图像进行漏件检测时,首先需要对Siamese网络利用样本进行训练学习,得到Siamese网络的参数,从而再利用训练后的Siamese网络对元件图像准确地进行漏件检测。而在对Siamese网络进行训练时,需要分别利用各种场景下的正样本集合以及负样本集合进行训练,这样才能使Siamese网络充分学习到元件不是漏件时的图片情况,以及使Siamese网络充分学习到元件漏件时的图片情况,后续才能正确地进行漏件检测。
可选地,在本发明的一些可能的实施方式中,所述负样本集合包括所述模板图像,以及元件不存在时的图像,或者元件存在,但焊接位置明显有误时候的情况,或者不是正确的元件的时候的图像等。
可以理解,取不同情景下的尽可能多的正样本集合以及负样本集合对Siamese网络进行训练,可使得Siamese网络的学习效果更好,从而后续漏件检测识别准确率高。
可选地,在本发明的一些可能的实施方式中,所述元件图像的正样本集合和负样本集合包括训练样本和测试样本。
其中,训练样本是指对Siamese网络进行训练,测试样本是指测试经过训练后的Siamese网络的效果,两者一起构成对Siamese网络的训练阶段的样本。
可选地,在本发明的一些可能的实施方式中,所述样本创建模块450包括:
图像采集单元451,采集印刷电路板图像;
截取单元452,用于以印刷电路板模板图像为参考,在所述印刷电路板图像上截取元件图像;
样本采集单元453,用于采集所述元件图像对正样本集合以及负样本集合。
可选地,在本发明的些可能的实施方式中,在印刷电路板图标上截取元件图像后可对所述元件图像进行标注。
可以理解,由于是需要对每个元件进行漏件检测,所以在对Siamese网络进行训练时,需要截取印刷电路板图像上面每个元件的图像的样本集合进行训练。并且,为了在训练的时候对各个元件图像进行区分,所以在训练之前需要对各个元件图像进行标注以区分不同元件。
可选地,在本发明的一些可能的实施方式中,可以在生产线上架设摄像头,批量采集不同型号的PCB板卡图像,并以板卡跟踪技术避免重复拍摄某一PCB板卡。这样每个型号的PCB板卡均包含多个图像样本,每个图像样本对应某一型号的某张PCB板卡,从而这样在获取到的PCB板卡上的元件图像也来自不同板卡上,保证样本具备多样性。
可选地,在本发明的一些可能的实施方式中,所述截取单元452在所述印刷板电路上截取元件图像具体为:
利用印刷板图像上面的元件的位置信息自动截取元件图像。
可以理解,当知道元件的位置信息后,则可以根据该位置信息自动截取元件图像。
可选地,在本发明的一些可能的实施方式中,所述获取元件图像的位置信息可以通过板式文件中所记录的元件的位置信息,或者通过人工标注的位置信息来获取。
可选地,在本发明的一些可能的实施方式中,所述截取单元452对元件图像进行标注具体为:
根据元件类别信息进行标注。
可以理解,需要对元件的类别进行区分,从而在训练的时候记录元件的类别才能准确地对元件进行漏件检测。
可选地,在本发明的另一些可能的实施方式中,也可以通过其它能对元件进行区分的方式对元件进行标注。
可选地,在本发明的一些可能的实施方式中,所述样本创建模块450还包括:
预处理单元454,用于利用模板匹配得到所述元件图像中元件的位置并对所述元件图像进行对齐;
对所述元件图像进行归一化,以触发所述样本采集单元执行所述采集所述元件图像对正样本集合以及负样本集合的步骤。
可以理解,与对Siamese网络进行测试的过程类似,在采集Siamese网络的样本图像时对图像进行对齐以使元件位于图像的中心位置,并对图像进行归一化,该过程称为对图像的预处理过程,对图像进行预处理将会使Siamese网络训练效果更好。
可选地,在本发明的一些可能的实施方式中,如果对Siamese网络进行训练的时候对元件图像进行预处理,那么在利用训练后的Siamese网络进行漏件检测时,也需要对元件图像进行预处理,如果对Siamese网络进行训练的时候不对元件图像进行预处理,那么在利用训练后的Siamese网络进行漏件检测时也不对元件图像进行预处理。
可选地,在本发明的一些可能的实施方式中,所述确定模块430具体用于:
判断所述相似度是否在预设范围内;
若所述相似度在预设范围内,则判定为所述元件存在;
若所述相似度不在预设范围内,则判定为所述元件不存在。
可以理解,由于所述相似度是用于表征模板图像与测试图像的相似程度,所以当相似度在预设范围内时,说明模板图像与测试图像相似,那么元件图像则存在,也就是元件不漏件,否则,元件漏件。
可选地,在本发明的一些可能的实施方式中,当所述相似度大于或等于预设值时,则元件存在,也就是元件不漏件;当所述相似度小于预设值时,则元件不存在。
可以理解的是,本实施例的检测装置400的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。
可以看出,本实施例的方案中,检测装置400将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;检测装置400计算所述模板图像与所述测试图像的特征向量的相似度;检测装置400根据所述相似度确定所述测试图像与所述模板图像是否匹配。由于Siamese网络可以提取到图像的高级特征,将图像输入经过训练后的Siamese网络可以准确地判断模板图像与测试图像是否匹配,判断准确率高。
参见图5,图5是本发明第五实施例提供的一种检测装置的结构示意图。如图5所示,本发明第五实施例提供一种检测装置500可以包括:至少一个总线501、与总线相连的至少一个处理器502以及与总线相连的至少一个存储器503。其中,处理器502通过总线501,调用存储器503中存储的代码以用于将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;计算所述模板图像与所述测试图像的特征向量的相似度;根据所述相似度确定所述测试图像与所述模板图像是否匹配。
其中,经过训练后的Siamese网络由于经过大量的样本图像的训练学习,具有了准确地对模板图像与测试图像进行图像匹配的能力。
其中,模板图像是用于对照的标准的图片,测试图像是通过与模板图像进行对照从而判断与模板图像是否匹配。
其中,相似度是用于判断模板图像与测试图像相似程序的参数。
可选地,在本发明的一些可能的实施方式中,所述模板图像为元件存在且处于标准位置时对应的元件图像,所述测试图像为需要进行测试的元件图像,所述处理器502根据所述相似度确定所述测试图像与所述模板图像是否匹配时,还用于:
根据所述相似度确定所述测试图像对应的元件是否存在。
其中,该模板图像可以为PCB模板图,从而与其对应输入的元件图像或测试图像也为PCB图像,该模板图也可以为从PCB图像上截取到的分别包含各个独立元件的图像,从而与其对应输入的测试图像也为包含各个独立元件的图像。
可选地,在本发明的一些可能的实施方式中,由于是对每个元件进行漏件检测,所以一般在Siamese网络中输入的模板图像为包含一个独立元件的图像,那么在训练阶段输入的元件图像也为从PCB图像上截取到的该位置的元件图像,在测试阶段输入的图像也为不同情况下从PCB图像上截取到的该位置的元件图像。
其中,所述相似度为对Siamese网络输入的两个图像的特征的相似情况的度量,并且由于经过训练后的Siamese网络能准备地识别不同场景下拍摄的元件图像是否漏件情况,所以可根据该相似度值判断元件是否漏件。
可选地,在本发明的一些可能的实施方式中,所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络之前,所述处理器502还用于:
利用模板匹配得到所述模板图像与所述测试图像中元件的位置并对所述模板图像与所述测试图像进行对齐;
对所述模板图像与所述测试图像进行归一化,以触发执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
可选地,在本发明的一些可能的实施方式中,所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络之前,所述处理器502还用于:
创建所述元件图像对正样本集合以及负样本集合,其中,所述正样本集合包括所述模板图像与所述元件存在时的所述元件图像构成的元件图像对,所述负样本集合包括所述模板图像与所述元件不存在时的所述元件图像构成的元件图像对,所述负样本集合还包括所述模板图像与其它元件存在时的元件图像构成的元件图像对;
利用所述正样本集合以及所述负样本集合训练所述Siamese网络,以触发执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
可选地,在本发明的一些可能的实施方式中,所述元件图像的正样本集合和负样本集合包括训练样本和测试样本。
其中,训练样本是指对Siamese网络进行训练,测试样本是指测试经过训练后的Siamese网络的效果,两者一起构成对Siamese网络的训练阶段的样本。
可选地,在本发明的一些可能的实施方式中,所述创建所述元件图像对正样本集合以及负样本集合时,所述处理器502具体用于:
采集印刷电路板图像;
以印刷电路板模板图像为参考,在所述印刷电路板图像上截取元件图像;
采集所述元件图像对正样本集合以及负样本集合。
可选地,在本发明的一些可能的实施方式中,可以在生产线上架设摄像头,批量采集不同型号的PCB板卡图像,并以板卡跟踪技术避免重复拍摄某一PCB板卡。这样每个型号的PCB板卡均包含多个图像样本,每个图像样本对应某一型号的某张PCB板卡,从而这样在获取到的PCB板卡上的元件图像也来自不同板卡上,保证样本不重复并且数量充分。
可选地,在本发明的一些可能的实施方式中,所述在所述印刷板电路上截取元件图像,所述处理器502具体用于:
利用印刷板图像上面的元件的位置信息自动截取元件图像。
可以理解,当知道元件的位置信息后,则可以根据该位置信息自动截取元件图像。
可选地,在本发明的一些可能的实施方式中,所述对元件图像进行标注,所述处理器502具体用于:
根据元件类别信息进行标注。
可选地,在本发明的另一些可能的实施方式中,也可以通过其它能对元件进行区分的方式对元件进行标注。
可选地,在本发明的一些可能的实施方式中,所述采集所述元件图像对正样本集合以及负样本集合之前,所述处理器502还用于:
利用模板匹配得到所述元件图像中元件的位置并对所述元件图像进行对齐;
对所述元件图像进行归一化,以触发执行所述采集所述元件图像对正样本集合以及负样本集合的步骤。
可选地,在本发明的一些可能的实施方式中,所述处理器502根据所述相似度确定所述测试图像对应的元件是否存在,所述处理器502具体用于:
判断所述相似度是否在预设范围内;
若所述相似度在预设范围内,则判定为所述元件存在;
若所述相似度不在预设范围内,则判定为所述元件不存在。
可以理解的是,本实施例的元件检测装置500的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。
可以理解的是,本实施例的检测装置500的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。
可以看出,本实施例的方案中,检测装置500将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;检测装置500计算所述模板图像与所述测试图像的特征向量的相似度;检测装置500根据所述相似度确定所述测试图像与所述模板图像是否匹配。由于Siamese网络可以提取到图像的高级特征,将图像输入经过训练后的Siamese网络可以准确地判断模板图像与测试图像是否匹配,判断准确率高。
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何检测方法的部分或全部步骤。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明的各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为嵌入式设备、个人计算机、 服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (12)

  1. 一种检测方法,其特征在于,所述方法包括:
    将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;
    计算所述模板图像与所述测试图像的特征向量的相似度;
    根据所述相似度确定所述测试图像与所述模板图像是否匹配。
  2. 根据权利要求1所述的方法,其特征在于,所述模板图像为元件存在且处于标准位置时对应的元件图像,所述测试图像为需要进行测试的元件图像,所述根据所述相似度确定所述测试图像与所述模板图像是否匹配,包括:
    根据所述相似度确定所述测试图像对应的元件是否存在。
  3. 根据权利要求2所述的方法,其特征在于,所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络之前,所述方法还包括:
    利用模板匹配得到所述模板图像与所述测试图像中元件的位置并对所述模板图像与所述测试图像进行对齐;
    对所述模板图像与所述测试图像进行归一化,以触发执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
  4. 根据权利要求2或3所述的方法,其特征在于,所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络之前,所述方法还包括:
    创建所述元件图像对正样本集合以及负样本集合,其中,所述正样本集合包括所述模板图像与所述元件存在时的所述元件图像构成的元件图像对,所述负样本集合包括所述模板图像与所述元件不存在时的所述元件图像构成的元件图像对,所述负样本集合还包括所述模板图像与其它元件存在时的元件图像构成的元件图像对;
    利用所述正样本集合以及所述负样本集合训练所述Siamese网络,以触发执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
  5. 根据权利要求4所述的方法,其特征在于,所述创建所述元件图像对正样本集合以及负样本集合,包括:
    采集印刷电路板图像;
    以印刷电路板模板图像为参考,在所述印刷电路板图像上截取元件图像;
    采集所述元件图像对正样本集合以及负样本集合。
  6. 根据权利要求5所述的方法,所述采集所述元件图像对正样本集合以及负样本集合之前,所述方法还包括:
    利用模板匹配得到所述元件图像中元件的位置并对所述元件图像进行对齐;
    对所述元件图像进行归一化,以触发执行所述采集所述元件图像对正样本集合以及负样本集合的步骤。
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述相似度确定所述测试图像对应的元件是否存在,包括:
    判断所述相似度是否在预设范围内;
    若所述相似度在预设范围内,则判定为所述元件存在;
    若所述相似度不在预设范围内,则判定为所述元件不存在。
  8. 一种检测装置,其特征在于,所述装置包括:
    图像输入模块,用于将模板图像与测试图像输入经过训练后的Siamese网络,并分别作前向计算得到所述模板图像与所述测试图像的特征向量;
    计算模块,用于计算所述模块图像与所述测试图像的特征向量的相似度;
    确定模块,用于根据所述相似度确定所述测试图像与所述模板图像是否匹配。
  9. 根据权利要求8所述的装置,其特征在于,所述模板图像为元件存在且处于标准位置时对应的元件图像,所述测试图像为需要进行测试的元件图像,所述确定模块具体用于:
    根据所述相似度确定所述测试图像对应的元件是否存在。
  10. 根据权利要求9所述的装置,其特征在于,所述装置还包括:
    预处理模块,用于利用模板匹配得到所述模板图像与所述测试图像中元件的位置并对所述模板图像与所述测试图像进行对齐;
    对所述模板图像与所述测试图像进行归一化,以触发所述图像输入模块执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
  11. 根据权利要求9或10所述的装置,其特征在于,所述装置还包括:
    样本创建模块,用于创建所述元件图像对正样本集合以及负样本集合,其中,所述正样本集合包括所述模板图像与所述元件存在时的所述元件图像构成 的元件图像对,所述负样本集合包括所述模板图像与所述元件不存在时的所述元件图像构成的元件图像对,所述负样本集合还包括所述模板图像与其它元件存在时的元件图像构成的元件图像对;
    训练模块,用于利用所述正样本集合以及所述负样本集合训练所述Siamese网络,以触发所述图像输入模块执行所述将所述模板图像与所述测试图像输入经过训练后的Siamese网络的步骤。
  12. 根据权利要求11所述的装置,其特征在于,所述样本创建模块包括:
    图像采集单元,用于采集印刷电路板图像;
    截取单元,用于以印刷电路板模板图像为参考,在所述印刷电路板图像上截取元件图像;
    样本采集单元,用于采集所述元件图像对正样本集合以及负样本集合。
PCT/CN2016/096551 2015-08-25 2016-08-24 一种检测方法及装置 WO2017032311A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510527486.9A CN105184778B (zh) 2015-08-25 2015-08-25 一种检测方法及装置
CN201510527486.9 2015-08-25

Publications (1)

Publication Number Publication Date
WO2017032311A1 true WO2017032311A1 (zh) 2017-03-02

Family

ID=54906831

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/096551 WO2017032311A1 (zh) 2015-08-25 2016-08-24 一种检测方法及装置

Country Status (2)

Country Link
CN (1) CN105184778B (zh)
WO (1) WO2017032311A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108171714A (zh) * 2017-11-13 2018-06-15 合肥阿巴赛信息科技有限公司 一种基于成对比较的骨折区域识别方法和系统
CN110443777A (zh) * 2018-10-09 2019-11-12 广东仙童智能机器人科技有限公司 一种pcb图像对位方法、装置和计算机存储介质
CN110782480A (zh) * 2019-10-15 2020-02-11 哈尔滨工程大学 一种基于在线模板预测的红外行人跟踪方法
CN112559342A (zh) * 2020-12-09 2021-03-26 上海米哈游天命科技有限公司 一种画面测试图像的获取方法、装置、设备及存储介质
CN112816474A (zh) * 2021-01-07 2021-05-18 武汉大学 一种基于目标感知的深度孪生网络高光谱视频目标跟踪方法

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105184778B (zh) * 2015-08-25 2018-04-24 广州视源电子科技股份有限公司 一种检测方法及装置
CN105957065A (zh) * 2016-04-21 2016-09-21 广州视源电子科技股份有限公司 元件漏检方法和系统
CN106251333B (zh) * 2016-07-13 2019-02-26 广州视源电子科技股份有限公司 元件反件检测方法和系统
CN106204602B (zh) * 2016-07-13 2019-02-01 广州视源电子科技股份有限公司 元件反件检测方法和系统
CN106530284A (zh) * 2016-10-21 2017-03-22 广州视源电子科技股份有限公司 基于图像识别的焊点类型检测和装置
CN106650630B (zh) * 2016-11-11 2019-08-23 纳恩博(北京)科技有限公司 一种目标跟踪方法及电子设备
CN106909625A (zh) * 2017-01-20 2017-06-30 清华大学 一种基于Siamese网络的图像检索方法及系统
CN107220277A (zh) * 2017-04-14 2017-09-29 西北大学 基于手绘草图的图像检索算法
CN107967255A (zh) * 2017-11-08 2018-04-27 北京广利核系统工程有限公司 一种判定文本相似性的方法和系统
CN108171184B (zh) * 2018-01-03 2020-04-10 南京理工大学 基于Siamese网络的用于行人重识别的方法
CN108399382A (zh) * 2018-02-13 2018-08-14 阿里巴巴集团控股有限公司 车险图像处理方法和装置
CN108665485B (zh) * 2018-04-16 2021-07-02 华中科技大学 一种基于相关滤波与孪生卷积网络融合的目标跟踪方法
CN108846358B (zh) * 2018-06-13 2021-10-26 浙江工业大学 一种基于孪生网络进行特征融合的目标跟踪方法
CN108830850B (zh) * 2018-06-28 2020-10-23 信利(惠州)智能显示有限公司 自动光学检测图片分析方法及设备
CN109002784B (zh) * 2018-06-29 2021-04-13 国信优易数据股份有限公司 街景识别方法和系统
CN108960258A (zh) * 2018-07-06 2018-12-07 江苏迪伦智能科技有限公司 一种基于自学习深度特征的模板匹配方法
CN108918536B (zh) * 2018-07-13 2021-01-26 广东工业大学 轮胎模具表面字符缺陷检测方法、装置、设备及存储介质
CN109344661B (zh) * 2018-09-06 2023-05-30 南京聚铭网络科技有限公司 一种基于机器学习的微代理的网页防篡改方法
CN109543057A (zh) * 2018-11-20 2019-03-29 广州逗号智能零售有限公司 基于智能收银台的商品识别方法、装置、设备及存储介质
CN109670073B (zh) * 2018-12-20 2021-03-23 科大讯飞股份有限公司 一种信息转换方法及装置、交互辅助系统
CN109767456A (zh) * 2019-01-09 2019-05-17 上海大学 一种基于SiameseFC框架和PFP神经网络的目标跟踪方法
CN113012088A (zh) * 2019-12-03 2021-06-22 浙江大搜车软件技术有限公司 一种电路板故障检测及孪生网络的训练方法、装置和设备
CN110967851B (zh) * 2019-12-26 2022-06-21 成都数之联科技股份有限公司 一种液晶面板array图像的线路提取方法及系统
CN111524162B (zh) * 2020-04-15 2022-04-01 上海摩象网络科技有限公司 一种跟踪目标的找回方法、设备及手持相机
CN111914508A (zh) * 2020-08-19 2020-11-10 创新奇智(南京)科技有限公司 元器件检测方法、装置、电子设备及可读存储介质
TWI772181B (zh) * 2021-09-14 2022-07-21 台達電子工業股份有限公司 電路板抓取位置的自動辨識系統與自動辨識方法
CN114619591B (zh) * 2022-05-16 2022-08-26 河南源宏高分子新材料有限公司 一种高分子材料再生过程中的分拣工艺
WO2024044915A1 (zh) * 2022-08-29 2024-03-07 西门子股份公司 用于错误检测的图像比较的方法、装置、计算机设备
CN115546219B (zh) * 2022-12-05 2023-10-20 广州镭晨智能装备科技有限公司 检测板式生成方法、板卡缺陷检测方法、装置及产品
CN116026859B (zh) * 2023-01-30 2023-12-12 讯芸电子科技(中山)有限公司 一种光电子模块的安装检测方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020102018A1 (en) * 1999-08-17 2002-08-01 Siming Lin System and method for color characterization using fuzzy pixel classification with application in color matching and color match location
CN103065135A (zh) * 2013-01-25 2013-04-24 上海理工大学 基于数字图像处理的车牌号码匹配算法
CN103310453A (zh) * 2013-06-17 2013-09-18 北京理工大学 一种基于子图像角点特征的快速图像配准方法
CN105184778A (zh) * 2015-08-25 2015-12-23 广州视源电子科技股份有限公司 一种检测方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464946B (zh) * 2009-01-08 2011-05-18 上海交通大学 基于头部识别和跟踪特征的检测方法
CN103679158B (zh) * 2013-12-31 2017-06-16 北京天诚盛业科技有限公司 人脸认证方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020102018A1 (en) * 1999-08-17 2002-08-01 Siming Lin System and method for color characterization using fuzzy pixel classification with application in color matching and color match location
CN103065135A (zh) * 2013-01-25 2013-04-24 上海理工大学 基于数字图像处理的车牌号码匹配算法
CN103310453A (zh) * 2013-06-17 2013-09-18 北京理工大学 一种基于子图像角点特征的快速图像配准方法
CN105184778A (zh) * 2015-08-25 2015-12-23 广州视源电子科技股份有限公司 一种检测方法及装置

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108171714A (zh) * 2017-11-13 2018-06-15 合肥阿巴赛信息科技有限公司 一种基于成对比较的骨折区域识别方法和系统
CN108171714B (zh) * 2017-11-13 2021-09-21 广东三维家信息科技有限公司 一种基于成对比较的骨折区域识别方法和系统
CN110443777A (zh) * 2018-10-09 2019-11-12 广东仙童智能机器人科技有限公司 一种pcb图像对位方法、装置和计算机存储介质
CN110443777B (zh) * 2018-10-09 2023-03-10 广东仙童智能机器人科技有限公司 一种pcb图像对位方法、装置和计算机存储介质
CN110782480A (zh) * 2019-10-15 2020-02-11 哈尔滨工程大学 一种基于在线模板预测的红外行人跟踪方法
CN110782480B (zh) * 2019-10-15 2023-08-04 哈尔滨工程大学 一种基于在线模板预测的红外行人跟踪方法
CN112559342A (zh) * 2020-12-09 2021-03-26 上海米哈游天命科技有限公司 一种画面测试图像的获取方法、装置、设备及存储介质
CN112816474A (zh) * 2021-01-07 2021-05-18 武汉大学 一种基于目标感知的深度孪生网络高光谱视频目标跟踪方法

Also Published As

Publication number Publication date
CN105184778A (zh) 2015-12-23
CN105184778B (zh) 2018-04-24

Similar Documents

Publication Publication Date Title
WO2017032311A1 (zh) 一种检测方法及装置
WO2017088553A1 (zh) 电子元件极性方向的快速识别、标注的方法和系统
WO2020248387A1 (zh) 基于多路摄像的人脸识别方法、装置、终端及存储介质
WO2017088537A1 (zh) 一种元件分类方法及装置
CN108961236A (zh) 电路板缺陷检测模型的训练方法及装置、检测方法及装置
CN111078908A (zh) 一种数据标注的检测方法和装置
WO2018068418A1 (zh) 元件安装状态检测方法和系统
WO2022151658A1 (zh) 一种缺陷检测方法、装置、计算机设备及计算机可读存储介质
CN108229480A (zh) 一种数字表读数的识别方法、装置及设备
CN102324042B (zh) 视觉识别系统及视觉识别方法
CN109918523B (zh) 一种基于yolo9000算法的电路板元器件检测方法
CN110533654A (zh) 零部件的异常检测方法及装置
TW201317904A (zh) 標籤檢測系統、裝置及其檢測標籤的方法
CN110969045B (zh) 一种行为检测方法、装置、电子设备和存储介质
CN113763348A (zh) 图像质量确定方法、装置、电子设备及存储介质
CN112559341A (zh) 一种画面测试方法、装置、设备及存储介质
CN110046085A (zh) 识别终端设备上显示的应用程序控件的方法及装置
CN115775246A (zh) 一种pcb元器件缺陷检测的方法
WO2022105027A1 (zh) 图像识别方法、系统、电子设备及存储介质
CN113138916A (zh) 基于标注样本的图片结构化算法的自动测试方法及系统
CN112215222A (zh) 车牌识别方法、装置、设备及存储介质
CN113763466A (zh) 一种回环检测方法、装置、电子设备和存储介质
CN116128853A (zh) 一种产线装配检测方法、系统、计算机及可读存储介质
CN111935480B (zh) 一种用于图像获取装置的检测方法及相关装置
CN103020601B (zh) 高压线视觉检测方法和装置

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: 16838569

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: 16838569

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16838569

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29/01/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16838569

Country of ref document: EP

Kind code of ref document: A1