CN111415339B - Image defect detection method for complex texture industrial product - Google Patents

Image defect detection method for complex texture industrial product Download PDF

Info

Publication number
CN111415339B
CN111415339B CN202010185912.6A CN202010185912A CN111415339B CN 111415339 B CN111415339 B CN 111415339B CN 202010185912 A CN202010185912 A CN 202010185912A CN 111415339 B CN111415339 B CN 111415339B
Authority
CN
China
Prior art keywords
industrial product
image
detected
neural network
convolutional neural
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010185912.6A
Other languages
Chinese (zh)
Other versions
CN111415339A (en
Inventor
王涛
陈俊豪
程良伦
张俊华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202010185912.6A priority Critical patent/CN111415339B/en
Publication of CN111415339A publication Critical patent/CN111415339A/en
Application granted granted Critical
Publication of CN111415339B publication Critical patent/CN111415339B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

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

Abstract

The application discloses a method for detecting image defects of a complex texture industrial product, which comprises the following steps: acquiring an industrial product image to be detected; matching the to-be-detected industrial product image with a normal industrial product image in a preset database based on a mean value perception hash algorithm to obtain a first target image with a single background, wherein the normal industrial product image corresponds to the same industrial product as the to-be-detected industrial product image; the first target image is input into a preset convolutional neural network, and a detection result of an industrial product image to be detected is output, so that the technical problems of poor adaptability and low defect detection accuracy of the existing defect detection method under a complex scene are solved.

Description

Image defect detection method for complex texture industrial product
Technical Field
The application relates to the technical field of defect detection, in particular to a method for detecting image defects of a complex texture industrial product.
Background
In the actual production process, the industrial products are often affected by various factors such as industrial process technology, production equipment, production environment and the like, and therefore, certain damages, such as scratches, deformation and the like, of the quality of the industrial products are unavoidable. While an unacceptable product may lead to doubt of the product quality and reputation of the enterprise by the customer, which may lead to economic loss for the enterprise, it is necessary to implement real-time defects on the product in the actual production process.
The traditional defect detection is mainly carried out manually, and the defect detection is carried out on the product according to the experience of a inspector, so that the method is difficult to meet the current production speed requirement, and moreover, the inspector concentrates attention for a long time, so that the eye fatigue is extremely easy to generate to cause false detection or omission. In order to solve the problem, the prior art adopts an image processing technology to replace manual work, and the prior art adopts edge detection or gray level analysis and the like to detect defects, and the method has higher accuracy in a single scene, a single background and a quantitatively determined scene of a judgment rule, and has the problems of poor adaptability and low defect detection accuracy for scenes under complex conditions.
Disclosure of Invention
The application provides a method for detecting image defects of a complex texture industrial product, which is used for solving the technical problems of poor adaptability and low defect detection accuracy of the existing defect detection method under a complex scene.
In view of the above, the present application provides a method for detecting image defects of a complex texture industrial product, including:
acquiring an industrial product image to be detected;
matching the to-be-detected industrial product image with a normal industrial product image in a preset database based on a mean value perception hash algorithm to obtain a first target image with a single background, wherein the normal industrial product image and the to-be-detected industrial product image correspond to the same industrial product;
and inputting the first target image into a preset convolutional neural network, and outputting a detection result of the industrial product image to be detected.
Preferably, the matching the to-be-detected industrial product image with a normal industrial product image in a preset database based on the mean value perception hash algorithm to obtain a first target image with a single background includes:
a1: dividing the industrial product image to be detected into a plurality of target areas, and taking the target areas scaled to a preset size as a sensing hash check area to obtain a plurality of sensing images;
a2: calculating the gray average value of pixels of each gray perceived image, wherein the gray perceived images are obtained by carrying out gray conversion on the perceived images;
a3: comparing each pixel value in each gray-scale perceived image with the gray-scale average value corresponding to the gray-scale perceived image, and marking as 1 when the pixel value is larger than the gray-scale average value and as 0 when the pixel value is smaller than or equal to the gray-scale average value;
a4: combining 1 or 0 obtained by corresponding each gray level sensing image according to a preset sequence to obtain hash fingerprints of a plurality of industrial product images to be detected;
a5: returning the normal industrial product image serving as the industrial product image to be detected to the step A1 to obtain a plurality of hash fingerprints of the normal industrial product image;
a6: counting the number of different values of the hash fingerprints of the to-be-detected industrial product image and the hash fingerprints of the normal industrial product image at the same position;
a7: when the number is smaller than a preset threshold value, setting zero to the pixel points of the target area corresponding to the hash fingerprint of the industrial product image to be detected;
a8: and returning to the step A6, and obtaining the first target image with single background after all the hash fingerprint statistics are completed.
Preferably, the inputting the first target image into a preset convolutional neural network further includes:
establishing a database, wherein the database is used as the preset database, and comprises the normal industrial product image and the defective industrial product image;
matching the normal industrial product image and the defective industrial product image of the same industrial product in the database based on a mean value perception hash algorithm to obtain a second target image with single background;
inputting the second target image into a convolutional neural network, and training the convolutional neural network;
when the convolutional neural network reaches a convergence condition, obtaining the trained convolutional neural network, and taking the trained convolutional neural network as the preset convolutional neural network.
Preferably, the inputting the second target image into a convolutional neural network, and training the convolutional neural network further includes:
and preprocessing the second target image.
Preferably, the inputting the second target image into a convolutional neural network, and training the convolutional neural network further includes:
and pre-training the convolutional neural network.
Preferably, the preset convolutional neural network is an R-FCN network.
From the above technical scheme, the application has the following advantages:
the application provides a method for detecting image defects of a complex texture industrial product, which comprises the following steps: acquiring an industrial product image to be detected; matching the to-be-detected industrial product image with a normal industrial product image in a preset database based on a mean value perception hash algorithm to obtain a first target image with a single background, wherein the normal industrial product image corresponds to the same industrial product as the to-be-detected industrial product image; and inputting the first target image into a preset convolutional neural network, and outputting a detection result of the industrial product image to be detected.
According to the method for detecting the defects of the complex texture industrial product images, the average value perception hash algorithm is used for matching the industrial product images to be detected with the normal industrial product images in the preset database, the complex background area is processed, and the first target image with single background is obtained, so that the influence of the complex background on defect detection is avoided, and the defect detection accuracy is improved; the first target image with single background is input into a preset convolutional neural network for defect detection, and the convolutional neural network is used for defect detection, so that the adaptability is strong, and the defect detection problem of various products can be solved; the convolutional neural network has strong self-learning capability and can also have good detection performance on non-deterministic scenes with unquantifiable judgment rules, so that the technical problems of poor adaptability and low defect detection accuracy of the existing defect detection method under complex scenes are solved.
Drawings
FIG. 1 is a schematic flow chart of a method for detecting defects in an image of a complex texture industrial product according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of an image defect detection method for a complex texture industrial product according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an image defect detecting device for a complex texture industrial product according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
For ease of understanding, referring to fig. 1, an embodiment of a method for detecting defects in an image of a complex texture industrial product provided in the present application includes:
and 101, acquiring an image of the industrial product to be detected.
It should be noted that, an industrial product image to be detected of an industrial product to be detected may be obtained by an industrial camera.
Step 102, matching the to-be-detected industrial product image with a normal industrial product image in a preset database based on a mean value perception hash algorithm to obtain a first target image with a single background, wherein the normal industrial product image and the to-be-detected industrial product image correspond to the same industrial product.
The method is characterized in that an industrial product image to be detected is matched with a normal industrial product image of which the industrial product to be detected in the industrial product image to be detected is the same industrial product in a preset database through a mean value perception hash algorithm, so that a complex texture background is processed, and a first target image with a single background is obtained.
And step 103, inputting the first target image into a preset convolutional neural network, and outputting a detection result of the industrial product image to be detected.
It should be noted that the preset convolutional neural network may be a trained R-FCN network, a first target image with a single background is input into the preset convolutional neural network for defect detection, the obtained detection result includes that an industrial product to be detected in the industrial image to be detected is defective, the industrial product to be detected in the industrial image to be detected is not defective, and when the industrial product to be detected is defective, the preset convolutional neural network also outputs the type, the position and the confidence of the defect correspondingly.
According to the method for detecting the defects of the complex texture industrial product images, the average value perception hash algorithm is used for matching the industrial product images to be detected with the normal industrial product images in the preset database, the complex background area is processed, and the first target image with single background is obtained, so that the influence of the complex background on defect detection is avoided, and the defect detection accuracy is improved; the first target image with single background is input into a preset convolutional neural network for defect detection, and the convolutional neural network is used for defect detection, so that the adaptability is strong, and the defect detection problem of various products can be solved; the convolutional neural network has strong self-learning capability and can also have good detection performance on non-deterministic scenes with unquantifiable judgment rules, so that the technical problems of poor adaptability and low defect detection accuracy of the existing defect detection method under complex scenes are solved.
For ease of understanding, referring to fig. 2, another embodiment of a method for detecting defects in an image of a complex texture industrial product provided in the present application includes:
step 201, a database is established, and the database is used as a preset database.
It should be noted that, collecting normal industrial product images and defective industrial product images of the same industrial product, using the normal industrial product images and defective industrial product images of a plurality of industrial products to construct a database, and using the obtained database as a preset database.
Step 202, matching a normal industrial product image and a defective industrial product image of the same industrial product in a database based on a mean value perception hash algorithm to obtain a second target image with a single background.
It should be noted that, based on the mean value perception hash algorithm, the normal industrial product image and the defective industrial product image of the same industrial product in the database are matched, and the processing procedure of obtaining the second target image with single background is consistent with the processing procedure of obtaining the first target image with single background, so that detailed description of the specific processing procedure of obtaining the second target image with single background is omitted. And after all the normal industrial product images in the database are matched with the corresponding defective industrial product images, obtaining a plurality of second target images.
And 203, inputting the second target image into a convolutional neural network, and training the convolutional neural network.
It should be noted that, in the embodiment of the present application, the convolutional neural network is preferably an R-FCN network, that is, a full convolutional network based on a region, before the second target image is input to the R-FCN network, the second target image may be preprocessed, or the R-FCN network may be pretrained, the preprocessed second target image is input to the pretrained R-FCN network, the R-FCN network is retrained, 3 branches are on a feature map obtained by a last convolutional layer of the R-FCN network, and the first branch performs RPN operation on the feature map to obtain a corresponding region of interest, that is, an ROI, where RPN is a region proposal network; the 2 nd branch obtains a first position sensitive score mapping chart on the characteristic chart for classifying targets; the 3 rd branch obtains a second position sensitive score map on the feature map for target regression. And respectively executing position-sensitive ROI pooling operation on the first position-sensitive score mapping chart and the second position-sensitive score mapping chart to obtain the defect type, the type confidence coefficient and the position of the type of the object to be detected on the image.
And 204, obtaining a trained convolutional neural network when the convolutional neural network reaches a convergence condition, and taking the trained convolutional neural network as a preset convolutional neural network.
It should be noted that, the convergence condition may be that the number of iterations of training reaches a preset number of iterations, or that the training error is lower than the error threshold, and when the R-FCN network reaches the convergence condition, the training is stopped to obtain a trained R-FCN network, and the trained R-FCN network is used as a preset convolutional neural network for defect detection.
According to the embodiment of the application, the normal industrial product image and the defective industrial product image are matched through a mean value perception hash algorithm to obtain a second target image with a single background, and a complex texture image defect detection model with a strong generalization capability is trained through the second target image with the single background; the trained R-FCN network in the embodiment of the application can solve the defect detection of various products, and has certain self-adaptive capacity for various types and small samples of the flexible production line; and the method has better defect detection capability for non-deterministic scenes with complex detection background and unquantifiable judgment rules.
Step 205, obtaining an image of the industrial product to be detected.
It should be noted that, an industrial product image to be detected of an industrial product to be detected may be obtained by an industrial camera.
And 206, matching the to-be-detected industrial product image with a normal industrial product image in a preset database based on a mean value perception hash algorithm to obtain a first target image with a single background, wherein the normal industrial product image and the to-be-detected industrial product image correspond to the same industrial product.
The method is characterized in that an industrial product image to be detected is matched with a normal industrial product image of which the industrial product to be detected in the industrial product image to be detected is the same industrial product in a preset database through a mean value perception hash algorithm, so that a complex background is processed, and a first target image with a single background is obtained, wherein the specific process is as follows:
a1: dividing an industrial product image to be detected into a plurality of target areas, and taking the target areas scaled to a preset size as a sensing hash check area to obtain a plurality of sensing images.
In the embodiment of the application, the industrial product image to be detected is preferably divided into 49 target areas, each target area is scaled to 7*7, and the target area with the size of 7*7 is used as the sensing hash check area.
A2: and calculating the gray average value of pixels of each gray perceived image, wherein the gray perceived images are obtained by carrying out gray conversion on the perceived images.
And carrying out gray conversion on the obtained plurality of 7*7-sized perceived images to obtain a plurality of 7*7-sized gray perceived images, and then calculating the gray average value of 49 pixel points in each gray perceived image.
A3: and comparing each pixel value in each gray-scale perceived image with a gray-scale average value corresponding to the gray-scale perceived image, wherein the pixel value is marked as 1 when the pixel value is larger than the gray-scale average value, and the pixel value is marked as 0 when the pixel value is smaller than or equal to the gray-scale average value.
Each pixel in each 7*7-sized gray scale perceived image is compared with the gray scale average value corresponding to the gray scale perceived image, and is greater than the gray scale average value and is marked as 1, and is less than the gray scale average value and is marked as 0.
A4: and combining the 1 or 0 obtained by corresponding each gray level sensing image according to a preset sequence to obtain a plurality of hash fingerprints of the industrial product images to be detected.
And combining the 1 or 0 obtained by corresponding each gray level sensing image according to a preset sequence to obtain a plurality of hash fingerprints of the industrial product images to be detected.
A5: and (C) taking the normal industrial product image as an industrial product image to be detected, and returning to the step A1 to obtain hash fingerprints of a plurality of normal industrial product images.
And processing the normal industrial product images in the preset database as well as the industrial product images to be detected to obtain hash fingerprints of a plurality of normal industrial product images.
A6: and counting the number of different values of the hash fingerprint of the industrial product image to be detected and the hash fingerprint of the normal industrial product image at the same position.
Different hash fingerprints of the to-be-detected industrial product image correspond to different perceived hash check areas of the to-be-detected industrial product image, and different perceived hash check areas of the to-be-detected industrial product image correspond to different divided target areas; the hash fingerprints of each to-be-detected industrial product image and the hash fingerprints of each normal industrial product image can be counted to be the number of different values at the same position, but the speed is low, so that the counting speed is increased, the hash fingerprints of the to-be-detected industrial product image and the hash fingerprints of the to-be-detected industrial product image correspond to the same sensing hash check area, the hash fingerprints of the normal industrial product image at the same position can also be counted to be the number of different values, for example, the to-be-detected industrial product image has 3 sensing hash check areas, namely a first sensing hash check area, a second sensing hash check area and a third sensing hash check area, respectively, and the corresponding normal industrial product image also has 3 sensing hash check areas, namely the first sensing hash check area, the second sensing hash check area and the third sensing hash check area.
A7: and when the number is smaller than a preset threshold value, setting zero to the pixel points of the target area corresponding to the hash fingerprint of the industrial product image to be detected.
A8: returning to the step A6, and obtaining a first target image with a single background after all hash fingerprint statistics are completed.
Counting the number of the values of 49 identical positions in the hash fingerprints of the industrial product image to be detected and the hash fingerprints of the normal industrial product image as different values, if the number of the different values in the pair of hash fingerprints is smaller than 5, considering that the pair of hash fingerprints are similar, and zeroing the pixel points of the target area corresponding to the hash fingerprints of the industrial product image to be detected; if the number of different values in the pair of hash fingerprints is greater than or equal to 5, the pair of hash fingerprints are not similar, and the target area corresponding to the hash fingerprint of the industrial product image to be detected possibly has defects, so that the pixel points of the target area corresponding to the hash fingerprint of the industrial product image to be detected are reserved, and when all the hash fingerprints are counted, the industrial product image to be detected with single background, namely the first target image with single background, is obtained.
Step 207, inputting the first target image into a preset convolutional neural network, and outputting a detection result of the industrial product image to be detected.
It should be noted that, the first target image with a single background is input to the trained R-FCN network for detection, whether the industrial product to be detected has a defect is judged, if the industrial product to be detected has a defect, the R-FCN network correspondingly outputs the type, the position and the confidence of the defect, and if the industrial product to be detected does not have a defect, the industrial product to be detected in the image of the industrial product to be detected is judged to be normal. According to the embodiment of the application, the industrial product image to be detected and the corresponding normal industrial product image are matched, the defect characteristic region is extracted, and the region without defects is set to zero, so that the interference of complex texture background is avoided, the obtained first target image is input into the trained convolutional neural network for defect detection, the defect detection is avoided by manpower, and the speed and the accuracy of the defect detection are improved.
For ease of understanding, referring to fig. 3, an embodiment of an image defect detection apparatus for a complex texture industrial product provided in the present application includes:
an acquisition module 301, configured to acquire an image of an industrial product to be detected.
The first matching module 302 is configured to match the to-be-detected industrial product image with a normal industrial product image in a preset database based on a mean value perception hash algorithm, so as to obtain a first target image with a single background, where the normal industrial product image corresponds to the same industrial product as the to-be-detected industrial product image.
The detection module 303 is configured to input the first target image to a preset convolutional neural network, and output a detection result of the industrial product image to be detected.
Further, the first matching module 302 is specifically configured to:
a1: dividing an industrial product image to be detected into a plurality of target areas, and taking the target areas scaled to a preset size as a sensing hash check area to obtain a plurality of sensing images;
a2: calculating the gray average value of pixels of each gray perceived image, wherein the gray perceived images are obtained by carrying out gray conversion on perceived images;
a3: comparing each pixel value in each gray-scale perceived image with a gray-scale average value corresponding to the gray-scale perceived image, and marking as 1 when the pixel value is larger than the gray-scale average value and as 0 when the pixel value is smaller than or equal to the gray-scale average value;
a4: combining 1 or 0 obtained by corresponding each gray level sensing image according to a preset sequence to obtain hash fingerprints of a plurality of industrial product images to be detected;
a5: returning the normal industrial product image to the step A1 to obtain hash fingerprints of a plurality of normal industrial product images;
a6: counting the number of different values of the hash fingerprints of the industrial product image to be detected and the hash fingerprints of the normal industrial product image at the same position;
a7: when the number is smaller than a preset threshold value, setting zero pixel points of a target area corresponding to the hash fingerprint of the industrial product image to be detected;
a8: returning to the step A6, and obtaining a first target image with a single background after all hash fingerprint statistics are completed.
Further, the method further comprises the following steps:
the establishing module 304 is configured to establish a database, and take the database as a preset database, where the database includes a normal industrial product image and a defective industrial product image.
And the second matching module 305 is configured to match the normal industrial product image and the defective industrial product image of the same industrial product in the database based on the mean value perception hash algorithm, so as to obtain a second target image with a single background.
The training module 306 is configured to input the second target image into the convolutional neural network, and train the convolutional neural network.
And the convergence module 307 is configured to obtain a trained convolutional neural network when the convolutional neural network reaches a convergence condition, and take the trained convolutional neural network as a preset convolutional neural network.
Further, the method further comprises the following steps:
a preprocessing module 308, configured to preprocess the second target image.
A pre-training module 309, configured to pre-train the convolutional neural network.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to execute all or part of the steps of the methods described in the embodiments of the present application by a computer device (which may be a personal computer, a server, or a network device, etc.). And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (RandomAccess Memory, RAM), magnetic disk or optical disk, etc.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (5)

1. The method for detecting the image defects of the complex texture industrial product is characterized by comprising the following steps of:
acquiring an industrial product image to be detected;
matching the to-be-detected industrial product image with a normal industrial product image in a preset database based on a mean value perception hash algorithm to obtain a first target image with a single background, wherein the normal industrial product image and the to-be-detected industrial product image correspond to the same industrial product;
inputting the first target image into a preset convolutional neural network, and outputting a detection result of the industrial product image to be detected;
the average value perception hash algorithm is based on, the to-be-detected industrial product image is matched with a normal industrial product image in a preset database, and a first target image with a single background is obtained, and the method comprises the following steps:
a1: dividing the industrial product image to be detected into a plurality of target areas, and taking the target areas scaled to a preset size as a sensing hash check area to obtain a plurality of sensing images;
a2: calculating the gray average value of pixels of each gray perceived image, wherein the gray perceived images are obtained by carrying out gray conversion on the perceived images;
a3: comparing each pixel value in each gray-scale perceived image with the gray-scale average value corresponding to the gray-scale perceived image, and marking as 1 when the pixel value is larger than the gray-scale average value and as 0 when the pixel value is smaller than or equal to the gray-scale average value;
a4: combining 1 or 0 obtained by corresponding each gray level sensing image according to a preset sequence to obtain hash fingerprints of a plurality of industrial product images to be detected;
a5: returning the normal industrial product image serving as the industrial product image to be detected to the step A1 to obtain a plurality of hash fingerprints of the normal industrial product image;
a6: counting the number of different values of the hash fingerprints of the to-be-detected industrial product image and the hash fingerprints of the normal industrial product image at the same position;
a7: when the number is smaller than a preset threshold value, setting zero to the pixel points of the target area corresponding to the hash fingerprint of the industrial product image to be detected;
a8: and returning to the step A6, and obtaining the first target image with single background after all the hash fingerprint statistics are completed.
2. The method of claim 1, wherein said inputting the first target image into a preset convolutional neural network further comprises:
establishing a database, wherein the database is used as the preset database, and comprises the normal industrial product image and the defective industrial product image;
matching the normal industrial product image and the defective industrial product image of the same industrial product in the database based on a mean value perception hash algorithm to obtain a second target image with single background;
inputting the second target image into a convolutional neural network, and training the convolutional neural network;
when the convolutional neural network reaches a convergence condition, obtaining the trained convolutional neural network, and taking the trained convolutional neural network as the preset convolutional neural network.
3. The method for detecting image defects of a complex texture industrial product according to claim 2, wherein the step of inputting the second target image into a convolutional neural network, and training the convolutional neural network, further comprises the steps of:
and preprocessing the second target image.
4. The method for detecting image defects of a complex texture industrial product according to claim 2, wherein the step of inputting the second target image into a convolutional neural network, and training the convolutional neural network, further comprises the steps of:
and pre-training the convolutional neural network.
5. The method for detecting image defects of a complex texture industrial product according to claim 1, wherein the preset convolutional neural network is an R-FCN network.
CN202010185912.6A 2020-03-17 2020-03-17 Image defect detection method for complex texture industrial product Active CN111415339B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010185912.6A CN111415339B (en) 2020-03-17 2020-03-17 Image defect detection method for complex texture industrial product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010185912.6A CN111415339B (en) 2020-03-17 2020-03-17 Image defect detection method for complex texture industrial product

Publications (2)

Publication Number Publication Date
CN111415339A CN111415339A (en) 2020-07-14
CN111415339B true CN111415339B (en) 2023-05-09

Family

ID=71493037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010185912.6A Active CN111415339B (en) 2020-03-17 2020-03-17 Image defect detection method for complex texture industrial product

Country Status (1)

Country Link
CN (1) CN111415339B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112037214B (en) * 2020-09-08 2024-02-23 北京西管安通检测技术有限责任公司 Defect detection evaluation method and device, electronic equipment and storage medium
CN112182277A (en) * 2020-11-09 2021-01-05 成都优查科技有限公司 Method for matching aluminum template by image processing technology
CN113781396B (en) * 2021-08-11 2023-12-26 深圳市鑫信腾科技股份有限公司 Screen defect detection method, device, equipment and storage medium
CN115205288B (en) * 2022-09-14 2023-01-03 江苏智云天工科技有限公司 Industrial defect detection method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392234A (en) * 2017-07-05 2017-11-24 北京航空航天大学 A kind of body surface material kind identification method based on individual 4D light field image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190096057A1 (en) * 2017-05-11 2019-03-28 Jacob Nathaniel Allen Object inspection system and method for inspecting an object

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392234A (en) * 2017-07-05 2017-11-24 北京航空航天大学 A kind of body surface material kind identification method based on individual 4D light field image

Also Published As

Publication number Publication date
CN111415339A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN111415339B (en) Image defect detection method for complex texture industrial product
CN108009531B (en) Multi-strategy anti-fraud face recognition method
CN105067638B (en) Tire fetal membrane face character defect inspection method based on machine vision
CN106886216B (en) Robot automatic tracking method and system based on RGBD face detection
CN110728225B (en) High-speed face searching method for attendance checking
CN111091109B (en) Method, system and equipment for predicting age and gender based on face image
CN106920219A (en) Article defect detection method, image processing system and computer readable recording medium
CN116664559B (en) Machine vision-based memory bank damage rapid detection method
CN110310275B (en) Chain conveyor belt defect detection method based on image processing
CN111178252A (en) Multi-feature fusion identity recognition method
CN111968098A (en) Strip steel surface defect detection method, device and equipment
CN112784712B (en) Missing child early warning implementation method and device based on real-time monitoring
CN112862757A (en) Weight evaluation system based on computer vision technology and implementation method
CN111582359A (en) Image identification method and device, electronic equipment and medium
CN111223078B (en) Method for determining flaw level and storage medium
CN111178405A (en) Similar object identification method fusing multiple neural networks
CN113095445B (en) Target identification method and device
CN114155226A (en) Micro defect edge calculation method
CN116385440B (en) Visual detection method for arc-shaped blade
CN116523916A (en) Product surface defect detection method and device, electronic equipment and storage medium
CN116228659A (en) Visual detection method for oil leakage of EMS trolley
CN114821187A (en) Image anomaly detection and positioning method and system based on discriminant learning
CN114821035A (en) Distance parameter identification method for infrared temperature measurement equipment of power equipment
CN107123105A (en) Images match defect inspection method based on FAST algorithms
CN116109543A (en) Method and device for quickly identifying and reading data and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant