Defect detection method and system based on hybrid expert model, and storage medium

Through the defect detection method based on the hybrid expert model, image features are extracted and the training characterization deviation is corrected, and the accuracy problem caused by image characterization deviation in the existing defect detection methods is solved, and a higher defect detection accuracy is achieved.

CN119785054AActive Publication Date: 2025-04-08NANJING UNIV

Patent Information

Application Number
CN202510272595.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-08
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

In the existing defect detection methods, the accuracy of defect detection is reduced due to the deviation of the characterization of the training image set and the standards of the test image set.

Method used

Using a defect detection method based on a hybrid expert model, the expert model matching the image to be detected is determined by extracting the image to be detected, and the deviation between the image features and the training characterization is corrected through an adaptive algorithm to determine the detection result.

Benefits of technology

The accuracy of defect detection is improved, and the ability of expert models to detect defects is enhanced by correcting the deviation between image features and training characterization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785054A_ABST
    Figure CN119785054A_ABST
Patent Text Reader

Abstract

The invention discloses a defect detection method and system based on a hybrid expert model and a storage medium, and relates to the technical field of defect detection. The defect detection method comprises the following steps: extracting image features of an image to be detected; determining an expert model matched with the to-be-detected image according to the image features of the to-be-detected image; according to the image features of the to-be-detected image and the matched expert model, determining post-conversion training representation of the matched expert model; and determining a detection result of the to-be-detected image according to the matched expert model and the converted training representation. According to the defect detection method, the deviation between the to-be-detected image and the test image can be corrected through the adaptive algorithm in the training representation of the expert model, so that the defect detection accuracy of the expert model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of defect detection, and in particular to a defect detection method, system and storage medium based on a hybrid expert model. Background Art

[0002] At present, products are generally inspected by defect detection in the industry. The current defect detection algorithms are usually based on unsupervised anomaly detection algorithms to detect abnormal images. Unsupervised anomaly detection algorithms can detect abnormal areas of images by characterizing normal samples. Unsupervised anomaly detection algorithms can also distinguish samples in the training data set by learning a single decision boundary.

[0003] However, the inventors of the present application have discovered that in the current defect detection method, the accuracy of defect detection is reduced due to deviations in the representation of the training image set and the standard of the test image set.

[0004] The contents of the background technology are merely technologies known to the public and do not necessarily represent the prior art in the art. Summary of the invention

[0005] The present application aims to provide a defect detection method based on a hybrid expert model to solve the problem that the accuracy of defect detection is reduced due to deviations in the representation of a training image set and the standard of a test image set.

[0006] According to one aspect of the present application, the present application provides a defect detection method based on a hybrid expert model. The defect detection method includes: extracting image features of an image to be detected; determining an expert model that matches the image to be detected based on the image features of the image to be detected; determining a converted training representation of the matched expert model based on the image features of the image to be detected and the matched expert model; and determining a detection result of the image to be detected based on the matched expert model and the converted training representation.

[0007] According to some embodiments, determining an expert model that matches the image to be detected based on image features of the image to be detected includes: determining a target matching degree of the image to be detected based on the image features of the image to be detected; and determining an expert model that matches the image to be detected based on the target matching degree.

[0008] According to some embodiments, determining the target matching degree of the image to be detected based on the image features of the image to be detected includes: extracting image features of a training image set; determining the loss target of the routing network model based on the image features of the training image set and preset characterization parameters of the expert model; determining the weight of the last layer of the routing network model based on the loss target of the routing network model; determining the target matching degree of the image to be detected based on the image features of the image to be detected and the weight of the last layer of the routing network model.

[0009] According to some embodiments, determining the converted training representation of the matched expert model based on the image features of the image to be detected and the matched expert model includes: determining the training representation corresponding to the matched expert model based on the matched expert model; and determining the converted training representation of the matched expert model based on the image features of the image to be detected and the training representation.

[0010] According to another aspect of the present application, the present application provides a defect detection system based on a hybrid expert model. The defect detection system includes an image feature extraction module, a path network matching module, a processing module and at least one expert model. The image feature extraction module extracts the image features of the image to be detected; the path network matching module determines the expert model matched to the image to be detected according to the image features of the image to be detected; the processing module determines the converted training representation of the matched expert model according to the image features of the image to be detected and the matched expert model; the matched expert model determines the defects of the image to be detected according to the converted training representation of the matched expert model.

[0011] According to some embodiments, the path network matching module further determines the target matching degree of the image to be detected based on the image features of the image to be detected; the path network matching module further determines the expert model matched by the image to be detected based on the target matching degree.

[0012] According to some embodiments, the image feature extraction module also extracts image features of the training image set; the path network matching module also determines the loss target of the routing network model based on the graphic features of the training image set and the preset characterization parameters of at least one expert model; the path network matching module also determines the weight of the last layer of the routing network model based on the loss target of the routing network model; the path network matching module also determines the target matching degree of the image to be detected based on the image features of the image to be detected and the weight of the last layer of the routing network model.

[0013] According to some embodiments, the processing module further determines a training representation corresponding to the matched expert model based on the matched expert model; and determines a converted training representation of the matched expert model based on image features of the image to be detected and the training representation.

[0014] According to another aspect of the present application, the present application further provides a non-volatile computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the defect detection method based on the hybrid expert model as described above can be implemented.

[0015] According to another aspect of the present application, the present application also provides an electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors can implement the defect detection method based on the hybrid expert model as described above.

[0016] According to another aspect of the present application, the present application also provides a computer program product, including: a computer program stored on a computer-readable storage medium; the computer program includes program instructions, and when the program instructions are executed by the computer, the computer executes the defect detection method based on the hybrid expert model as described above.

[0017] Beneficial Effects The defect detection method provided by the present application can extract the image features of the image to be detected, and determine the expert model that matches the image to be detected according to the image features of the image to be detected. The present application can determine the converted training representation of the matched expert model through the image features of the image to be detected and the matched expert model. The present application can determine the detection result of the image to be detected through the matched expert model and the converted training representation.

[0018] The defect detection method provided in the present application can correct the deviation between the image to be detected and the test image through an adaptive algorithm in the training representation of the expert model, thereby improving the accuracy of the expert model in defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A schematic diagram showing a flow chart of a defect detection method 1000 according to an embodiment of the present application is shown; Figure 2 A schematic diagram showing the process of step S120 according to an embodiment of the present application is shown; Figure 3 A schematic diagram showing the process of step S121 according to an embodiment of the present application is shown; Figure 4 A schematic diagram showing the process of step S130 according to an embodiment of the present application is shown; Figure 5 A schematic flow chart of a defect detection system 200 according to an embodiment of the present application is shown.

[0021] Reference numerals: Defect detection system 200; image feature extraction module 210; path network matching module 220; processing module 230; expert model 240. DETAILED DESCRIPTION

[0022] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0023] The described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of these specific details, or other modes, components, materials, devices, etc. may be adopted. In these cases, known structures, methods, devices, implementations, materials or operations will not be shown or described in detail.

[0024] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0025] The terms "first", "second" and the like in the specification and claims of this application and the above drawings are used to distinguish different objects rather than to describe a specific order.

[0026] The following is a clear and complete description of the technical solution of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0027] According to one aspect of the present application, the present application provides a defect detection method 1000 based on a hybrid expert model. The defect detection method 1000 may be executed by a defect detection system. Exemplarily, the defect detection system may be a host (or server) with specific data processing capabilities.

[0028] See also Figure 1, the defect detection method 1000 may include steps S110 to S140.

[0029] In step S110 , the defect detection system extracts image features of the image to be detected.

[0030] According to an example embodiment, the image to be detected may be an image of an object to be detected, for example, a wafer, metal, cloth or other product to be detected.

[0031] According to an example embodiment, the image feature may be feature information used to describe and identify an image. For example, the image feature may include color features, texture features, shape features, space features, depth features, and the like.

[0032] For example, for an image to be inspected, the defect detection system may extract depth features from the image features of the image to be inspected.

[0033] According to example embodiments, the defect detection system may extract image features from an image to be inspected by a feature extractor.

[0034] Exemplarily, the feature extractor may be a pre-trained dataset such as ImageNet, COCO (Common Objects in Context), or VOC (Visual Object Classes).

[0035] The pre-trained ImageNet neural network model can be a variety of common open source pre-trained models such as Residual Network (ResNet), EfficientNet, Vision Transformer (ViT), etc.

[0036] In step S120, the defect detection system determines an expert model that matches the image to be detected based on the image features of the image to be detected.

[0037] Exemplarily, the expert model may be a model such as SimpleNet, Unified Anomaly Detection (UniAD), or DRAEM (Discriminatively Trained Reconstruction Embedding for Surface Anomaly Detection).

[0038] According to an example embodiment, the defect detection system may include at least one expert model. The at least one expert model may be a Mixture of Experts (MoE).

[0039] For example, the defect detection system can determine the target matching degree of the image to be detected according to the image features of the image to be detected through the routing network model. The defect detection system can determine the expert model with the highest target matching degree of the image to be detected as the expert model matching the image to be detected.

[0040] According to an example embodiment, the routing network model may be a multi-layer perceptron or a multi-layer convolutional neural network (CNN).

[0041] The target matching degree of the image to be detected may be a matching parameter between the image to be detected and the hybrid expert model.

[0042] For example, the defect detection system may determine the expert model to which the image to be detected is routed according to the target matching degree of the image to be detected, and the expert model to which the image to be detected is routed is the matched expert model.

[0043] In step S130 , the defect detection system determines a converted training representation of the matched expert model according to the image features of the image to be detected and the matched expert model.

[0044] According to an example embodiment, each expert model corresponds to a training representation. The training representation may be a set of techniques for the expert model to perform defect detection according to image features. The training representation of the expert model may be representation data of a preset expert model training. Since there may be a deviation between the training representation of the expert model and the image features of the image to be detected, the defect detection system may correct the deviation through an adaptive algorithm, and the defect detection system may determine the converted training representation of the expert model according to the image features of the image to be detected and the training representation of the matched expert model. The converted training representation may be a training representation of the expert model after adaptive training.

[0045] In step S140 , the defect detection system determines a detection result of the image to be detected according to the matched expert model and the converted training representation.

[0046] According to an example embodiment, the defect detection system may represent the detection result of the image to be detected through a thermal map. For example, the defect detection system may read the density or intensity of the image to be detected in the thermal map, thereby determining the surface defect situation of the object to be detected.

[0047] Through the above-mentioned embodiments, the defect detection method 1000 provided in the present application can extract the image features of the image to be detected, and determine the expert model matched with the image to be detected according to the image features of the image to be detected. The present application can determine the converted training representation of the matched expert model through the image features of the image to be detected and the matched expert model. The present application can determine the detection result of the image to be detected through the matched expert model and the converted training representation.

[0048] The defect detection method 1000 provided in the present application can correct the deviation between the image to be detected and the test image through an adaptive algorithm in the training representation of the expert model, thereby improving the accuracy of the expert model in defect detection.

[0049] Alternatively, see Figure 2 , step S120 may include step S121 and step S122.

[0050] In step S121, the defect detection system determines the target matching degree of the image to be detected according to the image features of the image to be detected. According to an example embodiment, the defect detection system may determine the target matching degree of the image to be detected through the routing network model. For example, the defect detection system may train the routing network model through the training image. The defect detection system inputs the image features of the image to be detected into the routing network model, and the routing network model may output the target matching degree corresponding to the image features.

[0051] Alternatively, see Figure 3 , step S121 may include steps S1211-S1214.

[0052] In step S1211, the defect detection system extracts image features of the training image set.

[0053] According to an example embodiment, the training image set may be a set of images for training the routing network model. For example, the defect detection system may extract image features from the training image set through a feature extractor.

[0054] For example, the image features extracted by the defect detection system from the training image set are , .in, is the image feature of the ith training image. TRAIN is the set of image features combined with the training images.

[0055] In step S1212, the defect detection system determines the loss target of the routing network model according to the image features of the training image set and the preset characterization parameters of the expert model.

[0056] According to an example embodiment, the loss target of the routing network model may be a loss function of the routing network model. The loss function of the routing network model may be an error function between an output of the routing network model and a true label.

[0057] According to an example embodiment, the preset characterization parameters may be parameters of a preset expert model for characterizing an image. The preset characterization parameters may be set according to a training image set. The preset characterization parameters may include parameters such as a label of the expert model and a training characterization used by the expert model.

[0058] For example, the defect detection system can determine the loss target of the routing network model according to the following formula: ; Where L is the loss target of the routing network model; m is the number of samples in the training image set, that is, the number of training images in the training image set; y i is the label of the expert model to which the i-th training image belongs; is the mean of the training representations used by the expert model to which the i-th training image belongs; n is the number of expert models; w j is the weight of the last layer of the routing network model.

[0059] In step S1213, the defect detection system determines the weight of the last layer of the routing network model according to the loss target of the routing network model.

[0060] According to an example embodiment, the defect detection system may optimize the loss target of the routing network model through an optimization algorithm to minimize the loss target of the routing network model. For example, the optimization algorithm may be an optimization algorithm such as Stochastic Gradient Descent (SGD) or Adaptive Moment Estimation (Adam).

[0061] According to an example embodiment, the defect detection system may determine the decision boundary of the loss target of the routing network model through an optimization algorithm. There may be multiple decision boundaries, and the multiple decision boundaries are independent of each other. The defect detection system may determine the minimum value of the loss target of the routing network model based on the determined decision boundary, thereby determining the weight of the last layer of the routing network model.

[0062] In step S1214, the defect detection system determines the target matching degree of the image to be detected based on the image features of the image to be detected and the weights of the last layer of the routing network model.

[0063] According to an example embodiment, the defect detection system may determine the target matching degree of the image to be detected according to the following formula: ; Among them, PPD i is the target matching degree of the i-th image to be detected; w is the weight of the last layer of the routing network; is the image feature of the i-th image to be detected.

[0064] According to an example embodiment, w j Can be w is a two-dimensional vector matrix, vector matrix = feature dimension × category dimension (number of experts n).

[0065] In step S122, the defect detection system determines an expert model that matches the image to be detected according to the target matching degree.

[0066] The defect detection system can determine the expert model to which the image to be inspected is routed based on the maximum value of the target matching degree.

[0067] For example, a defect detection system can determine the expert model to route to based on the following formula: ; ; Among them, Experts is a collection of expert models, expert i is the expert model matched to the i-th image to be detected.

[0068] Through the above-mentioned embodiments, the defect detection method 1000 provided in the present application can train the routing network model so that the routing network model more accurately matches the expert model and the image features of the object to be detected, thereby improving the accuracy of the expert model for defect detection.

[0069] Alternatively, see Figure 4 , step S130 may include step S131 and step S132.

[0070] In step S131 , the defect detection system determines a training representation corresponding to the matched expert model according to the matched expert model.

[0071] According to an example embodiment, each expert model corresponds to a training representation. After the defect detection system determines the expert model that matches the image to be detected, it can determine the training representation corresponding to the expert model.

[0072] In step S132, the defect detection system determines the converted training representation of the matched expert model according to the image features of the image to be detected and the training representation.

[0073] According to an example embodiment, the defect detection system may further calculate the mean and standard deviation of the image features of the image to be detected based on the image features of the image to be detected. The defect detection system may further calculate the mean and standard deviation of the training representation of the expert model based on the training representation of the expert model. The defect detection system may determine the converted training representation of the expert model based on the mean and standard deviation of the image features of the image to be detected and the mean and standard deviation of the training representation of the expert model. For example, a defect detection system can determine the converted training representation of the expert model according to the following formula: ; Among them, mean(test i ) is test i The mean of std(test i ) is test i standard deviation; f is the training representation of the expert model; p is the mean of f; s is the standard deviation of f. z Converted trained representations for expert models.

[0074] Optionally, in step S140, the defect detection system may determine the detection result of the image to be detected according to the following formula: ; Among them, Mask is the detection result of the image to be detected.

[0075] Through the above-mentioned embodiments, the defect detection method 1000 provided in the present application can determine the converted training representation of the expert model through the training representation of the expert model and the image features of the image to be detected, and the present application can determine the detection result of the image to be detected through the converted training representation of the expert model.

[0076] The defect detection method 1000 provided in the present application can transform the training representation of the expert model through an adaptive algorithm, thereby correcting the deviation between the image to be detected and the test image, thereby improving the accuracy of the expert model in defect detection.

[0077] According to another aspect of the present application, the present application provides a defect detection system based on a hybrid expert model. Figure 5 The defect detection system 200 may include an image feature extraction module 210 , a path network matching module 220 , a processing module 230 and at least one expert model 240 .

[0078] According to an example embodiment, the image feature extraction module 210 extracts image features of the image to be detected.

[0079] According to an example embodiment, the image to be detected may be an image of an object to be detected, for example, a wafer, metal, cloth or other product to be detected.

[0080] According to an example embodiment, the image feature may be information used to describe and identify an image. For example, the image feature may include color features, texture features, shape features, space features, depth features, and the like.

[0081] For example, for the image to be detected, the image feature extraction module 210 may extract depth features from the image features of the image to be detected.

[0082] According to an example embodiment, the image feature extraction module 210 may be a feature extractor. For example, the feature extractor may be a pre-trained dataset such as ImageNet, COCO (Common Objects in Context), or VOC (Visual Object Classes).

[0083] The pre-trained ImageNet neural network model can be a variety of common open source pre-trained models such as Residual Network (ResNet), EfficientNet, Vision Transformer (ViT), etc.

[0084] According to an example embodiment, the path network matching module 220 determines the expert model 240 that matches the image to be detected according to image features of the image to be detected.

[0085] According to an example embodiment, the at least one expert model 240 may be a Mixture of Experts (MoE).

[0086] For example, the path network matching module 220 may be a routing network model. The path network matching module 220 determines the target matching degree of the image to be detected according to the image features of the image to be detected. The path network matching module 220 may determine the expert model with the highest target matching degree of the image to be detected as the expert model 240 matched with the image to be detected.

[0087] According to an example embodiment, the routing network model may be a multi-layer perceptron or a multi-layer convolutional neural network (CNN).

[0088] The target matching degree of the image to be detected may be a matching parameter between the image to be detected and the hybrid expert model.

[0089] For example, the path network matching module 220 may determine the expert model 240 to which the image to be detected is routed according to the target matching degree of the image to be detected, and the expert model 240 to which the image to be detected is routed is the matched expert model 240 .

[0090] According to an example embodiment, the processing module 230 determines the converted training representation of the matched expert model 240 according to the image features of the image to be detected and the matched expert model 240 .

[0091] According to an example embodiment, each expert model 240 corresponds to a training representation. The training representation may be a set of techniques for the expert model 240 to perform defect detection according to image features. The training representation of the expert model 240 may be representation data for training of the preset expert model 240. Since there may be a deviation between the training representation of the expert model 240 and the image features of the image to be detected, the processing module 230 may correct the deviation through an adaptive algorithm, and the processing module 230 may determine the converted training representation of the expert model 240 according to the image features of the image to be detected and the training representation of the matched expert model 240. The converted training representation may be a training representation of the expert model 240 after adaptive training.

[0092] According to an example embodiment, the matched expert model 240 determines a detection result of the image to be detected according to the matched expert model 240 and the converted training representation.

[0093] According to an example embodiment, the matched expert model 240 may represent the detection result of the image to be detected through a thermal map. For example, the matched expert model 240 may read the density or intensity of the image to be detected in the thermal map, thereby determining the surface defect of the object to be detected.

[0094] The expert model 240 may be a model such as a simple network (SimpleNet), a unified anomaly detection (Unified Anomaly Detection, UniAD) or a DRAEM (Discriminatively Trained Reconstruction Embedding for Surface Anomaly Detection).

[0095] Through the above-mentioned embodiments, the present application can extract the image features of the image to be detected and determine the expert model 240 matched with the image to be detected according to the image features of the image to be detected. The present application can determine the converted training representation of the matched expert model 240 through the image features of the image to be detected and the matched expert model 240. The present application can determine the detection result of the image to be detected through the matched expert model 240 and the converted training representation.

[0096] The present application can correct the deviation between the image to be detected and the test image through an adaptive algorithm in the training representation of the expert model 240, thereby improving the accuracy of the expert model 240 in defect detection.

[0097] Optionally, the path network matching module 220 determines the target matching degree of the image to be detected according to the image features of the image to be detected. For example, the path network matching module 220 can train the image feature extraction module 210 (routing network model) through training images. The image feature extraction module 210 inputs the image features of the image to be detected into the path network matching module 220 (routing network model), and the path network matching module 220 (routing network model) can output the target matching degree corresponding to the image features.

[0098] Optionally, the image feature extraction module 210 extracts image features of the training image set.

[0099] According to an example embodiment, the training image set may be a set of images for training the routing network model. For example, the image feature extraction module 210 may extract image features from the training image set through a feature extractor.

[0100] For example, the image feature extraction module 210 extracts the image features of the training image set as , .in, is the image feature of the ith training image. TRAIN is the set of image features combined with the training images.

[0101] According to an example embodiment, the path network matching module 220 determines the loss target of the routing network model according to the image features of the training image set and the preset characterization parameters of the expert model 240 .

[0102] According to an example embodiment, the loss target of the routing network model may be a loss function of the routing network model. The loss function of the routing network model may be an error function between an output of the routing network model and a true label.

[0103] According to an example embodiment, the preset characterization parameters may be parameters of the characterization image of the preset expert model 240. The preset characterization parameters may be set according to the training image set. The preset characterization parameters may include parameters such as the label of the expert model 240 and the training characterization used by the expert model 240.

[0104] For example, the path network matching module 220 may determine the loss target of the routing network model according to the following formula: ; Where L is the loss target of the routing network model; m is the number of samples in the training image set, that is, the number of training images in the training image set; y i is the label of the expert model 240 to which the i-th training image belongs; is the mean of the training representations used by the expert model 240 to which the i-th training image belongs; n is the number of expert models; w j is the weight of the last layer of the routing network model.

[0105] According to an example embodiment, the path network matching module 220 determines the weight of the last layer of the routing network model according to the loss target of the routing network model.

[0106] According to an example embodiment, the path network matching module 220 can optimize the loss target of the routing network model through an optimization algorithm to minimize the loss target of the routing network model. For example, the optimization algorithm can be an optimization algorithm such as Stochastic Gradient Descent (SGD) or Adaptive Moment Estimation (Adam).

[0107] According to an example embodiment, the path network matching module 220 can determine the decision boundary of the loss target of the routing network model through an optimization algorithm. There can be multiple decision boundaries, and the multiple decision boundaries are independent of each other. The path network matching module 220 can determine the minimum value of the loss target of the routing network model according to the determined decision boundary, thereby determining the weight of the last layer of the routing network model.

[0108] According to an example embodiment, the path network matching module 220 determines the target matching degree of the image to be detected based on the image features of the image to be detected and the weights of the last layer of the routing network model.

[0109] According to an example embodiment, the path network matching module 220 may determine the target matching degree of the image to be detected according to the following formula: ; Among them, PPD i is the target matching degree of the i-th image to be detected; w is the weight of the last layer of the routing network; is the image feature of the i-th image to be detected.

[0110] According to an example embodiment, w j Can be w is a two-dimensional vector matrix, vector matrix = feature dimension × category dimension (number of experts n).

[0111] According to an example embodiment, the path network matching module 220 determines the expert model 240 that matches the image to be detected according to the target matching degree.

[0112] The path network matching module 220 may determine the expert model 240 to which the image to be detected is routed according to the maximum value of the target matching degree.

[0113] For example, the path network matching module 220 may determine the expert model 240 to be routed according to the following formula: ; ; Among them, Experts is a collection of 240 expert models, expert i The expert model 240 matched to the i-th image to be detected.

[0114] Through the above-mentioned embodiments, the present application can train the routing network model so that the path network matching module 220 (routing network model) can more accurately match the expert model 240 and the image features of the object to be detected, thereby improving the accuracy of the expert model 240 for defect detection.

[0115] Optionally, the processing module 230 determines a training representation corresponding to the matched expert model 240 according to the matched expert model 240 .

[0116] According to an example embodiment, each expert model 240 corresponds to a training representation. After the processing module 230 determines the expert model 240 that matches the image to be detected, it can determine the training representation corresponding to the expert model 240.

[0117] According to an example embodiment, the processing module 230 determines the converted training representation of the matched expert model 240 according to the image features of the image to be detected and the training representation.

[0118] According to an example embodiment, the processing module 230 may also calculate the mean and standard deviation of the image features of the image to be detected based on the image features of the image to be detected. The processing module 230 may also calculate the mean and standard deviation of the training representation of the expert model 240 based on the training representation of the expert model 240. The processing module 230 may determine the converted training representation of the expert model 240 based on the mean and standard deviation of the image features of the image to be detected and the mean and standard deviation of the training representation of the expert model 240. For example, the processing module 230 may determine the converted training representation of the expert model 240 according to the following formula: ; Among them, mean(test i ) is test iThe mean of std(test i ) is test i standard deviation; f is the training representation of the expert model 240; p is the mean of f; s is the standard deviation of f. z is the converted training representation of the expert model 240.

[0119] Optionally, the matched expert model 240 may determine the detection result of the image to be detected according to the following formula: ; Among them, Mask is the detection result of the image to be detected.

[0120] Through the above embodiments, the present application can determine the converted training representation of the expert model through the training representation of the expert model and the image features of the image to be detected, and the present application can determine the detection result of the image to be detected through the converted training representation of the expert model.

[0121] The present application can transform the training representation of the expert model through an adaptive algorithm, thereby correcting the deviation between the image to be detected and the test image, thereby improving the accuracy of the expert model in defect detection.

[0122] According to another aspect of the present application, the present application further provides a non-volatile computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the defect detection method based on the hybrid expert model as described above can be implemented.

[0123] According to another aspect of the present application, the present application also provides an electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors can implement the defect detection method based on the hybrid expert model as described above.

[0124] According to another aspect of the present application, the present application also provides a computer program product, including: a computer program stored on a computer-readable storage medium; the computer program includes program instructions, and when the program instructions are executed by the computer, the computer executes the defect detection method based on the hybrid expert model as described above.

[0125] Finally, it should be noted that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Although the present application is described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions of the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A defect detection method based on a hybrid expert model, characterized in that: The defect detection method comprises: Extracting image features of the image to be detected; Determining an expert model that matches the image to be detected according to image features of the image to be detected; Determining a converted training representation of the matched expert model according to the image features of the image to be detected and the matched expert model; A detection result of the image to be detected is determined according to the matched expert model and the converted training representation.

2. The defect detection method according to claim 1, characterized in that: The step of determining an expert model matching the image to be detected according to the image features of the image to be detected comprises: Determining the target matching degree of the image to be detected according to the image features of the image to be detected; An expert model matching the image to be detected is determined according to the target matching degree.

3. The defect detection method according to claim 2, characterized in that: Determining the target matching degree of the image to be detected according to the image features of the image to be detected includes: Extracting image features of a training image set; Determining a loss target of a routing network model according to image features of the training image set and preset characterization parameters of an expert model; Determining the weight of the last layer of the routing network model according to the loss target of the routing network model; The target matching degree of the image to be detected is determined according to the image features of the image to be detected and the weight of the last layer of the routing network model.

4. The defect detection method according to claim 3, characterized in that: The step of determining the converted training representation of the matched expert model according to the image features of the image to be detected and the matched expert model comprises: Determining, according to the matched expert model, a training representation corresponding to the matched expert model; The converted training representation of the matched expert model is determined according to the image features of the image to be detected and the training representation.

5. A defect detection system based on a hybrid expert model, characterized in that: The defect detection system includes at least one expert model, and the defect detection system also includes: An image feature extraction module extracts image features of the image to be detected; A path network matching module determines an expert model matched with the image to be detected according to image features of the image to be detected; A processing module, determining, according to the image features of the image to be detected and the matched expert model, a converted training representation of the matched expert model; The matched expert model determines defects of the image to be detected according to the converted training representation of the matched expert model.

6. The defect detection system according to claim 5, characterized in that: The path network matching module also determines the target matching degree of the image to be detected according to the image features of the image to be detected; The path network matching module also determines the expert model matched by the image to be detected according to the target matching degree.

7. The defect detection system according to claim 6, characterized in that: The image feature extraction module also extracts image features of the training image set; The path network matching module also determines a loss target of the routing network model based on the graphic features of the training image set and the preset characterization parameters of the at least one expert model; The path network matching module also determines the weight of the last layer of the routing network model according to the loss target of the routing network model; The path network matching module also determines the target matching degree of the image to be detected according to the image features of the image to be detected and the weight of the last layer of the routing network model.

8. The defect detection system according to claim 7, characterized in that: The processing module also determines the training representation corresponding to the matched expert model according to the matched expert model; The converted training representation of the matched expert model is determined according to the image features of the image to be detected and the training representation.

9. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the defect detection method based on a hybrid expert model as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Sunflower disease recognition method based on random forest method

    CN107330892A

  • Bare soil coverage detection method based on hybrid expert model

    CN117115090A

  • Simulation learning mixed sample processing method and device based on visual pre-training model

    CN117975190A

  • Target detection method, model training method and related device

    CN118097341A

  • Defect detection method based on adaptive template comparison

    CN119006360A

Cited By

  • Semiconductor defect detection method and system and storage medium

    CN120707516A