Defect detection method and system based on cognitive motivation-driven abnormal perception induction
By employing a cognitively driven anomaly perception-induced defect detection method, a closed-loop perception mechanism is constructed using pseudo-anomaly images to train the model. This solves the problem of scarcity of real negative samples in defect detection systems, achieving high-precision defect detection and spatial localization, and improving the system's generalization ability and interpretability.
Patent Information
- Application Number
- CN202511417962.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-09-30
AI Technical Summary
Existing defect detection systems rely on supervised classifiers or image reconstruction models, which require a large number of anomalous negative samples during training. However, in real-world applications, anomalous samples are scarce and of complex types, resulting in limited detection capabilities for unseen defects, especially in complex industrial surfaces or medical images where generalization ability is insufficient.
An anomaly perception-induced defect detection method based on cognitive motivation is adopted. Multi-scale features are extracted through the backbone feature extraction module, an expected memory modeling module is constructed to generate pseudo-anomaly images, the deviation vector and response value are calculated using the feature deviation modeling module, and the sensitivity and discrimination ability of the model to structural deviation are optimized by combining the anomaly perception scoring module, so as to achieve high-precision detection without real negative samples.
In the absence of real defect samples, pseudo-anomaly samples are actively constructed to stimulate the model's sensitivity to abnormal deviations, build a closed-loop perception mechanism, significantly improve the detection capability and response accuracy of unknown defect types, and output anomaly response heatmaps with spatial interpretability, thereby enhancing the interpretability and practicality of the system.
Smart Images

Figure CN120894369B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision and intelligent defect detection, and particularly to an abnormal perception induced defect detection method and system based on cognitive motivation driving. BACKGROUND
[0002] Current defect detection systems generally rely on supervised classifiers or image reconstruction models, and a large number of negative samples containing abnormalities are required in the training process. However, in real-world applications, abnormal samples are often scarce, complex in type, and difficult to define, which limits the detection ability of existing methods for unseen defects. Especially in complex industrial surfaces or medical images, the abnormal structure is diverse, which leads to insufficient generalization ability of existing methods.
[0003] Human perception of abnormalities is mainly based on long-term memory of "normal patterns" and perception of prediction deviation. In the case of not seeing the abnormality, people can activate attention through the slight destruction of the structure and respond to the abnormal area. Inspired by this ability, an abnormal modeling method without real negative samples can be constructed. SUMMARY
[0004] The purpose of the present application is to provide an abnormal perception induced defect detection method and system based on cognitive motivation driving to solve the problems in the background art.
[0005] To achieve the above purpose, the present application provides an abnormal perception induced defect detection method based on cognitive motivation driving, comprising the following steps:
[0006] S1, a backbone feature extraction module encodes the input image in multiple scales to extract global structure and local texture information;
[0007] S2, the positive sample features extracted in S1 are stored in an expected memory modeling module to build a feature distribution model representing the normal state;
[0008] S3, a structure perturbation generation module applies pseudo abnormal perturbation to the structure of the input image to generate pseudo abnormal image samples;
[0009] S4, the pseudo abnormal images in S3 are encoded again by the feature extractor and compared with the input image features, and the deviation vector and response value representing the abnormality degree are calculated by the feature deviation modeling module;
[0010] S5, the deviation degrees of the input image and the pseudo abnormal image samples are input into an abnormal perception scoring module, and the sensitivity and discrimination ability of the model to structural deviation are optimized through a joint training strategy;
[0011] S6, the deviation degree and abnormal response map of any input image are calculated to realize the detection and spatial positioning of potential defects.
[0012] Preferably, the content of S1 is as follows:
[0013] Input image Multi-scale feature representations are extracted using a deep convolutional network:
[0014] ;
[0015] in, Input image; This is the feature extraction function, with parameters as follows: ; For the extracted 3D feature vectors.
[0016] Preferably, the feature distribution model in S2 consists of the expectation center and the feature covariance matrix, as detailed below:
[0017] Build includes A memory bank containing the features of positive samples:
[0018] ;
[0019] Then, the mean and covariance of the global normal sample features are calculated:
[0020] ;
[0021] in, The expected center of the normal sample; It is the covariance matrix; Indicates the first i One positive sample image; Let i represent the features of the i-th positive sample image.
[0022] Preferably, the pseudo-anomaly perturbations in S3 include local occlusion (occluding certain areas), edge destruction (eroding image boundaries), texture swapping (region rearrangement), and low-resolution degradation.
[0023] Preferably, a pseudo-anomaly image is constructed in S3. As for the input image Structural perturbation version:
[0024] ;
[0025] in, This represents the perturbation function.
[0026] Preferably, in S4, the deviation vector and response value representing the degree of anomaly are calculated by the feature deviation modeling module as follows:
[0027] The deviation of the pseudo-anomaly image from the input image is measured using the feature space:
[0028] ;
[0029] in, Abnormal activation represents the strength of the model's response to structural deviations; This indicates the degree of deviation between the perturbed image and the original image.
[0030] Preferably, the content of the S5 anomaly detection and scoring module is as follows:
[0031] Constructing anomaly scoring functions To detect whether the image contains deviations:
[0032] ;
[0033] This indicates the score of the anomaly graph;
[0034] Using the binary cross-entropy loss function:
[0035] ;
[0036] Here, BCE represents Binary Cross-Entropy loss.
[0037] Preferably, the test image Anomaly scores are given in the following manner:
[0038] ;
[0039] in, The disturbance deviates from the activation value; The distance from the center of expectation; The fusion coefficient; This represents the test image.
[0040] An anomaly perception-induced defect detection system driven by cognitive motivation includes:
[0041] The backbone feature extraction module is used to encode the input image at multiple scales and extract global structure and local texture information;
[0042] The expected memory modeling module is used to construct a feature distribution model representing the normal state using the extracted positive sample features;
[0043] The structural perturbation generation module is used to apply pseudo-anomaly perturbations to the structure of the input image and generate pseudo-anomaly image samples.
[0044] The feature deviation modeling module is used to compare the features of the pseudo-anomaly image with the features of the input image and calculate the deviation vector and response value that represent the degree of anomaly.
[0045] The anomaly perception scoring module is used to optimize the model's sensitivity and discrimination ability to structural deviations by jointly training the degree of deviation between the input image and the pseudo-anomaly image samples.
[0046] Therefore, the present invention employs the above-mentioned abnormal perception-induced defect detection method and system based on cognitive motivation, which has the following beneficial effects:
[0047] (1) In the absence of real defect samples, actively construct representative pseudo-anomaly samples;
[0048] (2) Utilize the expected memory structure modeled from positive samples to enhance the model's sensitivity to abnormal deviations;
[0049] (3) Construct a closed-loop perception mechanism consisting of “expectation → deviation → response” within the model;
[0050] (4) Significantly improves the detection capability and response accuracy for unknown defect types;
[0051] (5) Output anomaly response heatmaps with spatial interpretability to enhance the interpretability and practicality of the system.
[0052] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0053] Figure 1 This is a flowchart illustrating the overall process of the present invention: an anomaly perception-induced defect detection method driven by cognitive motivation. Detailed Implementation
[0054] The following detailed description of embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0055] Please see Figure 1 A method for detecting defects induced by abnormal perception based on cognitive motivation includes the following steps:
[0056] S1, the backbone feature extraction module performs multi-scale encoding on the input image to extract global structure and local texture information.
[0057] Input image Multi-scale feature representations are extracted using a deep convolutional network:
[0058] ;
[0059] in, Input image; This is the feature extraction function, with parameters as follows: ; For the extracted 3D feature vectors.
[0060] S2. Store the positive sample features extracted from S1 into the expected memory modeling module to construct a feature distribution model representing the normal state.
[0061] Build includes A memory bank containing the features of positive samples:
[0062] ;
[0063] Then, the mean and covariance of the global normal sample features are calculated:
[0064] ;
[0065] in, The expected center of the normal sample; It is the covariance matrix; Indicates the first i One positive sample image; Let i represent the features of the i-th positive sample image.
[0066] S3. The structure perturbation generation module applies pseudo-anomaly perturbations to the structure of the input image to generate pseudo-anomaly image samples.
[0067] False anomaly perturbations include local occlusion (occluding certain areas), edge destruction (eroding image boundaries), texture swapping (region rearrangement), and low-resolution degradation.
[0068] Constructing pseudo-anomaly images As for the input image Structural perturbation version:
[0069] ;
[0070] in, This represents the perturbation function.
[0071] S4. The pseudo-anomaly image in S3 is encoded again by the feature extractor and compared with the features of the input image. The feature deviation modeling module calculates the deviation vector and response value that represent the degree of anomaly.
[0072] The deviation of the pseudo-anomaly image from the input image is measured using the feature space:
[0073] ;
[0074] in, Abnormal activation represents the strength of the model's response to structural deviations; This indicates the degree of deviation between the perturbed image and the original image.
[0075] S5. Input the degree of deviation between the input image and the pseudo-anomaly image sample into the anomaly perception scoring module, and optimize the model's sensitivity and discrimination ability to structural deviation through a joint training strategy.
[0076] Constructing anomaly scoring functions To detect whether the image contains deviations:
[0077] ;
[0078] This indicates the score of the anomaly graph;
[0079] Using the binary cross-entropy loss function:
[0080] ;
[0081] Here, BCE represents Binary Cross-Entropy loss.
[0082] Test image Anomaly scores are given in the following manner:
[0083] ;
[0084] in, The disturbance deviates from the activation value; The distance from the center of expectation; The fusion coefficient; This represents the test image.
[0085] S6. Calculate the deviation and abnormal response map of any input image to realize the detection and spatial localization of potential defects.
[0086] An anomaly perception-induced defect detection system driven by cognitive motivation includes:
[0087] The backbone feature extraction module is used to encode the input image at multiple scales and extract global structure and local texture information;
[0088] The expected memory modeling module is used to construct a feature distribution model representing the normal state using the extracted positive sample features;
[0089] The structural perturbation generation module is used to apply pseudo-anomaly perturbations to the structure of the input image and generate pseudo-anomaly image samples.
[0090] The feature deviation modeling module is used to compare the features of the pseudo-anomaly image with the features of the input image and calculate the deviation vector and response value that represent the degree of anomaly.
[0091] The anomaly perception scoring module is used to optimize the model's sensitivity and discrimination ability to structural deviations by jointly training the degree of deviation between the input image and the pseudo-anomaly image samples.
[0092] Each module forms a unified closed-loop structure through data flow and gradient propagation logic, realizing a complete cognitive detection process of "memory construction → anomaly induction → deviation modeling → perception judgment".
[0093] Therefore, this invention employs the aforementioned cognitively driven anomaly perception-induced defect detection method and system. By constructing an anomaly induction mechanism using only positive samples, it achieves high-precision defect detection without the need for negative samples. The system possesses structural deviation perception capabilities, a cognitively driven response mechanism, and interpretability of anomaly heatmaps, significantly improving generalization ability and practical value. It is particularly suitable for application deployment in industrial scenarios where defect samples are scarce. It can be widely applied to industrial visual quality inspection, early screening of medical images, and other anomaly detection tasks dominated by positive samples.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A defect detection method based on cognitive motivation-driven anomaly perception, characterized in that, Includes the following steps: S1. The backbone feature extraction module performs multi-scale encoding on the input image to extract global structure and local texture information; S2. Store the positive sample features extracted in S1 into the expected memory modeling module to construct a feature distribution model representing the normal state. S3. The structure perturbation generation module applies pseudo-anomaly perturbation to the structure of the input image to generate pseudo-anomaly image samples. S4. The pseudo-anomaly image in S3 is encoded again by the feature extractor and compared with the features of the input image. The feature deviation modeling module calculates the deviation vector and response value that represent the degree of anomaly. S5. Input the degree of deviation between the input image and the pseudo-anomaly image samples into the anomaly perception scoring module, and optimize the model's sensitivity and discrimination ability to structural deviations through a joint training strategy; the anomaly perception scoring module contains the following: Constructing anomaly scoring functions To detect whether the image contains deviations: ; This indicates the score of the anomaly graph; Using the binary cross-entropy loss function: ; Where BCE represents Binary Cross-Entropy loss; Test image Anomaly scores are given in the following manner: ; in, To test the abnormal activation levels of the images; The distance from the center of expectation; The fusion coefficient; Indicates the test image; S6. Calculate the deviation and abnormal response map of any input image to realize the detection and spatial localization of potential defects.
2. The abnormal perception-induced defect detection method based on cognitive motivation as described in claim 1, characterized in that, The content of S1 is as follows: Input image Multi-scale feature representations are extracted using a deep convolutional network: ; in, Input image; This is the feature extraction function, with parameters as follows: ; For the extracted 3D feature vectors.
3. The abnormal perception-induced defect detection method based on cognitive motivation as described in claim 2, characterized in that: The feature distribution model in S2 consists of the expectation center and the feature covariance matrix, as detailed below: Build includes A memory bank of positive sample features: ; Then, the mean and covariance of the global normal sample features are calculated: ; in, The expected center of the normal sample; It is the covariance matrix; Indicates the first One positive sample image; Let i represent the features of the i-th positive sample image.
4. The abnormal perception-induced defect detection method based on cognitive motivation as described in claim 3, characterized in that: False anomaly perturbations in S3 include local occlusion, edge destruction, texture swapping, and low-resolution degradation.
5. The abnormal perception-induced defect detection method based on cognitive motivation as described in claim 4, characterized in that: Constructing a pseudo-anomaly image in S3 As for the input image Structural perturbation version: ; in, This represents the perturbation function.
6. The abnormal perception-induced defect detection method based on cognitive motivation as described in claim 5, characterized in that, The deviation vector and response value, representing the degree of anomaly, calculated by the feature deviation modeling module in S4, are as follows: The deviation of the pseudo-anomaly image from the input image is measured using the feature space: ; in, Abnormal activation represents the strength of the model's response to structural deviations; This indicates the degree of deviation between the perturbed image and the original image.
7. A cognitive motivation-driven anomaly perception-induced defect detection system, employing the cognitive motivation-driven anomaly perception-induced defect detection method as described in any one of claims 1-6, characterized in that, include: The backbone feature extraction module is used to encode the input image at multiple scales and extract global structure and local texture information; The expected memory modeling module is used to construct a feature distribution model representing the normal state using the extracted positive sample features; The structural perturbation generation module is used to apply pseudo-anomaly perturbations to the structure of the input image and generate pseudo-anomaly image samples. The feature deviation modeling module is used to compare the features of the pseudo-anomaly image with the features of the input image and calculate the deviation vector and response value that represent the degree of anomaly. The anomaly perception scoring module is used to optimize the model's sensitivity and discrimination ability to structural deviations by jointly training the degree of deviation between the input image and the pseudo-anomaly image samples.
Citation Information
Patent Citations
High-speed strip steel defect detection method and system based on anomaly enhancement and image reconstruction
CN120451674A