[go: up one dir, main page]

US11189019B2 - Method for detecting defects, electronic device, and computer readable medium - Google Patents

Method for detecting defects, electronic device, and computer readable medium Download PDF

Info

Publication number
US11189019B2
US11189019B2 US16/539,031 US201916539031A US11189019B2 US 11189019 B2 US11189019 B2 US 11189019B2 US 201916539031 A US201916539031 A US 201916539031A US 11189019 B2 US11189019 B2 US 11189019B2
Authority
US
United States
Prior art keywords
image
sub
model
images
similar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active, expires
Application number
US16/539,031
Other versions
US20200357106A1 (en
Inventor
Jung-Yi Lin
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hon Hai Precision Industry Co Ltd
Original Assignee
Hon Hai Precision Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Precision Industry Co Ltd filed Critical Hon Hai Precision Industry Co Ltd
Assigned to HON HAI PRECISION INDUSTRY CO., LTD. reassignment HON HAI PRECISION INDUSTRY CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: LIN, JUNG-YI
Publication of US20200357106A1 publication Critical patent/US20200357106A1/en
Application granted granted Critical
Publication of US11189019B2 publication Critical patent/US11189019B2/en
Active legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • G06K9/6202
    • G06K9/6215
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Definitions

  • the disclosure generally relates to quality control.
  • defects can be detected by analyzing an image of an object.
  • a size of the defect may be far less than a size of the object, and if the image of the object is obtained by a camera with low resolution, the defect may be not rendered in clarity due to insufficient resolution.
  • the image of the object is obtained by a camera with high resolution, the amount of computation of the convolutional neural network (CNN) model is large, and completing image processing is very difficult due to hardware conditions. For example, when an image is resolved using the CNN model, the image is compressed to a smaller resolution, such as 224*224, at which point the defect may become unreadable on the image, making distinguishing and analyzing the defect in the image difficult.
  • CNN convolutional neural network
  • FIG. 1 is a block diagram illustrating an embodiment of an electronic device.
  • FIG. 2 is a block diagram illustrating an embodiment of a defect detecting system in the device of FIG. 1 .
  • FIG. 3 is a flowchart illustrating an embodiment of a method for detecting defects.
  • FIG. 1 illustrates an embodiment of an electronic device 1 .
  • the electronic device 1 can include a processor 10 , a storage device 20 , and a communication device 30 .
  • the storage device 20 and the communication device 30 are connected to the processor 11 .
  • the electronic device 1 can be a computer, a server, or a controller.
  • the processor 10 can be more than one.
  • the processor 10 may include one or more central processors (CPU), a microprocessor, a digital processing chip, a graphics processor, or a combination of various control chips.
  • CPU central processors
  • microprocessor a microprocessor
  • digital processing chip a graphics processor
  • graphics processor a combination of various control chips.
  • the processor 10 is a control unit of the electronic device 1 .
  • the processor 10 can be configured to run or execute programs or modules stored in the storage device 20 , as well as the data stored in the storage device 20 , to execute the defect detection system 100 (see FIG. 2 ).
  • the storage device 20 stores various types of data in the electronic device 10 , such as program codes and the like.
  • the storage device 20 can be, but is not limited to, read-only memory (ROM), random-access memory (RAM), programmable read-only memory (PROM), erasable programmable ROM (EPROM), one-time programmable read-only memory (OTPROM), electrically EPROM (EEPROM), compact disc read-only memory (CD-ROM), hard disk, solid state drive, or other forms of electronic, electromagnetic, or optical recording medium.
  • the communicating device 30 can communicate with an image obtaining device, or other electronic devices, wirelessly or by wires.
  • the electronic device 1 may include more or less components than those illustrated, or combine some components, or be otherwise different.
  • the electronic device 1 may also include input and output devices, network access devices, buses, and the like.
  • FIG. 2 shows the defect detecting system 100 running in the electronic device 1 .
  • the defect detecting system 1 may include a plurality of modules, which are a collection of software instructions stored in the storage device 20 and executable by the processor 10 .
  • the defect detecting system 100 can include an acquiring module 101 , an image processing module 102 , a similarity judgment module 103 , a defect detecting module 104 , and a determining module 105 .
  • the acquiring module 101 acquires an image of an object under test.
  • the image processing module 102 divides the image of the object into a plurality of sub-images. Each sub-image is a small-sized image that can be used for machine learning.
  • the similarity judgment module 103 determines whether and how much each of the sub-images is similar to a preset template image, by using a first model.
  • the template image is an image of an object without defects.
  • the template image can be a normal image determined to be showing a flawless object after detecting for test the same or identical object.
  • the template image can be one or more.
  • the similarity judgment module 103 matches the sub-image with a template image, and then determines whether the sub-image is similar to the matched template image.
  • the first model is a similarity judgment model.
  • the similarity judgment model includes a formula for calculating similarities between two images. For example, the formula calculates the number of pixels which are same in the two images, and then calculates the similarity between the two images.
  • the first model is a Convolutional Neural Network (CNN) model or other neural network model, such as a VGG model, a ResNet model, and the like.
  • CNN Convolutional Neural Network
  • the similarity judgment module 103 matches the sub-image with a template image, obtains a similarity value of the sub-image by using the first model, and then determines whether the similarity value is greater than a preset value. If the similarity value is greater, the similarity judgment module 103 determines that the sub-image is sufficiently similar to the template image. If not, the similarity judgment module 103 determines that the sub-image is not similar.
  • the defect detecting module 104 detects whether one or more defects appear within the sub-image by using a second model.
  • the second model can be a CNN model.
  • the defect detecting module 104 is configured to detect the sub-image which shows an object not similar to that of the template image.
  • the determining module 105 determines whether the test object has a defect according to the determination by the similarity judgment module 103 or by the defect detecting module 104 .
  • the similarity judgment module 103 determines that a sub-image shows sufficient similarity to the template image
  • the determining module 105 determines that the object being tested is flawless.
  • the defect detecting module 104 determines that no defect exists in the sub-image
  • the determining module 105 determines that the test object is flawless.
  • FIG. 3 A defect detecting method is illustrated in FIG. 3 .
  • the method is provided by way of embodiments, as there are a variety of ways to carry out the method.
  • Each block shown in FIG. 3 represents one or more processes, methods, or subroutines carried out in the example method. Additionally, the illustrated order of blocks is by example only and the order of the blocks can be changed.
  • the method can begin at block S 301 .
  • the acquiring module 101 acquires the image of the test object.
  • the image of the test object can be a large size image file with high resolution.
  • the image of the test object is divided into a plurality of sub-images.
  • the image processing module 102 divides the large image of the test object into a plurality of sub-images, thereby the sub-images can be tested separately.
  • the sub-image can be a small sized image file that can be used for machine learning.
  • the process at block S 302 includes searching for an effective edge or boundary of the image of the test object, distinguishing a detection area and a non-detection area of the image according to the effective edge, and then dividing the detection area into the plurality of sub-images.
  • searching for an effective edge or boundary of the image of the test object distinguishing a detection area and a non-detection area of the image according to the effective edge, and then dividing the detection area into the plurality of sub-images.
  • the image of the object may be evenly divided into a plurality of images to be tested according to a size of a preset template image.
  • the similarity judgment module 103 determines, by using the first model, whether a sub-image matches or is similar to a template image.
  • the template image is an image of the object without defects.
  • the first model is a similarity judgment model.
  • the similarity judgment model includes a formula for calculating similarities between images. For example, the formula is used to calculate the number of pixels which are same in two images, and then calculate the similarity between the two images.
  • the first model is a CNN model or other neural network models, such as a VGG model, a ResNet model, or the like.
  • the process at block S 303 includes matching the sub-image against the template image; acquiring a similarity value between the sub-image and the template image by using the first model; and determining whether the similarity value is greater than a preset threshold. If the similarity value is greater than or equal to the preset value, it is determined that the sub-image is similar to the preset template image. If the similarity value is not greater than the preset value, it is determined that the sub-image is not similar to the preset template image.
  • each sub-image is similar to a template image, the process proceeds to block S 304 . If any of the sub-images is not similar to a template image, the process proceeds to block S 305 .
  • the determining module 105 determines that the test object has no defect.
  • the defect detecting module 104 determine whether at least one defect is shown to exist within a sub-image which is not similar to a template image.
  • the second model can be a neural network model.
  • the second model may be a CNN model. It can be understood that the second model can also be other neural network models, such as a VGG model, a ResNet model, or the like.
  • the defect detection module 104 determines that at least one defect exists within the sub-image, then the process proceeds to block S 306 , where it is determined that the test object has at least one defect. If not, it is determined that the test object has no defect.
  • the above defect detecting method can detect flaws in the object by analyzing the image of the object.
  • the method firstly determines whether the sub-image is similar to a template image. If each sub-image is similar to a template image, the image is directly determined to be an image of a flawless object and there is no need to use the second model. Since the amount of calculation of the first model is smaller than the amount of the second model, the method improves the efficiency of defect detection. Moreover, for a large-sized object to be tested, at least some of the sub-images are very similar, and the similarity judgment is performed by the first model, which saves detection time and further improves efficiency of the defect detection.
  • the above disclosure is suitable for a large-sized object to be tested at a high resolution, and does not need to reduce the resolution of the image of the object to be tested. Therefore, the above method has a wider application range.
  • each functional device in each embodiment may be integrated in one processor, or each device may exist physically separately, or two or more devices may be integrated in one device.
  • the above integrated device can be implemented in the form of hardware or in the form of hardware plus software function modules.

Landscapes

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

Abstract

A method for detecting defects in manufactured objects includes acquiring a high-resolution image of an object for test, dividing the image into a plurality of smaller sub-images and determining, by a first model, whether each of the small sub-images is similar to a preset template image. The test object is determined to be flawless, when each of the sub-images is found to be similar to a template image. When sub-images are not found sufficiently similar to template images, determining, by a second model, whether a defect is shown to exist within each sub-image, and if so the test object is declared defective. The longer application of the second model is only applied if testing for defects is not resolved by the application of the first model. An electronic device and a computer readable storage medium are also provided.

Description

FIELD
The disclosure generally relates to quality control.
BACKGROUND
At present, defects can be detected by analyzing an image of an object. A size of the defect may be far less than a size of the object, and if the image of the object is obtained by a camera with low resolution, the defect may be not rendered in clarity due to insufficient resolution. If the image of the object is obtained by a camera with high resolution, the amount of computation of the convolutional neural network (CNN) model is large, and completing image processing is very difficult due to hardware conditions. For example, when an image is resolved using the CNN model, the image is compressed to a smaller resolution, such as 224*224, at which point the defect may become unreadable on the image, making distinguishing and analyzing the defect in the image difficult.
BRIEF DESCRIPTION OF THE DRAWINGS
Implementations of the present technology will now be described, by way of embodiments, with reference to the attached figures.
FIG. 1 is a block diagram illustrating an embodiment of an electronic device.
FIG. 2 is a block diagram illustrating an embodiment of a defect detecting system in the device of FIG. 1.
FIG. 3 is a flowchart illustrating an embodiment of a method for detecting defects.
DETAILED DESCRIPTION
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features. The description is not to be considered as limiting the scope of the embodiments described herein.
The term “comprising” means “including, but not necessarily limited to”, it specifically indicates open-ended inclusion or membership in a so-described combination, group, series, and the like.
FIG. 1 illustrates an embodiment of an electronic device 1. The electronic device 1 can include a processor 10, a storage device 20, and a communication device 30. The storage device 20 and the communication device 30 are connected to the processor 11. The electronic device 1 can be a computer, a server, or a controller. The processor 10 can be more than one.
The processor 10 may include one or more central processors (CPU), a microprocessor, a digital processing chip, a graphics processor, or a combination of various control chips.
The processor 10 is a control unit of the electronic device 1. The processor 10 can be configured to run or execute programs or modules stored in the storage device 20, as well as the data stored in the storage device 20, to execute the defect detection system 100 (see FIG. 2).
The storage device 20 stores various types of data in the electronic device 10, such as program codes and the like. The storage device 20 can be, but is not limited to, read-only memory (ROM), random-access memory (RAM), programmable read-only memory (PROM), erasable programmable ROM (EPROM), one-time programmable read-only memory (OTPROM), electrically EPROM (EEPROM), compact disc read-only memory (CD-ROM), hard disk, solid state drive, or other forms of electronic, electromagnetic, or optical recording medium.
The communicating device 30 can communicate with an image obtaining device, or other electronic devices, wirelessly or by wires.
The electronic device 1 may include more or less components than those illustrated, or combine some components, or be otherwise different. For example, the electronic device 1 may also include input and output devices, network access devices, buses, and the like.
FIG. 2 shows the defect detecting system 100 running in the electronic device 1. The defect detecting system 1 may include a plurality of modules, which are a collection of software instructions stored in the storage device 20 and executable by the processor 10. In the embodiment as disclosed, the defect detecting system 100 can include an acquiring module 101, an image processing module 102, a similarity judgment module 103, a defect detecting module 104, and a determining module 105.
The acquiring module 101 acquires an image of an object under test.
The image processing module 102 divides the image of the object into a plurality of sub-images. Each sub-image is a small-sized image that can be used for machine learning.
The similarity judgment module 103 determines whether and how much each of the sub-images is similar to a preset template image, by using a first model. The template image is an image of an object without defects. For example, the template image can be a normal image determined to be showing a flawless object after detecting for test the same or identical object. The template image can be one or more. When the number of the template images is multiple, the similarity judgment module 103 matches the sub-image with a template image, and then determines whether the sub-image is similar to the matched template image.
In at least one embodiment, the first model is a similarity judgment model. The similarity judgment model includes a formula for calculating similarities between two images. For example, the formula calculates the number of pixels which are same in the two images, and then calculates the similarity between the two images.
In an other embodiment, the first model is a Convolutional Neural Network (CNN) model or other neural network model, such as a VGG model, a ResNet model, and the like.
The similarity judgment module 103 matches the sub-image with a template image, obtains a similarity value of the sub-image by using the first model, and then determines whether the similarity value is greater than a preset value. If the similarity value is greater, the similarity judgment module 103 determines that the sub-image is sufficiently similar to the template image. If not, the similarity judgment module 103 determines that the sub-image is not similar.
The defect detecting module 104 detects whether one or more defects appear within the sub-image by using a second model. The second model can be a CNN model. In at least one embodiment, the defect detecting module 104 is configured to detect the sub-image which shows an object not similar to that of the template image.
The determining module 105 determines whether the test object has a defect according to the determination by the similarity judgment module 103 or by the defect detecting module 104. When the similarity judgment module 103 determines that a sub-image shows sufficient similarity to the template image, the determining module 105 determines that the object being tested is flawless. When the defect detecting module 104 determines that no defect exists in the sub-image, the determining module 105 determines that the test object is flawless.
A defect detecting method is illustrated in FIG. 3. The method is provided by way of embodiments, as there are a variety of ways to carry out the method. Each block shown in FIG. 3 represents one or more processes, methods, or subroutines carried out in the example method. Additionally, the illustrated order of blocks is by example only and the order of the blocks can be changed. The method can begin at block S301.
At block S301, an image of the test object is acquired.
The acquiring module 101 acquires the image of the test object. The image of the test object can be a large size image file with high resolution.
At block S302, the image of the test object is divided into a plurality of sub-images.
The image processing module 102 divides the large image of the test object into a plurality of sub-images, thereby the sub-images can be tested separately. The sub-image can be a small sized image file that can be used for machine learning.
In at least one embodiment, the process at block S302 includes searching for an effective edge or boundary of the image of the test object, distinguishing a detection area and a non-detection area of the image according to the effective edge, and then dividing the detection area into the plurality of sub-images. When the size of the object to be tested is large and relatively uniform, at least some of sub-images will be extremely similar.
In at least one embodiment, the image of the object may be evenly divided into a plurality of images to be tested according to a size of a preset template image.
At block S303, a determination is made as to whether each of the plurality of sub-images is similar to a preset template image by using a first model.
The similarity judgment module 103 determines, by using the first model, whether a sub-image matches or is similar to a template image. The template image is an image of the object without defects.
In at least one embodiment, the first model is a similarity judgment model. The similarity judgment model includes a formula for calculating similarities between images. For example, the formula is used to calculate the number of pixels which are same in two images, and then calculate the similarity between the two images.
In another embodiment, the first model is a CNN model or other neural network models, such as a VGG model, a ResNet model, or the like.
In at least one embodiment, the process at block S303 includes matching the sub-image against the template image; acquiring a similarity value between the sub-image and the template image by using the first model; and determining whether the similarity value is greater than a preset threshold. If the similarity value is greater than or equal to the preset value, it is determined that the sub-image is similar to the preset template image. If the similarity value is not greater than the preset value, it is determined that the sub-image is not similar to the preset template image.
If each sub-image is similar to a template image, the process proceeds to block S304. If any of the sub-images is not similar to a template image, the process proceeds to block S305.
At block S304, it is determined that the test object has no defect.
When each image to be tested is similar to a template image, the determining module 105 determines that the test object has no defect.
At block S305, a determination is made as to whether a defect exists within the sub-image by using a second model.
The defect detecting module 104 determine whether at least one defect is shown to exist within a sub-image which is not similar to a template image.
The second model can be a neural network model. In this embodiment, the second model may be a CNN model. It can be understood that the second model can also be other neural network models, such as a VGG model, a ResNet model, or the like.
If the defect detection module 104 determines that at least one defect exists within the sub-image, then the process proceeds to block S306, where it is determined that the test object has at least one defect. If not, it is determined that the test object has no defect.
The above defect detecting method can detect flaws in the object by analyzing the image of the object. The method firstly determines whether the sub-image is similar to a template image. If each sub-image is similar to a template image, the image is directly determined to be an image of a flawless object and there is no need to use the second model. Since the amount of calculation of the first model is smaller than the amount of the second model, the method improves the efficiency of defect detection. Moreover, for a large-sized object to be tested, at least some of the sub-images are very similar, and the similarity judgment is performed by the first model, which saves detection time and further improves efficiency of the defect detection.
The above disclosure is suitable for a large-sized object to be tested at a high resolution, and does not need to reduce the resolution of the image of the object to be tested. Therefore, the above method has a wider application range.
A person skilled in the art can understand that all or part of the processes in the above embodiments can be implemented by a computer program to instruct related hardware, and that the program can be stored in a computer readable storage medium. When the program is executed, a flow of steps of the methods as described above may be included.
In addition, each functional device in each embodiment may be integrated in one processor, or each device may exist physically separately, or two or more devices may be integrated in one device. The above integrated device can be implemented in the form of hardware or in the form of hardware plus software function modules.
It is believed that the present embodiments and their advantages will be understood from the foregoing description, and it will be apparent that various changes may be made thereto without departing from the spirit and scope of the disclosure or sacrificing all of its material advantages, the examples hereinbefore described merely being embodiments of the present disclosure.

Claims (16)

What is claimed is:
1. A defect detecting method comprising:
acquiring an image of a test object;
dividing the image of the test object evenly into a plurality of sub-images according to a size of a preset template image;
determining, by a first model, whether each of the plurality of sub-images is similar to the template image, wherein
if each of the plurality of sub-images is similar to the template image, determining that the test object has no defect, and
if any of the plurality of the sub-images is not similar to the template image, determining, by a second model, whether at least one defect exists within the sub-image; and determining that the test object comprise at least one defect if at least one defect exists within the sub-image, wherein the second model is different from the first model.
2. The defect detecting method of claim 1, wherein a process of determining whether each of the plurality of sub-images is similar the template image, comprises:
matching each of the plurality of sub-images against the template image;
obtaining a similarity value of each of the plurality of sub-images according to the first model;
determining whether the similarity value is greater than a preset value, wherein
determining that the sub-image is similar to the template image, if the similarity value is greater than or equal to the preset value, and
determining that the sub-image is not similar to the template image, if the similarity value is not greater than the preset value.
3. The defect detecting method of claim 1, wherein the first model is a similarity judgment model comprising a formula for calculating similarities between images, wherein the formula calculates a number of pixels which are same in two images, and then calculates the similarity value between the two images.
4. The defect detecting method of claim 1, wherein the first model is a convolutional neural network model.
5. The defect detecting method of claim 1, wherein the second model is a VGG model, or a ResNet model.
6. The defect detecting method of claim 1, wherein a process of dividing the image of the test object into a plurality of sub-images comprises:
searching for a boundary of the image of the test object;
distinguishing a detection area and a non-detection area of the image; and
dividing the detection area into the plurality of sub-images.
7. An electronic device, configured for detecting a defect on a surface of a detect object, comprising:
at least one processor;
at least one storage device storing one or more programs, when executed by the processor, the one or more programs cause the processor to:
acquire an image of a test object;
divide the image of the test object evenly into a plurality of sub-images according to a size of a preset template image;
determine, by a first model, whether each of the plurality of sub-images is similar to the template image, wherein
if each of the plurality of sub-images is similar to the template image, determine that the test object has no defect, and
if any of the plurality of the sub-images is not similar to the template image, determine, by a second model, whether at least one defect exists within the sub-image; and determine that the test object comprise at least one defect if at least one defect exists within the sub-image, wherein the second model is different from the first model.
8. The electronic device of claim 7, wherein a process of determining whether each of the sub-images is similar the template image, comprises:
matching each of the plurality of sub-images against the template image;
obtaining a similarity value of each of the plurality of sub-images according to the first model;
determining whether the similarity value is greater than a preset value, wherein
determining that the sub-image is similar to the template image, if the similarity value is greater than or equal to the preset value, and
determining that the sub-image is not similar to the template image, if the similarity value is not greater than the preset value.
9. The electronic device of claim 7, wherein the first model is a similarity judgment model comprising a formula for calculating image similarity, wherein the formula calculates a number of pixels which are same in two images, and then calculates the similarity value between the two images.
10. The electronic device of claim 7, wherein the first model is a convolutional neural network model.
11. The electronic device of claim 7, wherein the second model is a VGG model, or a ResNet model.
12. The electronic device of claim 7, wherein a process of dividing the image of the test object into a plurality of sub-images comprises:
searching for a boundary of the image of the test object;
distinguishing a detection area and a non-detection area of the image; and
dividing the detection area into the plurality of sub-images.
13. A non-transitory computer readable storage medium having stored thereon instructions that, when executed by at least one processor of a computing device, causes the processor to perform a defect detecting method, wherein the method comprises:
acquiring an image of a test object;
dividing the image of the test object evenly into a plurality of sub-images according to a size of a preset template image;
determining, by a first model, whether each of the plurality of sub-images is similar to the template image, wherein
if each of the plurality of sub-images is similar to the template image, determining that the test object has no defect, and
if any of the plurality of the sub-images is not similar to the template image, determining, by a second model, whether at least one defect exists within the sub-image; and
determining that the test object comprise at least one defect if at least one defect exists within the sub-image, wherein the second model is different from the first model.
14. The non-transitory computer readable storage medium of claim 13, wherein a process of determining whether each of the sub-images is similar the corresponding template image, comprises:
matching each of the plurality of sub-images against the template image;
obtaining a similarity value of each of the plurality of sub-images according to the first model;
determining whether the similarity value is greater than a preset value, wherein
determining that the sub-image is similar to the template image, if the similarity value is greater than or equal to the preset value, and
determining that the sub-image is not similar to the template image, if the similarity value is not greater than the preset value.
15. The non-transitory computer readable storage medium of claim 13, wherein the first model is a similarity judgment model, the second model is a convolutional neural network model.
16. The non-transitory computer readable storage medium of claim 13, wherein a process of dividing the image of the test object into a plurality of sub-images comprises:
searching for a boundary of the image of the test object;
distinguishing a detection area and a non-detection area of the image; and
dividing the detection area into the plurality of sub-images.
US16/539,031 2019-05-09 2019-08-13 Method for detecting defects, electronic device, and computer readable medium Active 2039-12-20 US11189019B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910385705.2A CN111915549A (en) 2019-05-09 2019-05-09 Defect detection method, electronic device and computer readable storage medium
CN201910385705.2 2019-05-09

Publications (2)

Publication Number Publication Date
US20200357106A1 US20200357106A1 (en) 2020-11-12
US11189019B2 true US11189019B2 (en) 2021-11-30

Family

ID=73045816

Family Applications (1)

Application Number Title Priority Date Filing Date
US16/539,031 Active 2039-12-20 US11189019B2 (en) 2019-05-09 2019-08-13 Method for detecting defects, electronic device, and computer readable medium

Country Status (2)

Country Link
US (1) US11189019B2 (en)
CN (1) CN111915549A (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7482662B2 (en) * 2020-03-25 2024-05-14 東京エレクトロン株式会社 Anomaly detection device and anomaly detection method
CN114820409B (en) * 2021-01-12 2025-04-22 富泰华工业(深圳)有限公司 Image anomaly detection method, device, electronic device and storage medium
CN113012097B (en) * 2021-01-19 2023-12-29 富泰华工业(深圳)有限公司 Image rechecking method, computer device and storage medium
CN114943855B (en) * 2021-02-09 2025-08-26 富泰华工业(深圳)有限公司 Image classification and annotation method, device, electronic device and storage medium
CN112950563A (en) * 2021-02-22 2021-06-11 深圳中科飞测科技股份有限公司 Detection method and device, detection equipment and storage medium
CN113920053A (en) * 2021-07-22 2022-01-11 杭州深想科技有限公司 Defect detection method based on deep learning, computing device and storage medium
CN113706465B (en) * 2021-07-22 2022-11-15 杭州深想科技有限公司 Pen defect detection method, computing device and storage medium based on deep learning
CN115705728B (en) * 2021-08-03 2025-09-30 鸿富锦精密工业(深圳)有限公司 Image processing method, computer device and storage medium
JP7669883B2 (en) * 2021-09-08 2025-04-30 トヨタ自動車株式会社 Inspection device, inspection method, and program
US12482089B2 (en) * 2021-11-12 2025-11-25 Future Dial, Inc. Grading cosmetic appearance of an electronic device
CN114897820B (en) * 2022-05-09 2025-09-09 珠海格力电器股份有限公司 Visual detection method, visual detection device, terminal and storage medium
CN115564778B (en) * 2022-12-06 2023-03-14 深圳思谋信息科技有限公司 Defect detection method and device, electronic equipment and computer readable storage medium
CN117456287B (en) * 2023-12-22 2024-03-12 天科院环境科技发展(天津)有限公司 A method of observing wildlife populations using remote sensing images
CN118298249B (en) * 2024-06-03 2024-08-13 成都数之联科技股份有限公司 A method, device, medium and equipment for characteristic analysis of scratch defect samples
CN119228735B (en) * 2024-08-22 2025-04-08 匠岭科技(上海)有限公司 Wafer detection method, device, storage medium and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070053580A1 (en) * 2005-09-05 2007-03-08 Akio Ishikawa Image defect inspection apparatus, image defect inspection system, defect classifying apparatus, and image defect inspection method
TW201504829A (en) 2013-07-31 2015-02-01 Alibaba Group Services Ltd Image search and method and device for acquiring image text information
TW201814244A (en) 2016-09-29 2018-04-16 日商日立全球先端科技股份有限公司 Pattern evaluation device and computer program
US20190096057A1 (en) * 2017-05-11 2019-03-28 Jacob Nathaniel Allen Object inspection system and method for inspecting an object
CN109829914A (en) * 2019-02-26 2019-05-31 视睿(杭州)信息科技有限公司 The method and apparatus of testing product defect
CN109949305A (en) * 2019-03-29 2019-06-28 北京百度网讯科技有限公司 Product surface defect detection method, device and computer equipment
US20200175324A1 (en) * 2018-11-30 2020-06-04 International Business Machines Corporation Segmentation of target areas in images

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105548216B (en) * 2016-01-15 2019-03-12 浙江野马电池有限公司 A kind of semi-finished product battery apparent visual detection method
CN106198569B (en) * 2016-08-03 2018-11-09 广东工业大学 A kind of LTPS/IGZO glass substrates broken hole rapid detection method
CN106504238A (en) * 2016-10-31 2017-03-15 成都交大光芒科技股份有限公司 Railway contact line defect inspection method based on image procossing and convolutional neural networks
CN107966444B (en) * 2017-10-12 2020-03-27 常州信息职业技术学院 Textile flaw detection method based on template
CN108355987B (en) * 2018-01-08 2019-10-11 西安交通大学 A quality detection method of battery silk screen printing based on block template matching
CN109613006A (en) * 2018-12-22 2019-04-12 中原工学院 A Fabric Defect Detection Method Based on End-to-End Neural Network
CN109671078B (en) * 2018-12-24 2022-11-01 广东理致技术有限公司 Method and device for detecting product surface image abnormity

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070053580A1 (en) * 2005-09-05 2007-03-08 Akio Ishikawa Image defect inspection apparatus, image defect inspection system, defect classifying apparatus, and image defect inspection method
TW201504829A (en) 2013-07-31 2015-02-01 Alibaba Group Services Ltd Image search and method and device for acquiring image text information
TW201814244A (en) 2016-09-29 2018-04-16 日商日立全球先端科技股份有限公司 Pattern evaluation device and computer program
US20190096057A1 (en) * 2017-05-11 2019-03-28 Jacob Nathaniel Allen Object inspection system and method for inspecting an object
US20200175324A1 (en) * 2018-11-30 2020-06-04 International Business Machines Corporation Segmentation of target areas in images
CN109829914A (en) * 2019-02-26 2019-05-31 视睿(杭州)信息科技有限公司 The method and apparatus of testing product defect
CN109949305A (en) * 2019-03-29 2019-06-28 北京百度网讯科技有限公司 Product surface defect detection method, device and computer equipment

Also Published As

Publication number Publication date
CN111915549A (en) 2020-11-10
US20200357106A1 (en) 2020-11-12

Similar Documents

Publication Publication Date Title
US11189019B2 (en) Method for detecting defects, electronic device, and computer readable medium
US10699400B2 (en) Image processing apparatus, image processing method, and storage medium
CN115690051B (en) PCB defect detection methods, devices, computer equipment and storage media
US9508006B2 (en) System and method for identifying trees
CN115861153A (en) Image detection method, computer device and storage medium
KR20220016245A (en) Apparatus and method for generating a defect image
US10679336B2 (en) Detecting method, detecting apparatus, and computer readable storage medium
CN113469944A (en) Product quality inspection method and device and electronic equipment
CN114494122A (en) Target object detection method, device, storage medium and electronic device
CN110619625A (en) Method, device and system for monitoring running state of belt and storage medium
CN112834518A (en) Particle defect detection method, system, device and medium
KR20230119842A (en) Method and apparatus for examining appearance faults of product based on artificial intelligence
CN109580632B (en) Defect determination method, device and storage medium
CN117218105B (en) Fuel nozzle spray angle measurement method and system based on visual recognition
Nguyen et al. Deep learning-enhanced defects detection for printed circuit boards
TWI748184B (en) Defect detecting method, electronic device, and computer readable storage medium
KR20210038211A (en) Method of inspection using image masking operation
JP2022182702A (en) Evaluation program, evaluation method, and information processor
KR20220026439A (en) Apparatus and method for checking whether a part is inserted in PCB
US20230096532A1 (en) Machine learning system, learning data collection method and storage medium
CN111709951B (en) Target detection network training method and system, network, device and medium
CN117474916B (en) Image detection method, electronic equipment and storage medium
CN119741716A (en) Wafer image detection method and device, electronic equipment and storage medium
CN117129480B (en) Intelligent detection method and device for computer main board components based on machine vision
CN113870754B (en) Method and system for judging defects of panel detection electronic signals

Legal Events

Date Code Title Description
AS Assignment

Owner name: HON HAI PRECISION INDUSTRY CO., LTD., TAIWAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:LIN, JUNG-YI;REEL/FRAME:050036/0302

Effective date: 20190813

FEPP Fee payment procedure

Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STPP Information on status: patent application and granting procedure in general

Free format text: NON FINAL ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED

STCF Information on status: patent grant

Free format text: PATENTED CASE

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 4