WO2021143343A1 - 一种产品质量检测方法及装置 - Google Patents

一种产品质量检测方法及装置 Download PDF

Info

Publication number
WO2021143343A1
WO2021143343A1 PCT/CN2020/129592 CN2020129592W WO2021143343A1 WO 2021143343 A1 WO2021143343 A1 WO 2021143343A1 CN 2020129592 W CN2020129592 W CN 2020129592W WO 2021143343 A1 WO2021143343 A1 WO 2021143343A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
product
defective
neural network
network model
Prior art date
Application number
PCT/CN2020/129592
Other languages
English (en)
French (fr)
Inventor
于洋洋
李士钰
Original Assignee
歌尔股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 歌尔股份有限公司 filed Critical 歌尔股份有限公司
Priority to US17/758,788 priority Critical patent/US20230039805A1/en
Publication of WO2021143343A1 publication Critical patent/WO2021143343A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • H04R29/001Monitoring arrangements; Testing arrangements for loudspeakers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10141Special mode during image acquisition
    • G06T2207/10144Varying exposure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/06Recognition of objects for industrial automation

Definitions

  • This application relates to the field of detection technology, and in particular to a method and device for product quality detection.
  • the quality of the magnetic circuit in the production process directly affects the acoustic performance of the speaker.
  • due to defects such as cracks, dirt, impurities, etc. on the surface of the magnetic circuit manual inspection and judgment are used in traditional methods.
  • labor is also limited by factors such as fatigue and human eyes, resulting in products The yield rate is not high.
  • this application is proposed to provide a product quality inspection method and device that overcomes the above-mentioned problems or at least partially solves the above-mentioned problems, with good inspection effects and saving labor costs.
  • a product quality inspection method includes:
  • the detection result indicates that the product to be inspected is a defective product
  • the detection result is determined a second time according to the position information of the defective characteristic pixel in the image in the detection result, and whether the product to be inspected is qualified or not is determined according to the result of the second determination.
  • a product quality detection device including:
  • the image acquisition module is used to acquire the image of the product to be inspected
  • the detection module is used to detect the image using the pre-trained neural network model to obtain the detection result output by the neural network model;
  • the re-judgment module is used to make a second judgment on the detection result according to the position information of the defective feature pixel in the image when the detection result indicates that the product to be inspected is defective, and to determine the product to be inspected according to the result of the second judgment Eligibility.
  • a computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the above method.
  • the technical solution of the embodiment of the present application on the one hand, by acquiring the image of the product to be inspected, the neural network model is used to detect the image, and the detection result output by the neural network model is obtained, thereby effectively identifying the undesirable features in the product and avoiding missed inspections. ,
  • the detection effect is good, the performance is stable, and it has the beneficial effect of replacing manual inspection and saving labor costs.
  • the re-judgment mechanism is adopted to conduct a second judgment on the products to be inspected that are indicated as defective by the inspection result, so as to avoid misjudging qualified products as defective products, improve the detection accuracy rate and ensure the quality of the products.
  • Fig. 1 shows a schematic flow chart of a product quality inspection method according to an embodiment of the present application
  • Fig. 2 shows a schematic flow chart of a method for quality inspection of magnetic circuit products according to an embodiment of the present application
  • Fig. 3 shows a schematic diagram of three types of defects included in a white image of a magnetic circuit product according to an embodiment of the present application
  • Fig. 4 shows a schematic diagram of a defect included in a white image of a magnetic circuit product according to an embodiment of the present application
  • Fig. 5 shows a schematic diagram of a defect included in a black image of a magnetic circuit product according to an embodiment of the present application
  • Fig. 6 shows a schematic diagram of a defect included in a white image of a magnetic circuit product according to an embodiment of the present application
  • FIG. 7 shows a schematic diagram of the shape contour determined according to the defective characteristic pixels of the defect shown in FIG. 6;
  • Fig. 8 shows a schematic diagram of the area division of a magnetic circuit product according to an embodiment of the present application
  • Fig. 9 shows a block diagram of a product quality inspection device according to an embodiment of the present application.
  • Fig. 10 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present application.
  • the embodiment of the present application proposes a product quality inspection scheme, which performs product quality inspection based on deep learning and performs a second re-judgment of the inspection results, which improves the robustness of the inspection, ensures the accuracy rate, and replaces manual inspection by machines.
  • the conditions have been created to reduce labor costs.
  • Fig. 1 shows a schematic flow diagram of a product quality inspection method according to an embodiment of the present application.
  • the product quality inspection method of this embodiment includes the following steps:
  • step S101 an image of a product to be inspected is obtained; this embodiment does not specifically limit the product to be inspected, and any product with a detection requirement can use the method of this embodiment.
  • Step S102 Use the pre-trained neural network model to detect the image to obtain the detection result output by the neural network model; in practical applications, collect samples of defective products before the detection to train the neural network model, and use the neural network model for product quality intelligence Detection makes the detection performance more stable and reliable.
  • Step S103 when the detection result indicates that the product to be inspected is a defective product, the detection result is determined twice according to the position information of the defective feature pixel in the image in the detection result, and whether the product to be inspected is qualified or not is determined according to the result of the second determination.
  • the poor feature pixel here is the pixel that indicates the product's poor feature.
  • the product's poor feature is a concept opposite to the normal product feature.
  • the product's poor feature is the product defect. When the product has a defect, the defect corresponds to the position on the product image The pixel points of is obviously different from the pixel points of the non-defective corresponding position, therefore, the defective characteristic pixels can be determined.
  • the product quality detection method of this embodiment uses a neural network model to perform product quality detection, which solves the technical problems of low manual detection efficiency, missing detection, unstable performance, and high labor cost. Further, by performing secondary judgment on the detection result of the neural network model according to the position information of the bad feature pixel in the image, the problem of misjudgment is effectively avoided, the detection accuracy is improved, and the detection effect is ensured.
  • the quality of the product cannot be perfect, and there is an allowable error range.
  • the neural network model When using the neural network model to detect, it is easy to determine the product with a bad feature area less than the area threshold as a defective product, resulting in a higher rate of misjudgment .
  • the secondary determination of the detection result according to the position information of the bad feature pixel in the image in the detection result includes: obtaining the outer contour pattern of the bad feature pixel according to the information of the effective area in the detection result ,
  • the effective area is the image area that includes defective feature pixels; the area value of the outer contour graphic is calculated according to the pixels included in the outer contour graphic, and when the area value is greater than the preset area threshold, the detection result of the defective product is maintained; when the area value is less than When it is equal to the preset area threshold, the product to be inspected is determined to be a qualified product.
  • this embodiment is based on the effective area information contained in the detection result output by the neural network model (The effective area is the image area including bad feature pixels.)
  • the effective area is the image area including bad feature pixels.
  • Area value (the area is determined by the number of pixels in the outer contour graphic). When the area value is greater than the preset area threshold, the bad feature is determined to be a real bad feature.
  • the detection result (defective product) output by the neural network model is modified as a qualified product, and the final detection result of the product to be inspected is determined to be a qualified product.
  • acquiring the image of the product to be inspected in this embodiment includes: respectively acquiring the first image and the second image of the product to be inspected under different exposure durations of the camera (such as the camera of a CCD camera), and the exposure duration corresponding to the first image Less than the exposure time corresponding to the second image; use the pre-trained neural network model to detect the image, and obtain the detection results output by the neural network model include: use the pre-trained neural network model to perform the first image and the second image separately Detection; When at least one of the first image and the second image includes a defective feature, a detection result that the product to be inspected is a defective product is obtained.
  • the exposure time is different (the specific exposure time can be set according to requirements), and the color of the image obtained is different, and the image information reflected by the image of different colors is also different.
  • the detection of two types of defects in the product, hair fiber and breakage as an example, Hair fibers are difficult to display in long-exposure images, and damage can only show clear outlines and colors in long-exposure images.
  • images of the same product with different exposure durations are acquired, and then pre-training is used to complete
  • the neural network model of the system detects images with different exposure durations and obtains the detection results.
  • this embodiment trains the neural network model before using the pre-trained neural network model to detect the image, specifically including: acquiring the first image and the second image of the defective product, the first image Different from at least part of the defective features contained in the second image, mark the effective area where the defective feature is located on the first image of the defective product and the second image of the defective product respectively; the valid area includes the pixels of the defective feature; according to the defective product Obtain the first training sample, train the first neural network model using the first training sample, and obtain a stable first neural network model. The first stable neural network model is obtained.
  • the neural network model can correctly identify the bad features in the first image; according to the second image of the defective product, the information of the effective area and the defect category information corresponding to the bad feature, the second training sample is obtained, and the second training sample is used to train the second nerve
  • the network model obtains a stable second neural network model, and the stable second neural network model can correctly identify the bad features in the second image.
  • the exposure time of the first image and the second image are different.
  • two types of images are acquired, and different neural network models are obtained by training different types of images. It can be understood that for scenes that only need to acquire one type of image, only one corresponding neural network model needs to be trained. That's it.
  • the first neural network model After obtaining stable first neural network and second neural network models, use the first neural network model to detect the first image of the product to be inspected.
  • the first image of the product to be inspected includes two or more defect categories
  • the defect categories are arranged in a predetermined order, and a defect category is determined according to the arrangement result as the representative defect category included in the first image; using the second nerve
  • the network model detects the second image of the product to be inspected.
  • the second image of the product to be inspected includes two or more defect categories, according to the position information of each defect category appearing in the second image of the product to be inspected, Arrange the defect categories in a predetermined order, and determine a defect category as the representative defect category included in the second image according to the result of the arrangement; take the representative defect category included in the first image or the representative defect category included in the second image as the defect of the product to be inspected Category, so that the products to be inspected are classified according to the defect categories of the products to be inspected.
  • the purpose of product quality testing is to find defective products, to separate defective products from qualified products, and to classify and deal with defective products.
  • This embodiment provides a solution for classifying the detected defective products. For example, for the first image and the second image of the same product, the representative defect categories included in the first image and the second image are determined respectively, from the two images Choose one of the representative defect categories as the defect category of the product to be inspected, and add 1 to the statistical value of the number of defective products corresponding to the defect category of the product to be inspected.
  • the priority of the representative defect category of the first image and the second image can be set according to requirements, and the representative defect category of the image with the higher priority is used as the defect category of the product. For example, set the priority of the representative defect category of the first image to level 1, set the priority of the representative defect category of the second image to level 2, and the priority of level 1 is higher than that of level 2.
  • the representative defect category of the first image is taken as the defect category of the product.
  • each defect is considered equally important, and you can choose one of them as the defect category of the product.
  • the location of the undesirable features may also affect the product quality test results.
  • a type of defect such as crushing occurs at the center of a hard material product and belongs to the "fatal" defect category. When it appears at the edge of a hard material product (such as on a rubber corner), the crush can be recovered. One type of crush defect may fall into the allowable defect category. In short, the appearance position of the bad feature on the product may affect the identification of the bad, and then affect the product's test results.
  • the factor of the appearance position of the defective feature on the product is considered when the detection result is secondly determined.
  • the image is divided into target area and non-target area according to the relationship between the appearance position of undesirable features and product quality.
  • Target area refers to the area in the image where the undesirable feature affects the product quality
  • the non-target area refers to the appearance in the image.
  • the area where the bad feature does not affect the product quality according to the position information of the bad feature pixel in the image in the detection result, the position of the bad feature pixel in the image is matched with the target area and the non-target area; when the bad feature pixel When the position in the image matches the target area successfully, the detection result of the defective product is maintained; when the position of the defective feature pixel in the image matches the non-target area successfully, the product to be inspected is determined to be a qualified product.
  • the detection result output by the neural network model of this embodiment also includes the defect category information when the product to be inspected is a defective product and the confidence level corresponding to the defect category; according to the defective feature pixels in the detection result
  • the second determination of the detection result includes: setting the bad threshold corresponding to the target area; comparing the confidence level corresponding to the defect category with the bad threshold, and when the confidence level of the defect category is greater than the preset bad threshold, Maintain the detection results of defective products.
  • the magnetic circuit is an integral part of the speakers in computers, communications and consumer electronics.
  • the quality of the magnetic circuit directly affects the acoustic performance of the speaker, and the magnetic circuit detection faces the outstanding problems of many types of defects, low detection efficiency and low accuracy.
  • the following examples are for inspection
  • the product is a magnetic circuit product as an example to explain the product quality inspection method.
  • FIG. 2 shows a schematic flow chart of a magnetic circuit product quality inspection method according to an embodiment of the present application.
  • the magnetic circuit product quality inspection method of this embodiment includes the following steps:
  • a magnetic circuit product of this embodiment There may be multiple defects on a magnetic circuit product of this embodiment.
  • product defects are classified into "impurities, wool fibers, crushing, and breakage".
  • the wool fibers are difficult to display in the long-exposure image, so the short-exposure is adopted.
  • Time image here the image with short exposure time is called black image (that is, black image) because of the less light input.
  • the other three items impurity, crushing and breakage.
  • the clear outline and color can only be displayed in the image with a long exposure time. Therefore, a long-time exposure image is used.
  • the long-time exposure image is called a white image due to the large amount of light input. White image), all the defects of the magnetic circuit product can be clearly displayed through the above two images.
  • Step S201 Obtain a black image.
  • FIG. 5 illustrates a type of defect of the black image of a magnetic circuit product.
  • the magnetic circuit product is clearly displayed in the small rectangular area on the upper right shown by the reference number E in Figure 5 There are wool fibers on it.
  • step S202 a white image is acquired.
  • Figure 3 illustrates the three types of defects in the white image of a magnetic circuit product.
  • the rectangular area shown by the reference sign A in Figure 3 clearly shows the magnetic circuit product. Containing impurities, the rectangular area indicated by reference number B clearly shows that there is damage on the magnetic circuit product, and the rectangular area indicated by reference number C clearly shows that there is crushing on the magnetic circuit product.
  • Figure 4 illustrates a type of defect in a white image of a magnetic circuit product.
  • the rectangular area shown by the reference number D clearly shows that the magnetic circuit product has an overflow defect.
  • Step S203 detecting impurities, wool fibers, crushing, and damage in the black image.
  • the black image output by the neural network model includes detection results of at least one of the following defect categories: impurities, hair fibers, crushing and damage.
  • the type and number of defects included in the black image are not limited. For example, in one embodiment, there may be impurities, hair fibers, and crush defects in the black image. In an embodiment, there may be impurities and hair fibers in the black image. Two or more defects in, crush and damage, etc., should be determined according to the actual situation.
  • Step S204 detecting impurities, wool fibers, crushing, breakage, and glue overflow in the white image.
  • the neural network model is used to detect the image, that is, the pre-trained neural network model is used to detect the white image, and the white image output by the neural network model includes the detection result of at least one of the following defect categories: Impurities, wool fibers, crush, breakage, and glue overflow.
  • the type and number of defects included in the white image are not limited. For example, in one embodiment, there may be impurities, hair fibers, crushing, breakage, and glue overflow in the white image.
  • the white image may exist Two or more defects in impurities, wool fibers, crushing and breakage, etc.
  • Step S205 the neural network detection result.
  • the detection results corresponding to different images can be obtained. If bad features are identified in both black and white images, the magnetic circuit product to be inspected is determined to be defective. If a bad feature is identified in one of the black and white images, the magnetic circuit product to be inspected is determined as a defective product. Only when no bad features are detected in the black and white images, the magnetic circuit product to be inspected is determined as a qualified product. Ensure detection accuracy. That is, if the detection result of the black image and the white image are inconsistent, according to the principle that as long as there is a defect, it is judged as a defective product. Except for the case where both the black image and the white image are both qualified, the defective product is judged in all other cases. When the black map and the white map have their own defect categories, the present embodiment marks both of the two inspection results (including defect category information) for inspection by the inspector.
  • this embodiment uses the position coordinates of the defect in the black image (or white image) according to the position coordinates of the defect appearing in the black image (or white image). Arrange the defects in order from top to bottom and from left to right, take the defect ranked first as the representative defect category of this image, and choose one of the representative defect categories of the two images as the defect category of the magnetic circuit product. For subsequent classification and treatment of bad magnetic circuit products.
  • the product image whose detection result indicates a defective product is re-judgmented to ensure the detection accuracy.
  • this embodiment sets the content of the detection result output by the neural network model, and each detection result contains the defect category information and the coordinate information of the circumscribed rectangle of the position where the defect appears in the original image (such as rectangular The upper left corner and the lower right corner, the coordinate information of a total of 2 pixels).
  • Fig. 6 shows a schematic diagram of a defect included in a white image of a magnetic circuit product according to an embodiment of the present application.
  • the rectangle indicated by reference sign F in Fig. 6 includes defective characteristic pixels.
  • the neural network model detects the defect shown in Figure 6, it outputs the detection result.
  • the detection result includes the coordinate values of the pixels in the upper left corner and the lower right corner of the rectangular frame F.
  • FIG. 7 shows a schematic diagram of the outline of the shape determined according to the defective characteristic pixels of the defect shown in FIG. 6. As shown in FIG. 7, according to the rectangular frame F shown in FIG. The embodiment determines the bad feature pixel, and then performs curve fitting according to the position of the bad feature pixel to obtain the contour determined by the bad feature pixel, which is convenient for subsequent calculation of the contour area.
  • Step S206 whether the area is greater than the threshold, yes, maintain the defective product detection result, if not, modify it to the qualified product detection result.
  • the contour area determined based on the number of pixels in the contour is compared with a preset threshold. If the contour area is greater than the area threshold, the defective product detection result output by the neural network model is maintained. If the contour area is less than the area threshold, the The test result of the magnetic circuit product is revised to the test result of the qualified product.
  • Step S207 the product quality inspection result.
  • step S206 The result after the re-judgment in step S206 is taken as the product quality inspection result, so far, the quality inspection result of the magnetic circuit product is obtained.
  • Step S208 region segmentation map.
  • the target area and the non-target area are divided on each image of the magnetic circuit product.
  • the target area refers to the area in the image where the bad feature affects the product quality.
  • the target area refers to the area where undesirable features appear in the image and do not affect the product quality.
  • the defects such as wool fibers of magnetic circuit products can be clearly displayed on the black image, the following description will be given by taking the black image and the defect type as wool fiber as an example.
  • the defect type of the product to be inspected is To display more clearly on the white image, you need to segment the white image, and confirm whether it is defective according to the matching result of the defect position and each area position.
  • the process is basically similar to the following black image processing process, see The following description:
  • the magnetic circuit is divided into three areas: side magnetic, center magnetic and magnetic gap. Each area is divided according to the coordinates.
  • the magnetic gap needs to detect hair fiber as the target area.
  • the side magnetic and central magnetic fiber do not affect the performance of the product, so the side magnetic and central magnetic do not need to detect the wool fiber, and the side magnetic area and the central magnetic area are regarded as non-target areas.
  • FIG. 8 shows a schematic diagram of the region segmentation of the magnetic circuit product according to an embodiment of the present application , See Figure 8, on the black image of the magnetic circuit product, including reference signs H, I, E, where the reference sign H appears in the upper, lower, left, and right positions of the black image, indicating the edge magnet of the magnetic circuit product , That is, the magnetic circuit at the edge.
  • the reference symbol I appears at the center of the black image, indicating the central magnetic circuit of the magnetic circuit product.
  • the reference symbol E appears in the upper right corner of the black image, and the rectangular frame E indicates the defective characteristic pixel points of the hair fiber defect included in the magnetic circuit product.
  • Step S209 whether the matching is successful, yes, maintain the defective product detection result; if not, modify it to the qualified product detection result.
  • the position of the bad feature pixel in the image is matched with the target area and the non-target area respectively; when the bad feature pixel is in When the position in the image matches the target area successfully, the detection result of the defective product is maintained; when the position of the bad feature pixel in the image matches the non-target area successfully, the product to be inspected is determined to be a qualified product.
  • the wool fiber ie, the position indicated by the rectangular frame E
  • the wool fiber appears in the target area of the magnetic gap, that is, the wool fiber is a product defect, and the defective product detection is maintained. result. .
  • this embodiment can also be further determined by the confidence level corresponding to the defect category when the product to be inspected is a defective product included in the test result.
  • the defect category such as wool fiber
  • the bad threshold corresponding to the set target area is 80%. Comparing the confidence level corresponding to the defect category with the bad threshold, it can be seen that 95% is greater than 80%, that is, the confidence level of the defect category is greater than the preset bad Threshold, the detection result of defective products is maintained.
  • FIG. 9 shows a block diagram of a product quality inspection device according to an embodiment of the present application.
  • the product quality inspection device 900 of this embodiment includes:
  • the image acquisition module 901 is used to acquire an image of the product to be inspected
  • the detection module 902 is configured to detect the image by using the neural network model completed in advance to obtain the detection result output by the neural network model;
  • the re-judgment module 903 is used to make a second judgment on the detection result according to the position information of the defective feature pixel in the image when the detection result indicates that the product to be inspected is defective, and determine the to-be-inspected product according to the result of the second judgment Whether the product is qualified.
  • the re-judgment module 903 is specifically configured to obtain the outer contour pattern of the bad feature pixel based on the information of the effective area in the detection result.
  • the effective area is the image area including the bad feature pixel;
  • the pixel points included in the contour graph calculate the area value of the outer contour graph.
  • the re-judgment module 903 is specifically configured to divide the image into a target area and a non-target area according to the relationship between the appearance position of the undesirable feature and the product quality.
  • the target area refers to the presence of undesirable features in the image.
  • the area of product quality is specifically configured to divide the image into a target area and a non-target area according to the relationship between the appearance position of the undesirable feature and the product quality.
  • the non-target area refers to the area where the bad feature appears in the image and does not affect the product quality; according to the position information of the bad feature pixel in the image in the detection result, the position of the bad feature pixel in the image is separated from the target Area and non-target area; when the position of the bad feature pixel in the image matches the target area successfully, the detection result of the defective product is maintained; when the position of the bad feature pixel in the image matches the non-target area successfully, The product to be inspected is determined to be a qualified product.
  • the detection result also includes the defect category information when the product to be inspected is a defective product and the confidence level corresponding to the defect category; the re-judgment module 903 is specifically used to set the defect threshold corresponding to the target area; The confidence level corresponding to the defect category is compared with the defect threshold, and when the confidence level of the defect category is greater than the preset defect threshold, the detection result of the defective product is maintained.
  • the image acquisition module 901 is specifically configured to separately acquire the first image and the second image of the product to be inspected under different exposure durations of the camera, and the exposure duration corresponding to the first image is shorter than that corresponding to the second image. Exposure time;
  • the detection module 902 is specifically configured to separately detect the first image and the second image by using the pre-trained neural network model; when at least one of the first image and the second image includes a bad feature, the product to be inspected is a defective product The test results.
  • the detection module 902 is specifically configured to train the neural network model to obtain the first image and the second image of the defective product before using the pre-trained neural network model to detect the image. At least part of the defective features contained in the image and the second image are not the same.
  • the valid area includes the pixels of the defective feature;
  • the first image of the good product, the information of the effective area and the defect category information corresponding to the bad feature, obtain the first training sample, and use the first training sample to train the first neural network model to obtain a stable first neural network model;
  • the second image, the information of the effective area and the defect category information corresponding to the bad feature, obtain a second training sample, and use the second training sample to train the second neural network model to obtain a stable second neural network model.
  • the detection module 902 is specifically configured to use the first neural network model to detect the first image of the product to be inspected, when it is detected that the first image of the product to be inspected includes two or more defect categories According to the position information of each defect category appearing in the first image of the product to be inspected, the defect categories are arranged in a predetermined order, and a defect category is determined according to the arrangement result as the representative defect category included in the first image; using the second nerve The network model detects the second image of the product to be inspected.
  • the second image of the product to be inspected includes two or more defect categories, according to the position information of each defect category appearing in the second image of the product to be inspected, Arrange the defect categories in a predetermined order, and determine a defect category as the representative defect category included in the second image according to the result of the arrangement; take the representative defect category included in the first image or the representative defect category included in the second image as the defect of the product to be inspected Category, so that the products to be inspected are classified according to the defect categories of the products to be inspected.
  • the product to be inspected is a magnetic circuit product
  • the image acquisition module 901 is specifically used to acquire black and white images of the magnetic circuit product
  • the detection module 902 is specifically used to use a pre-trained neural network
  • the model detects the black image, and the black image output by the neural network model includes the detection results of at least one of the following defect categories: impurities, hair fiber, crush and damage; the white image is processed by the neural network model completed in advance. Detection, the white image output by the neural network model includes detection results of at least one of the following defect categories: impurities, hair fibers, crushing, damage, and glue overflow.
  • FIG. 10 another embodiment of the present application provides a computer-readable storage medium 1000, where the computer-readable storage medium 1000 stores computer instructions, and the computer instructions cause a computer to execute the above-mentioned method.
  • the computer instructions stored in the computer-readable storage medium 1000 cause the computer to perform the following processing:
  • the image of the product to be inspected uses the pre-trained neural network model to detect the image to obtain the detection result output by the neural network model; when the detection result indicates that the product to be inspected is defective, according to the detection result Based on the position information of the defective feature pixel in the image, the detection result is subjected to a secondary judgment, and the product to be inspected is determined to be qualified according to the secondary judgment result.
  • the computer instructions further cause the computer to perform the following processing:
  • the outer contour figure of the bad feature pixel is obtained, and the effective area is the image area including the bad characteristic pixel; the area value of the outer contour figure is calculated according to the pixels included in the outer contour graph, when When the area value is greater than the preset area threshold value, the detection result of the defective product is maintained; when the area value is less than or equal to the preset area threshold value, it is determined that the product to be inspected is a qualified product.
  • the computer instructions further cause the computer to perform the following processing:
  • the image is divided into a target area and a non-target area.
  • the target area refers to the area in the image where the bad feature affects the product quality
  • the non-target area refers to the image
  • the non-target area is matched; when the position of the bad feature pixel in the image matches the target area successfully, the detection result of the defective product is maintained; when the position of the bad feature pixel in the image is the same
  • the product to be inspected is determined to be a qualified product.
  • the computer instructions further cause the computer to perform the following processing:
  • the computer instructions further cause the computer to perform the following processing:
  • At least part of the defective features contained in the first image and the second image are not the same, and respectively determine the location of the defective feature on the first image of the defective product and the second image of the defective product Mark the effective area of, and the effective area includes bad feature pixels;
  • the first image of the defective product the information of the effective area and the defect category information corresponding to the defective feature, a first training sample is obtained, and the first neural network model is trained using the first training sample to obtain a stable first neural network Model;
  • the second image of the defective product the information of the effective area and the defect category information corresponding to the defective feature, a second training sample is obtained, and the second neural network model is trained using the second training sample to obtain a stable second neural network Model.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Otolaryngology (AREA)
  • Image Analysis (AREA)

Abstract

一种产品质量检测方法及装置。产品质量检测方法包括:获取待检产品的图像(S101);利用预先训练完成的神经网络模型对图像进行检测,得到神经网络模型输出的检测结果(S102);当检测结果指示待检产品为不良品时,根据检测结果中不良特征像素点在图像中的位置信息,对检测结果进行二次判定,根据二次判定结果确定待检产品是否合格(S103)。检测准确率高,保证了产品的品质,有利于降低检测的人力成本。

Description

一种产品质量检测方法及装置 技术领域
本申请涉及检测技术领域,具体涉及一种产品质量检测方法及装置。
发明背景
磁路作为电脑、通讯和消费电子产品中扬声器的组成部分,其生产过程中的质量直接影响扬声器声学性能。通常情况下,由于磁路表面会出现裂纹、脏污、杂质等缺陷,传统方式中都是采用人工检查判断,人工除了成本较高之外,也受限于疲劳、人眼等因素,导致产品良率不高。
发明内容
鉴于上述问题,提出了本申请以便提供一种克服上述问题或者至少部分地解决上述问题的产品质量检测方法及装置,检测效果好,节省了人力成本。
根据本申请实施例的一个方面,提供了一种产品质量检测方法,该产品质量检测方法包括:
获取待检产品的图像;
利用预先训练完成的神经网络模型对图像进行检测,得到神经网络模型输出的检测结果;
当检测结果指示待检产品为不良品时,根据检测结果中不良特征像素点在图像中的位置信息,对检测结果进行二次判定,根据二次判定结果确定待检产品是否合格。
根据本申请实施例的另一个方面,提供了一种产品质量检测装置,该产品质量检测装置包括:
图像获取模块,用于获取待检产品的图像;
检测模块,用于利用预先训练完成的神经网络模型对图像进行检测,得到神经网络模型输出的检测结果;
复判模块,用于当检测结果指示待检产品为不良品时,根据检测结果中不良特征像素点在图像中的位置信息,对检测结果进行二次判定,根据二次判定结果确定待检产品是否合格。
根据本申请实施例的又一个方面,提供了一种计算机可读存储介质。该计算机可读存储介质存储计算机指令,计算机指令使计算机执行上述方法。
本申请实施例的技术方案,一方面,通过获取待检产品的图像,利用神经 网络模型对图像进行检测,得到神经网络模型输出的检测结果,从而有效识别产品中的不良特征,避免了漏检,检测效果好,性能稳定,具有取代人工检验节省人力成本的有益效果。另一方面,采用复判机制,对检测结果指示为不良品的待检产品进行二次判定,避免将合格品误判为不良品,提高了检测准确率,保证了产品的品质。
附图简要说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了根据本申请一个实施例的产品质量检测方法的流程示意图;
图2示出了根据本申请一个实施例的磁路产品质量检测方法的流程示意图;
图3示出了根据本申请一个实施例的磁路产品的白色图像包括的三种缺陷的示意图;
图4示出了根据本申请一个实施例的磁路产品的白色图像包括的一种缺陷的示意图;
图5示出了根据本申请一个实施例的磁路产品的黑色图像包括的一种缺陷的示意图;
图6示出了根据本申请一个实施例的磁路产品的白色图像包括的一种缺陷的示意图;
图7示出了根据图6所示缺陷的不良特征像素点确定的外形轮廓的示意图;
图8示出了根据本申请一个实施例的磁路产品的区域分割的示意图;
图9示出了根据本申请一个实施例的产品质量检测装置的框图;
图10示出了根据本申请一个实施例的计算机可读存储介质的结构示意图。
具体实施方式
下面将参照附图更详细地描述本申请的示例性实施例。虽然附图中显示了本申请的示例性实施例,然而应当理解,可以以各种形式实现本申请而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本申请,并且能够将本申请的范围完整的传达给本领域的技术人员。
在需要对产品的外观、状态等质量进行检测的生产线上,大多数还是依赖 人工检测,人工检测显而易见的问题是人力成本较高,检测结果不稳定。也有一种基于CCD(Charge Coupled Device,电荷耦合器件)的视觉检测,但由于图像中各种不良状态较多、不良特征图像显示不明显等因素导致传统视觉检测效果不佳并且鲁棒性较差。对此,本申请实施例提出一种产品质量检测方案,基于深度学习进行产品质量检测并对检测结果进行二次复判,提高了检测的鲁棒性,保证了准确率,为机器取代人工检测降低人力成本创造了条件。
图1示出了根据本申请一个实施例的产品质量检测方法的流程示意图,参见图1本实施例的产品质量检测方法包括下列步骤:
步骤S101,获取待检产品的图像;本实施例对待检产品不做具体限定,任何有检测需求的产品都可以使用本实施例的方法。
步骤S102,利用预先训练完成的神经网络模型对图像进行检测,得到神经网络模型输出的检测结果;实际应用中,在检测之前采集不良品的样本训练神经网络模型,利用神经网络模型进行产品质量智能检测,使得检测性能更加稳定可靠。
步骤S103,当检测结果指示待检产品为不良品时,根据检测结果中不良特征像素点在图像中的位置信息,对检测结果进行二次判定,根据二次判定结果确定待检产品是否合格。这里的不良特征像素点是指示产品不良特征的像素点,产品不良特征是与正常产品特征相对的概念,产品不良特征即产品的缺陷,当产品存在缺陷时,在产品的图像上,缺陷对应位置的像素点与非缺陷对应位置的像素点有明显不同,因此,可以确定出不良特征像素点。
由图1所示可知,本实施例的产品质量检测方法,通过利用神经网络模型进行产品质量检测,解决了人工检测效率低,漏检测、性能不稳定,人力成本高等技术问题。进一步地,通过对神经网络模型的检测结果根据不良特征像素点在图像中的位置信息进行二次判定,有效避免了误判问题,提高了检测准确性,保证了检测效果。
实际产品生产过程中,产品的质量不可能完美无缺,都有容许的误差范围,而利用神经网络模型检测时,容易将不良特征面积小于面积阈值的产品确定为不良品,导致误判率较高。对此,一个实施例中,根据检测结果中不良特征像素点在图像中的位置信息,对检测结果进行二次判定包括:根据检测结果中有效区域的信息,获得不良特征像素点的外轮廓图形,有效区域是包括不良特征像素点的图像区域;根据外轮廓图形包括的像素点计算外轮廓图形的面积值, 当面积值大于预设面积阈值时,维持不良品的检测结果;当面积值小于或等于预设面积阈值时,判定待检产品为合格品。
也就是说,如果一个待检产品的图像输入到神经网络模型,经过神经网络模型判断后确定待检产品为不良品,那么,本实施例根据神经网络模型输出的检测结果中包含的有效区域信息(有效区域是包括不良特征像素点的图像区域)获得不良特征像素点的外轮廓图形,比如,包括不良特征像素点的区域的外接矩形或不规则的多边形,根据外轮廓图形计算外轮廓图形的面积值(面积由外轮廓图形内像素点个数确定),当面积值大于预设面积阈值时,则确定不良特征是真的不良特征,当面积小于预设面积阈值或等于预设面积阈值时,则确定不良特征并非真的不良特征,进而将神经网络模型输出的检测结果(不良品)修改为合格品,并确定待检产品的最终检测结果为合格品。
进一步的,本实施例中获取待检产品的图像包括:分别获取待检产品在摄像头(如CCD相机的摄像头)的不同曝光时长下的第一图像和第二图像,第一图像对应的曝光时长小于第二图像对应的曝光时长;利用预先训练完成的神经网络模型对图像进行检测,得到神经网络模型输出的检测结果包括:利用预先训练完成的神经网络模型分别对第一图像和第二图像进行检测;当第一图像与第二图像中的至少一个包括不良特征时,得到待检产品为不良品的检测结果。
曝光时长不同(具体的曝光时长可根据需求设置),得到的图像颜色不同,而不同颜色的图像反映出的图像信息也相应不同,以产品中毛纤和破损这两类缺陷的检测为例,毛纤在长曝光的图像中难以显示,而破损在长曝光时间的图像中才能显示出清晰轮廓和颜色,基于此,本实施例中获取同一产品的不同曝光时长的图像,进而利用预先训练完成的神经网络模型对不同曝光时长的图像进行检测,得到检测结果。
为提高检测效率和准确性,本实施例在利用预先训练完成的神经网络模型对图像进行检测之前,训练神经网络模型,具体的包括:获取不良品的第一图像和第二图像,第一图像和第二图像中包含的至少部分不良特征不相同,分别对不良品的第一图像和不良品的第二图像上不良特征所在的有效区域进行标注;有效区域包括不良特征像素点;根据不良品的第一图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第一训练样本,利用第一训练样本训练第一神经网络模型,得到稳定的第一神经网络模型,该稳定的第一神经网络模型能够正确识别第一图像中的不良特征;根据不良品的第二图像,有效区域 的信息以及不良特征对应的缺陷类别信息,获得第二训练样本,利用第二训练样本训练第二神经网络模型,得到稳定的第二神经网络模型,该稳定的第二神经网络模型能够正确识别第二图像中的不良特征。第一图像和第二图像的曝光时长不同。
本实施例中获取两种类型的图像,分别对不同类型的图像训练得到不同的神经网络模型,可以理解,对只需要获取一种类型图像的场景,仅需训练得到一种对应的神经网络模型即可。
在得到稳定的第一神经网络和第二神经网络模型之后,利用第一神经网络模型对待检产品的第一图像进行检测,当检测出待检产品的第一图像中包括两项以上缺陷类别时,根据各缺陷类别出现在待检产品的第一图像中的位置信息,按照预定顺序对各缺陷类别进行排列,根据排列结果确定一个缺陷类别作为第一图像包括的代表缺陷类别;利用第二神经网络模型对待检产品的第二图像进行检测,当检测出待检产品的第二图像中包括两项以上缺陷类别时,根据各缺陷类别出现在待检产品的第二图像中的位置信息,按照预定顺序对各缺陷类别进行排列,根据排列结果确定一个缺陷类别作为第二图像包括的代表缺陷类别;将第一图像包括的代表缺陷类别或第二图像包括的代表缺陷类别作为待检产品的缺陷类别,以使根据待检产品的缺陷类别对待检产品进行分类处理。
一般的,产品质量检测的目的是为了发现不良品,将不良品与合格品分来,并分类处理不良品。实际生产中,待检产品可能存在不止一项缺陷和不良,那么就需要考虑对这些不良品分类处理的问题,比如,对不良类别进行统计为后续改进生产提供决策参考。
本实施例中提供了一种对检测出的不良品分类的方案,比如,针对同一产品的第一图像和第二图像,分别确定第一图像和第二图像包括的代表缺陷类别,从两图像的代表缺陷类别中任选其一作为待检产品的缺陷类别,将待检产品的缺陷类别所对应的不良产品数统计值加1。
需要说明的是,实际应用中,可以根据需求设定第一图像和第二图像的代表缺陷类别的优先级,将优先级高的图像的代表缺陷类别作为产品的缺陷类别。比如,设置第一图像的代表缺陷类别的优先级为一级,设置第二图像的代表缺陷类别的优先级为二级,一级的优先级高于二级,相应的,在确定出第一图像和第二图像包括的代表缺陷类别之后,将第一图像的代表缺陷类别作为产品的缺陷类别。可选的,可以直接对每一个缺陷类别设置一个优先级,将优先级较 高的一个代表缺陷类别作为待检产品的缺陷类别。当然,如果工程上没有优先级,每个缺陷都认为同等重要,可以采用任选其一的方式作为产品的缺陷类别。
实际应用中,除了前述的容许误差可能影响产品质量检测结果之外,不良特征出现的位置也可能影响产品质量检测结果。比如,压伤这一类缺陷,在硬材质产品的中心位置出现属于“致命”缺陷类别,而在硬材质产品的边缘位置(如橡胶护角上)出现时,由于压伤可恢复,所以这一类压伤缺陷可能属于容许的缺陷类别。总之,不良特征在产品上的出现位置可能影响对不良的定性,进而影响产品的检测结果。
对此,本实施例根据检测结果中不良特征像素点在图像中的位置信息,对检测结果进行二次判定时,考虑不良特征在产品上的出现位置这一因素。具体的包括:根据不良特征的出现位置与产品质量的关系,将图像划分为目标区域与非目标区域,目标区域是指图像中出现不良特征影响产品质量的区域,非目标区域是指图像中出现不良特征不影响产品质量的区域;根据检测结果中不良特征像素点在图像中的位置信息,将不良特征像素点在图像中的位置分别与目标区域以及非目标区域进行匹配;当不良特征像素点在图像中的位置与目标区域匹配成功时,维持不良品的检测结果;当不良特征像素点在图像中的位置与非目标区域匹配成功时,判定待检产品为合格品。
此外,为进一步提高检测准确性,本实施例的神经网络模型输出的检测结果中还包括待检产品为不良品时的缺陷类别信息以及缺陷类别对应的置信度;根据检测结果中不良特征像素点在图像中的位置信息,对检测结果进行二次判定包括:设置目标区域对应的不良阈值;将缺陷类别对应的置信度与不良阈值进行比较,当缺陷类别的置信度大于预设不良阈值时,维持不良品的检测结果。
至此,通过将待检产品的两图像分别进行不良特征识别,有效识别产品中的不良特征,避免漏检,提高了检测效果,为取代人工检验,节省成本创造了条件。对检测结果进行复判,避免将合格品误判为不良品,保证了检测准确性。
磁路是电脑、通讯和消费电子产品中扬声器的组成部分,磁路质量直接影响扬声器声学性能,而且磁路检测面临缺陷类别多,检测效率和准确率低的突出问题,以下实施例以待检产品为磁路产品为例对产品质量检测方法进行说明。
图2示出了根据本申请一个实施例的磁路产品质量检测方法的流程示意图,参见图2,本实施例的磁路产品质量检测方法包括下列步骤:
本实施例的一个磁路产品上可能会出现多种缺陷,如,产品缺陷分为“杂 质、毛纤、压伤、破损”,其中毛纤在长曝光的图像中难以显示,所以采用短曝光时间的图像,这里的短曝光时间的图像因进光量较少,称为黑图(即黑色图像)。另外三项:杂质、压伤和破损,在长曝光时间的图像中才能显示清晰轮廓和颜色,所以采用长时间的曝光图像,长时间的曝光图像因进光量较多,称为白图(即白色图像),通过以上两张图即可将磁路产品的全部缺陷显示清晰。
步骤S201,获取黑色图像。
本实施例获取的黑色图像参见图5,图5示意了一个磁路产品的黑色图像的一类缺陷,图5的附图标记E所示的右上方的小矩形区域内明显显示了磁路产品上有毛纤。
步骤S202,获取白色图像。
本实施例获取的白色图像参见图3和图4,图3示意了一个磁路产品的白色图像的三类缺陷,图3的附图标记A所示的矩形区域内明显显示了磁路产品上包含杂质,附图标记B所示的矩形区域内明显显示了磁路产品上有破损,附图标记C所示的矩形区域内明显显示了磁路产品上有压伤。
图4示意了一个磁路产品的白色图像的一类缺陷,附图标记D所示的矩形区域内明显显示了磁路产品存在溢胶缺陷。
步骤S203,检测黑色图像中的杂质、毛纤、压伤、破损。
利用神经网络模型对黑色图像进行检测,也就是说,利用预先训练完成的神经网络模型对图像进行检测,得到神经网络模型输出的检测结果,比如利用预先训练完成的神经网络模型对黑色图像进行检测,得到神经网络模型输出的黑色图像中包括下列缺陷类别中至少一种的检测结果:杂质、毛纤、压伤以及破损。注:神经网络模型的训练过程参见前述方法实施例的说明,这里不再赘述。黑色图像中包括的缺陷类别和数目不限,例如,一个实施例中黑色图像中可能存在杂质、毛纤、压伤等其中的一种缺陷,一个实施例中,黑色图像可能存在杂质、毛纤、压伤以及破损中的两种或多种缺陷,等等,应当根据实际情况而定。
步骤S204,检测白色图像中的杂质、毛纤、压伤、破损、溢胶。
本步骤中,利用神经网络模型对图像进行检测,即,利用预先训练完成的神经网络模型对白色图像进行检测,得到神经网络模型输出的白色图像中包括下列缺陷类别中至少一种的检测结果:杂质、毛纤、压伤、破损以及溢胶。白 色图像中包括的缺陷类别和数目不限,例如,一个实施例中白色图像中可能存在杂质、毛纤、压伤、破损以及溢胶中的一种缺陷,一个实施例中,白色图像可能存在杂质、毛纤、压伤以及破损中的两种或多种缺陷,等等。
步骤S205,神经网络检测结果。
根据步骤S203和步骤S204可以得到不同图像对应的检测结果。若黑白两图像中均识别出不良特征,则将待检磁路产品确定为不良品。若黑白两图像之一识别出不良特征,则将待检磁路产品确定为不良品,只有在黑白两图像中均未检出不良特征时,才将待检磁路产品确定为合格品,以保证检测准确性。即,如果黑图的检测结果和白图的检测结果不一致,那么按照只要有缺陷即判定为不良品的原则,除了黑图和白图都检测合格这一种情况,其他情况都判定不良品,黑图和白图分别有自己的缺陷类别时,本实施例将两个检测结果(其中包括缺陷类别信息)都标记出来,供检测人员查看。
对于检测结果为不良品的磁路产品,如果该磁路产品的黑色图像(或白色图像)中存在多种缺陷,本实施例按照缺陷出现在黑色图像(或白色图像)中的位置坐标,以从上到下、从左到右的顺序对缺陷进行排列,将排在第一位的缺陷作为此图像的代表缺陷类别,从两图像的代表缺陷类别中选其一作为磁路产品的缺陷类别,供后续对不良的磁路产品分类处理。
本实施例对检测结果指示不良品的产品图像进行复判以保证检测准确性。为进行二次判定,本实施例对神经网络模型输出的检测结果的内容进行设置,每一检测结果都同时包含缺陷类别信息和此缺陷在原图中出现位置的外接矩形的坐标信息(比如矩形的左上角和右下角,共2个像素点的坐标信息)。图6示出了根据本申请一个实施例的磁路产品的白色图像包括的一种缺陷的示意图,图6中附图标记F指示的矩形内包括不良特征像素点。神经网络模型在检测到图6所示的缺陷时,输出检测结果,检测结果中包括矩形框F的左上角和右下角的像素点的坐标值,
基于此,本实施例确定矩形的轮廓,图7示出了根据图6所示缺陷的不良特征像素点确定的外形轮廓的示意图,如图7所示,根据图6中示意的矩形框F本实施例确定出不良特征像素点,然后根据不良特征像素点的位置进行曲线拟合,得到不良特征像素点确定的外形轮廓,方便后续计算轮廓面积。
步骤S206,面积是否大于阈值,是,维持不良品检测结果,否,修改为合格品检测结果。
在本步骤中,将基于轮廓内像素点数确定的轮廓面积与预设阈值进行比较,若轮廓面积大于面积阈值,则维持神经网络模型输出的不良品检测结果,若轮廓面积小于面积阈值,则将该磁路产品的检测结果修正为合格品检测结果。
步骤S207,产品质量检测结果。
将步骤S206中复判后的结果作为产品质量检测结果,至此,得到磁路产品的质量检测结果。
另外,磁路产品检测时,不同位置对缺陷的检测需求不同,需要考虑不良特征的出现位置。
步骤S208,区域分割图。
本步骤中,根据不良特征的出现位置与磁路产品质量的关系,在磁路产品的各图像上划分目标区域与非目标区域,目标区域是指图像中出现不良特征影响产品质量的区域,非目标区域是指图像中出现不良特征不影响产品质量的区域。
由于磁路产品的毛纤这类缺陷在黑色图像上能够得到清晰显示,所以下面以黑色图像且缺陷类别为毛纤为例进行说明,在本申请其他实施例中,如果待检产品的缺陷类别在白色图像上显示更清楚,则需要对白色图像进行区域分割,并具体根据缺陷位置与各区域位置的匹配结果进行是否为不良品的确认,过程与下述黑色图像处理过程基本类似,可参见下述说明:将磁路分为边磁、中心磁和磁间隙三种区域,各区域按照坐标进行划分,磁间隙需要检测毛纤,作为目标区域。而边磁、中心磁的毛纤并不影响产品的性能,所以边磁、中心磁不需要检测毛纤,将边磁区域、中心磁区域作为非目标区域。
也就是说,当磁路产品的黑色图像存在不良特征时,对黑色图像进行区域分割,得到对应的区域分割图;图8示出了根据本申请一个实施例的磁路产品的区域分割的示意图,参见图8,在该磁路产品的黑色图像上,包括附图标记H,I,E,其中,附图标记H出现在黑色图像的上下左右四个位置,指示了磁路产品的边磁,即位于边缘位置的磁路。附图标记I出现在黑色图像的中心位置,指示了磁路产品的中心磁路。附图标记E出现在黑色图像的右上角的位置,矩形框E中指示了磁路产品包括的毛纤缺陷的不良特征像素点。
步骤S209,是否匹配成功,是,维持不良品检测结果;否,修改为合格品检测结果。
在这里,根据神经网络模型输出的检测结果中不良特征像素点在图像中的 位置信息,将不良特征像素点在图像中的位置分别与目标区域以及非目标区域进行匹配;当不良特征像素点在图像中的位置与目标区域匹配成功时,维持不良品的检测结果;当不良特征像素点在图像中的位置与非目标区域匹配成功时,判定待检产品为合格品。
接上例,计算发生缺陷的不良位置的坐标是否在不需要检测毛纤的磁路区域内,如果在,则确定不良特征像素点在图像中的位置与非目标区域匹配成功,将检测结果修改为合格品检测结果。即毛纤出现在不影响产品性能的边磁和中心磁区域内确定匹配不成功。
在本申请的一个实施例中,如图8所示,毛纤(即,矩形框E指示的位置)出现在磁间隙这一目标区域,即,毛纤是一种产品缺陷,维持不良品检测结果。。
另外,本实施例还可以通过检测结果中包括的待检产品为不良品时的缺陷类别对应的置信度进行进一步判定,例如,神经网络模型的检测结果中记录的缺陷类别(如毛纤)对应的置信度为95%,设置的目标区域对应的不良阈值为80%,将缺陷类别对应的置信度与不良阈值进行比较,可知95%大于80%,即,缺陷类别的置信度大于预设不良阈值,则维持不良品的检测结果。
至此,通过对同一磁路产品的黑白两组图像分别进行不良特征识别,有效识别磁路产品中的不良特征,避免了漏检。采用复判机制,避免将合格品误判为不良品。经实践证明,本实施例的检测效率高,可取代人工检验,具有成本低、检测效率高、准确性和稳定性好的优点。
图9示出了根据本申请一个实施例的产品质量检测装置的框图,参见图9,本实施例的产品质量检测装置900包括:
图像获取模块901,用于获取待检产品的图像;
检测模块902,用于利用预先训练完成的神经网络模型对图像进行检测,得到神经网络模型输出的检测结果;
复判模块903,用于当检测结果指示待检产品为不良品时,根据检测结果中不良特征像素点在图像中的位置信息,对检测结果进行二次判定,根据二次判定结果确定待检产品是否合格。
在本申请的一个实施例中,复判模块903,具体用于根据检测结果中有效区域的信息,获得不良特征像素点的外轮廓图形,有效区域是包括不良特征像素点的图像区域;根据外轮廓图形包括的像素点计算外轮廓图形的面积值,当面积值大于预设面积阈值时,维持不良品的检测结果;当面积值小于或等于预设 面积阈值时,判定待检产品为合格品。
在本申请的一个实施例中,复判模块903,具体用于根据不良特征的出现位置与产品质量的关系,将图像划分为目标区域与非目标区域,目标区域是指图像中出现不良特征影响产品质量的区域,非目标区域是指图像中出现不良特征不影响产品质量的区域;根据检测结果中不良特征像素点在图像中的位置信息,将不良特征像素点在图像中的位置分别与目标区域以及非目标区域进行匹配;当不良特征像素点在图像中的位置与目标区域匹配成功时,维持不良品的检测结果;当不良特征像素点在图像中的位置与非目标区域匹配成功时,判定待检产品为合格品。
在本申请的一个实施例中,检测结果中还包括待检产品为不良品时的缺陷类别信息以及缺陷类别对应的置信度;复判模块903,具体用于设置目标区域对应的不良阈值;将缺陷类别对应的置信度与不良阈值进行比较,当缺陷类别的置信度大于预设不良阈值时,维持不良品的检测结果。
在本申请的一个实施例中,图像获取模块901,具体用于分别获取待检产品在摄像头的不同曝光时长下的第一图像和第二图像,第一图像对应的曝光时长小于第二图像对应的曝光时长;
检测模块902,具体用于利用预先训练完成的神经网络模型分别对第一图像和第二图像进行检测;当第一图像与第二图像中至少一个包括不良特征时,得到待检产品为不良品的检测结果。
在本申请的一个实施例中,检测模块902,具体用于在利用预先训练完成的神经网络模型对图像进行检测之前,训练神经网络模型,获取不良品的第一图像和第二图像,第一图像和第二图像中包含的至少部分不良特征不相同,分别对不良品的第一图像和不良品的第二图像上不良特征所在的有效区域进行标注;有效区域包括不良特征像素点;根据不良品的第一图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第一训练样本,利用第一训练样本训练第一神经网络模型,得到稳定的第一神经网络模型;根据不良品的第二图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第二训练样本,利用第二训练样本训练第二神经网络模型,得到稳定的第二神经网络模型。
在本申请的一个实施例中,检测模块902,具体用于利用第一神经网络模型对待检产品的第一图像进行检测,当检测出待检产品的第一图像中包括两项以上缺陷类别时,根据各缺陷类别出现在待检产品的第一图像中的位置信息,按 照预定顺序对各缺陷类别进行排列,根据排列结果确定一个缺陷类别作为第一图像包括的代表缺陷类别;利用第二神经网络模型对待检产品的第二图像进行检测,当检测出待检产品的第二图像中包括两项以上缺陷类别时,根据各缺陷类别出现在待检产品的第二图像中的位置信息,按照预定顺序对各缺陷类别进行排列,根据排列结果确定一个缺陷类别作为第二图像包括的代表缺陷类别;将第一图像包括的代表缺陷类别或第二图像包括的代表缺陷类别作为待检产品的缺陷类别,以使根据待检产品的缺陷类别对待检产品进行分类处理。
在本申请的一个实施例中,待检产品为磁路产品,图像获取模块901,具体用于获取磁路产品的黑色图像和白色图像;检测模块902,具体用于利用预先训练完成的神经网络模型对黑色图像进行检测,得到神经网络模型输出的黑色图像中包括下列缺陷类别中至少一种的检测结果:杂质、毛纤、压伤以及破损;利用预先训练完成的神经网络模型对白色图像进行检测,得到神经网络模型输出的白色图像中包括下列缺陷类别中至少一种的检测结果:杂质、毛纤、压伤、破损以及溢胶。
参见图10,本申请的另一个实施例提供一种计算机可读存储介质1000,计算机可读存储介质1000存储计算机指令,计算机指令使计算机执行上述的方法。
具体的,计算机可读存储介质1000中存储的计算机指令使计算机执行下述处理:
获取待检产品的图像;利用预先训练完成的神经网络模型对所述图像进行检测,得到所述神经网络模型输出的检测结果;当所述检测结果指示待检产品为不良品时,根据检测结果中不良特征像素点在所述图像中的位置信息,对所述检测结果进行二次判定,根据二次判定结果确定所述待检产品是否合格。
其中,计算机指令进一步使计算机执行下述处理:
根据检测结果中有效区域的信息,获得不良特征像素点的外轮廓图形,所述有效区域是包括不良特征像素点的图像区域;根据外轮廓图形包括的像素点计算外轮廓图形的面积值,当所述面积值大于预设面积阈值时,维持不良品的检测结果;当所述面积值小于或等于预设面积阈值时,判定待检产品为合格品。
其中,计算机指令进一步使计算机执行下述处理:
根据不良特征的出现位置与产品质量的关系,将所述图像划分为目标区域与非目标区域,所述目标区域是指图像中出现所述不良特征影响产品质量的区域,非目标区域是指图像中出现所述不良特征不影响产品质量的区域;根据检 测结果中不良特征像素点在所述图像中的位置信息,将不良特征像素点在所述图像中的位置分别与所述目标区域以及所述非目标区域进行匹配;当所述不良特征像素点在所述图像中的位置与目标区域匹配成功时,维持不良品的检测结果;当所述不良特征像素点在所述图像中的位置与非目标区域匹配成功时,判定待检产品为合格品。
其中,计算机指令进一步使计算机执行下述处理:
分别获取待检产品在摄像头的不同曝光时长下的第一图像和第二图像,所述第一图像对应的曝光时长小于所述第二图像对应的曝光时长;
以及,
利用预先训练完成的神经网络模型分别对所述第一图像和所述第二图像进行检测;当所述第一图像与所述第二图像中至少一个包括不良特征时,得到待检产品为不良品的检测结果。
其中,计算机指令进一步使计算机执行下述处理:
获取不良品的第一图像和第二图像,所述第一图像和第二图像中包含的至少部分不良特征不相同,分别对不良品的第一图像和不良品的第二图像上不良特征所在的有效区域进行标注;所述有效区域包括不良特征像素点;
根据所述不良品的第一图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第一训练样本,利用所述第一训练样本训练第一神经网络模型,得到稳定的第一神经网络模型;
根据所述不良品的第二图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第二训练样本,利用所述第二训练样本训练第二神经网络模型,得到稳定的第二神经网络模型。
需要说明的是,上述装置实施例中各模块的具体实施方式以及上述计算机可读存储介质实施例中程序代码执行的具体处理,均可以参照前述对应方法实施例的具体内容进行,在此不再赘述。
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(***)、和计算机程序产品的 流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图的一个流程或多个流程和/或方框图的一个方框或多个方框中指定的功能的装置。
需要说明的是术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。
以上所述,仅为本申请的具体实施方式,在本申请的上述教导下,本领域技术人员可以在上述实施例的基础上进行其他的改进或变形。本领域技术人员应该明白,上述的具体描述只是更好的解释本申请的目的,本申请的保护范围以权利要求的保护范围为准

Claims (18)

  1. 一种产品质量检测方法,其中,所述产品质量检测方法包括:
    获取待检产品的图像;
    利用预先训练完成的神经网络模型对所述图像进行检测,得到所述神经网络模型输出的检测结果;
    当所述检测结果指示待检产品为不良品时,根据检测结果中不良特征像素点在所述图像中的位置信息,对所述检测结果进行二次判定,根据二次判定结果确定所述待检产品是否合格。
  2. 如权利要求1所述的方法,其中,所述根据检测结果中不良特征像素点在所述图像中的位置信息,对所述检测结果进行二次判定包括:
    根据检测结果中有效区域的信息,获得不良特征像素点的外轮廓图形,所述有效区域是包括不良特征像素点的图像区域;
    根据外轮廓图形包括的像素点计算外轮廓图形的面积值,当所述面积值大于预设面积阈值时,维持不良品的检测结果;
    当所述面积值小于或等于预设面积阈值时,判定待检产品为合格品。
  3. 如权利要求1所述的方法,其中,所述根据检测结果中不良特征像素点在所述图像中的位置信息,对所述检测结果进行二次判定包括:
    根据不良特征的出现位置与产品质量的关系,将所述图像划分为目标区域与非目标区域,所述目标区域是指图像中出现所述不良特征影响产品质量的区域,非目标区域是指图像中出现所述不良特征不影响产品质量的区域;
    根据检测结果中不良特征像素点在所述图像中的位置信息,将不良特征像素点在所述图像中的位置分别与所述目标区域以及所述非目标区域进行匹配;
    当所述不良特征像素点在所述图像中的位置与目标区域匹配成功时,维持不良品的检测结果;
    当所述不良特征像素点在所述图像中的位置与非目标区域匹配成功时,判定待检产品为合格品。
  4. 如权利要求3所述的方法,其中,所述检测结果中还包括待检产品为不良品时的缺陷类别信息以及缺陷类别对应的置信度;
    所述根据检测结果中不良特征像素点在所述图像中的位置信息,对所述检测结果进行二次判定包括:
    设置所述目标区域对应的不良阈值;
    将所述缺陷类别对应的置信度与所述不良阈值进行比较,当所述缺陷类别的置信度大于预设不良阈值时,维持不良品的检测结果。
  5. 如权利要求1所述的方法,其中,所述获取待检产品的图像包括:
    分别获取待检产品在摄像头的不同曝光时长下的第一图像和第二图像,所述第一图像对应的曝光时长小于所述第二图像对应的曝光时长;
    所述利用预先训练完成的神经网络模型对所述图像进行检测,得到所述神经网络模型输出的检测结果包括:
    利用预先训练完成的神经网络模型分别对所述第一图像和所述第二图像进行检测;
    当所述第一图像与所述第二图像中至少一个包括不良特征时,得到待检产品为不良品的检测结果。
  6. 如权利要求1所述的方法,其中,该方法包括:在利用预先训练完成的神经网络模型对所述图像进行检测之前,训练神经网络模型,具体包括:
    获取不良品的第一图像和第二图像,所述第一图像和第二图像中包含的至少部分不良特征不相同,分别对不良品的第一图像和不良品的第二图像上不良特征所在的有效区域进行标注;所述有效区域包括不良特征像素点;
    根据所述不良品的第一图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第一训练样本,利用所述第一训练样本训练第一神经网络模型,得到稳定的第一神经网络模型;
    根据所述不良品的第二图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第二训练样本,利用所述第二训练样本训练第二神经网络模型,得到稳定的第二神经网络模型。
  7. 如权利要求6所述的方法,其中,所述利用预先训练完成的神经网络模型分别对所述第一图像和所述第二图像进行检测包括:
    利用所述第一神经网络模型对待检产品的所述第一图像进行检测,当检测出待检产品的所述第一图像中包括两项以上缺陷类别时,根据各缺陷类别出现在待检产品的所述第一图像中的位置信息,按照预定顺序对各缺陷类别进行排列,根据排列结果确定一个缺陷类别作为所述第一图像包括的代表缺陷类别;
    利用所述第二神经网络模型对待检产品的所述第二图像进行检测,当检测出待检产品的所述第二图像中包括两项以上缺陷类别时,根据各缺陷类别出现在待检产品的所述第二图像中的位置信息,按照预定顺序对各缺陷类别进行排列,根据排列结果确定一个缺陷类别作为所述第二图像包括的代表缺陷类别;
    将所述第一图像包括的代表缺陷类别或所述第二图像包括的代表缺陷类别作为所述待检产品的缺陷类别,以使根据所述待检产品的缺陷类别对所述待检产品进行分类处理。
  8. 如权利要求1所述的方法,其中,所述待检产品为磁路产品,
    所述获取待检产品的图像包括:
    获取磁路产品的黑色图像和白色图像;
    利用预先训练完成的神经网络模型对所述图像进行检测,得到所述神经网络模型输出的检测结果包括:
    利用预先训练完成的神经网络模型对所述黑色图像进行检测,得到所述神经网络模型输出的所述黑色图像中包括下列缺陷类别中至少一种的检测结果:杂质、毛纤、压伤以及破损;
    利用预先训练完成的神经网络模型对所述白色图像进行检测,得到所述神经网络模型输出的所述白色图像中包括下列缺陷类别中至少一种的检测结果:杂质、毛纤、压伤、破损以及溢胶。
  9. 一种产品质量检测装置,其中,所述产品质量检测装置包括:
    图像获取模块,用于获取待检产品的图像;
    检测模块,用于利用预先训练完成的神经网络模型对所述图像进行检测,得到所述神经网络模型输出的检测结果;
    复判模块,用于当所述检测结果指示待检产品为不良品时,根据检测结果中不良特征像素点在所述图像中的位置信息,对所述检测结果进行二次判定,根据二次判定结果确定所述待检产品是否合格。
  10. 如权利要求9所述的装置,其中,所述复判模块,具体用于根据检测结果中有效区域的信息,获得不良特征像素点的外轮廓图形,所述有效区域是包括不良特征像素点的图像区域;根据外轮廓图形包括的像素点计算外轮廓图形的面积值,当所述面积值大于预设面积阈值时,维持不良品的检测结果;当所述面积值小于或等于预设面积阈值时,判定待检产品为合格品。
  11. 如权利要求9所述的装置,其中,所述复判模块,具体用于根据不良特征的出现位置与产品质量的关系,将图像划分为目标区域与非目标区域,目标区域是指图像中出现不良特征影响产品质量的区域,非目标区域是指图像中出现不良特征不影响产品质量的区域;根据检测结果中不良特征像素点在图像中的位置信息,将不良特征像素点在图像中的位置分别与目标区域以及非目标区域进行匹配;当不良特征像素点在图像中的位置与目标区域匹配成功时,维 持不良品的检测结果;当不良特征像素点在图像中的位置与非目标区域匹配成功时,判定待检产品为合格品。
  12. 如权利要求9所述的装置,其中,图像获取模块,具体用于分别获取待检产品在摄像头的不同曝光时长下的第一图像和第二图像,第一图像对应的曝光时长小于第二图像对应的曝光时长;
    检测模块,具体用于利用预先训练完成的神经网络模型分别对第一图像和第二图像进行检测;当第一图像与第二图像中至少一个包括不良特征时,得到待检产品为不良品的检测结果。
  13. 如权利要求9所述的装置,其中,
    检测模块,具体用于在利用预先训练完成的神经网络模型对图像进行检测之前,训练神经网络模型,获取不良品的第一图像和第二图像,第一图像和第二图像中包含的至少部分不良特征不相同,分别对不良品的第一图像和不良品的第二图像上不良特征所在的有效区域进行标注;有效区域包括不良特征像素点;根据不良品的第一图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第一训练样本,利用第一训练样本训练第一神经网络模型,得到稳定的第一神经网络模型;根据不良品的第二图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第二训练样本,利用第二训练样本训练第二神经网络模型,得到稳定的第二神经网络模型。
  14. 一种计算机可读存储介质,其中,计算机可读存储介质存储计算机指令,计算机指令使计算机执行下述处理:
    获取待检产品的图像;
    利用预先训练完成的神经网络模型对所述图像进行检测,得到所述神经网络模型输出的检测结果;
    当所述检测结果指示待检产品为不良品时,根据检测结果中不良特征像素点在所述图像中的位置信息,对所述检测结果进行二次判定,根据二次判定结果确定所述待检产品是否合格。
  15. 如权利要求14所述的计算机可读存储介质,其中,计算机指令进一步使计算机执行下述处理:
    根据检测结果中有效区域的信息,获得不良特征像素点的外轮廓图形,所述有效区域是包括不良特征像素点的图像区域;
    根据外轮廓图形包括的像素点计算外轮廓图形的面积值,当所述面积值大 于预设面积阈值时,维持不良品的检测结果;
    当所述面积值小于或等于预设面积阈值时,判定待检产品为合格品。
  16. 如权利要求14所述的计算机可读存储介质,其中,计算机指令进一步使计算机执行下述处理:
    根据不良特征的出现位置与产品质量的关系,将所述图像划分为目标区域与非目标区域,所述目标区域是指图像中出现所述不良特征影响产品质量的区域,非目标区域是指图像中出现所述不良特征不影响产品质量的区域;
    根据检测结果中不良特征像素点在所述图像中的位置信息,将不良特征像素点在所述图像中的位置分别与所述目标区域以及所述非目标区域进行匹配;
    当所述不良特征像素点在所述图像中的位置与目标区域匹配成功时,维持不良品的检测结果;
    当所述不良特征像素点在所述图像中的位置与非目标区域匹配成功时,判定待检产品为合格品。
  17. 如权利要求14所述的计算机可读存储介质,其中,计算机指令进一步使计算机执行下述处理:
    分别获取待检产品在摄像头的不同曝光时长下的第一图像和第二图像,所述第一图像对应的曝光时长小于所述第二图像对应的曝光时长;以及,
    利用预先训练完成的神经网络模型分别对所述第一图像和所述第二图像进行检测;当所述第一图像与所述第二图像中至少一个包括不良特征时,得到待检产品为不良品的检测结果。
  18. 如权利要求14所述的计算机可读存储介质,其中,计算机指令进一步使计算机执行下述处理:
    获取不良品的第一图像和第二图像,所述第一图像和第二图像中包含的至少部分不良特征不相同,分别对不良品的第一图像和不良品的第二图像上不良特征所在的有效区域进行标注;所述有效区域包括不良特征像素点;
    根据所述不良品的第一图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第一训练样本,利用所述第一训练样本训练第一神经网络模型,得到稳定的第一神经网络模型;
    根据所述不良品的第二图像,有效区域的信息以及不良特征对应的缺陷类别信息,获得第二训练样本,利用所述第二训练样本训练第二神经网络模型,得到稳定的第二神经网络模型。
PCT/CN2020/129592 2020-01-15 2020-11-18 一种产品质量检测方法及装置 WO2021143343A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/758,788 US20230039805A1 (en) 2020-01-15 2020-11-18 Method and device for testing product quality

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010044767.XA CN111311542B (zh) 2020-01-15 2020-01-15 一种产品质量检测方法及装置
CN202010044767.X 2020-01-15

Publications (1)

Publication Number Publication Date
WO2021143343A1 true WO2021143343A1 (zh) 2021-07-22

Family

ID=71148816

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/129592 WO2021143343A1 (zh) 2020-01-15 2020-11-18 一种产品质量检测方法及装置

Country Status (3)

Country Link
US (1) US20230039805A1 (zh)
CN (1) CN111311542B (zh)
WO (1) WO2021143343A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113900865A (zh) * 2021-08-16 2022-01-07 广东电力通信科技有限公司 智能的电网设备自动化测试方法、***和可读存储介质
CN115165920A (zh) * 2022-09-06 2022-10-11 南昌昂坤半导体设备有限公司 一种三维缺陷检测方法及检测设备
WO2023236372A1 (zh) * 2022-06-09 2023-12-14 苏州大学 基于图片识别的表面缺陷检测方法
CN117299596A (zh) * 2023-08-14 2023-12-29 江苏秦郡机械科技有限公司 一种自动检测的物料筛选***及其筛选方法

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111311542B (zh) * 2020-01-15 2023-09-19 歌尔股份有限公司 一种产品质量检测方法及装置
CN113837209A (zh) * 2020-06-23 2021-12-24 乐达创意科技股份有限公司 改良机器学习使用数据进行训练的方法及***
CN111784663B (zh) * 2020-06-30 2024-01-23 北京百度网讯科技有限公司 零部件的检测方法、装置、电子设备及存储介质
CN112104968B (zh) * 2020-09-15 2021-10-15 沈阳风驰软件股份有限公司 一种无线耳机外观缺陷检测***及检测方法
JP2023076992A (ja) * 2021-11-24 2023-06-05 東レエンジニアリング株式会社 自動欠陥分類装置
CN114581415A (zh) * 2022-03-08 2022-06-03 成都数之联科技股份有限公司 Pcb缺陷的检测方法、装置、计算机设备及存储介质
CN116843602B (zh) * 2022-03-25 2024-05-14 广州镭晨智能装备科技有限公司 一种缺陷检测方法及视觉检测设备
WO2024020994A1 (zh) * 2022-07-29 2024-02-01 宁德时代新能源科技股份有限公司 用于电芯的缺陷检测模型的训练方法和训练装置
WO2024050700A1 (zh) * 2022-09-06 2024-03-14 宁德时代新能源科技股份有限公司 检测方法、检测装置及存储介质
CN116521465B (zh) * 2023-06-26 2023-10-13 深圳市晶存科技有限公司 硬盘测试数据处理方法、装置及介质
CN116984266B (zh) * 2023-09-26 2024-01-16 中江立江电子有限公司 一种连接器分拣装置及分拣方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017194276A1 (en) * 2016-05-13 2017-11-16 Basf Se System and method for detecting plant diseases
CN107679490A (zh) * 2017-09-29 2018-02-09 百度在线网络技术(北京)有限公司 用于检测图像质量的方法和装置
CN108982514A (zh) * 2018-07-12 2018-12-11 常州大学 一种铸件表面缺陷仿生视觉检测***
CN110403232A (zh) * 2019-07-24 2019-11-05 浙江中烟工业有限责任公司 一种基于二级算法的烟支质量检测方法
CN111311542A (zh) * 2020-01-15 2020-06-19 歌尔股份有限公司 一种产品质量检测方法及装置

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007093330A (ja) * 2005-09-28 2007-04-12 Olympus Corp 欠陥抽出装置及び欠陥抽出方法
CN107451997A (zh) * 2017-07-31 2017-12-08 南昌航空大学 一种基于深度学习的焊缝超声tofd‑d扫描缺陷类型的自动识别方法
US11037286B2 (en) * 2017-09-28 2021-06-15 Applied Materials Israel Ltd. Method of classifying defects in a semiconductor specimen and system thereof
JP7087397B2 (ja) * 2018-01-17 2022-06-21 東京エレクトロン株式会社 基板の欠陥検査装置、基板の欠陥検査方法及び記憶媒体
CN108562589B (zh) * 2018-03-30 2020-12-01 慧泉智能科技(苏州)有限公司 一种对磁路材料表面缺陷进行检测的方法
WO2019194064A1 (ja) * 2018-04-02 2019-10-10 日本電産株式会社 画像処理装置、画像処理方法、外観検査システムおよび外観検査方法
US10872406B2 (en) * 2018-04-13 2020-12-22 Taiwan Semiconductor Manufacturing Company, Ltd. Hot spot defect detecting method and hot spot defect detecting system
CN110619618B (zh) * 2018-06-04 2023-04-07 杭州海康威视数字技术股份有限公司 一种表面缺陷检测方法、装置及电子设备
CN108776966B (zh) * 2018-06-12 2021-11-16 成都银河磁体股份有限公司 一种磁体外观缺陷检测的方法及***
CN109406533A (zh) * 2018-10-25 2019-03-01 北京阿丘机器人科技有限公司 一种产品表面缺陷的检测***及方法
CN109741296B (zh) * 2018-11-28 2023-10-20 歌尔股份有限公司 产品质量检测方法及装置
CN110018166A (zh) * 2019-03-19 2019-07-16 深圳市派科斯科技有限公司 一种用于产品外观缺陷检测的设备和方法
CN110458814A (zh) * 2019-07-29 2019-11-15 山东艾雷维特智能科技有限公司 一种木材单板缺陷的检测方法、装置及***
CN110378900B (zh) * 2019-08-01 2020-08-07 北京迈格威科技有限公司 产品缺陷的检测方法、装置及***

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017194276A1 (en) * 2016-05-13 2017-11-16 Basf Se System and method for detecting plant diseases
CN107679490A (zh) * 2017-09-29 2018-02-09 百度在线网络技术(北京)有限公司 用于检测图像质量的方法和装置
CN108982514A (zh) * 2018-07-12 2018-12-11 常州大学 一种铸件表面缺陷仿生视觉检测***
CN110403232A (zh) * 2019-07-24 2019-11-05 浙江中烟工业有限责任公司 一种基于二级算法的烟支质量检测方法
CN111311542A (zh) * 2020-01-15 2020-06-19 歌尔股份有限公司 一种产品质量检测方法及装置

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113900865A (zh) * 2021-08-16 2022-01-07 广东电力通信科技有限公司 智能的电网设备自动化测试方法、***和可读存储介质
CN113900865B (zh) * 2021-08-16 2023-07-11 广东电力通信科技有限公司 智能的电网设备自动化测试方法、***和可读存储介质
WO2023236372A1 (zh) * 2022-06-09 2023-12-14 苏州大学 基于图片识别的表面缺陷检测方法
CN115165920A (zh) * 2022-09-06 2022-10-11 南昌昂坤半导体设备有限公司 一种三维缺陷检测方法及检测设备
CN117299596A (zh) * 2023-08-14 2023-12-29 江苏秦郡机械科技有限公司 一种自动检测的物料筛选***及其筛选方法
CN117299596B (zh) * 2023-08-14 2024-05-24 江苏秦郡机械科技有限公司 一种自动检测的物料筛选***及其筛选方法

Also Published As

Publication number Publication date
US20230039805A1 (en) 2023-02-09
CN111311542B (zh) 2023-09-19
CN111311542A (zh) 2020-06-19

Similar Documents

Publication Publication Date Title
WO2021143343A1 (zh) 一种产品质量检测方法及装置
CN110349126B (zh) 一种基于卷积神经网络带标记的钢板表面缺陷检测方法
CN109829914B (zh) 检测产品缺陷的方法和装置
CN106650770B (zh) 一种基于样本学习和人眼视觉特性的mura缺陷检测方法
US11797886B2 (en) Image processing device, image processing method, and image processing program
CN106875381B (zh) 一种基于深度学习的手机外壳缺陷检测方法
CN109671058B (zh) 一种大分辨率图像的缺陷检测方法及***
CN111080622B (zh) 神经网络训练方法、工件表面缺陷分类与检测方法及装置
JP2018005639A (ja) 画像分類装置、画像検査装置、及び、プログラム
CN110596120A (zh) 玻璃边界缺陷检测方法、装置、终端及存储介质
CN113706490B (zh) 一种晶片缺陷检测方法
CN111598869B (zh) 一种对显示屏幕的Mura进行检测的方法、设备及存储介质
US20190272627A1 (en) Automatically generating image datasets for use in image recognition and detection
TW202127371A (zh) 基於圖像的瑕疵檢測方法及電腦可讀存儲介質
CN115131283A (zh) 目标对象的缺陷检测、模型训练方法、装置、设备及介质
WO2024002187A1 (zh) 缺陷检测方法、缺陷检测设备及存储介质
CN114266743A (zh) 基于hsv和cnn的fpc缺陷检测方法、***及存储介质
CN111754502A (zh) 基于多尺度特征融合的Faster-RCNN算法检测磁芯表面缺陷的方法
CN117115171B (zh) 一种应用于地铁lcd显示屏的轻微亮点缺陷检测方法
CN114612418A (zh) 一种鼠标外壳表面缺陷检测方法及装置、***、电子设备
CN114299040A (zh) 瓷砖瑕疵检测方法、装置和电子设备
CN113962929A (zh) 光伏电池组件缺陷检测方法、***及光伏电池组件生产线
CN115880683B (zh) 一种基于深度学习的城市内涝积水智能水位检测方法
CN111563869B (zh) 用于摄像模组质检的污点测试方法
CN114202544B (zh) 一种基于自编码器的复杂工件缺陷检测方法

Legal Events

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

Ref document number: 20913586

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20913586

Country of ref document: EP

Kind code of ref document: A1