A Differential Response Token Screening Method for Industrial Defect Detection

By using token-level differential response modeling and local neighborhood consistency correction, the stability and computational efficiency issues in industrial defect detection are resolved, enabling accurate identification and efficient screening of defects.

CN123118575APending Publication Date: 2026-11-17CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611404074.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing industrial defect detection technologies lack stability in scenarios involving cross-batch, cross-workstation, weak texture defects, and minor defects. They also struggle to effectively distinguish between isolated noise and spatially continuous abnormal regions, and the computational efficiency of multimodal visual language models is low.

Method used

By acquiring reference normal information from the industrial image under test, token-level difference response modeling is performed. Combined with local neighborhood consistency correction, core abnormal tokens and boundary neighborhood tokens are selected to generate visual cue information.

Benefits of technology

It improves the stability and computational efficiency of defect detection, reduces false responses, and enhances the model's ability to identify the defect subject and boundary context, making it suitable for fixed workstations and standardized production line scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118575A_ABST
    Figure CN123118575A_ABST
Patent Text Reader

Abstract

This invention provides a differential response token screening method for industrial defect detection, belonging to the fields of industrial vision and anomaly detection, and multimodal visual language model-assisted discrimination technology. The method includes the following steps: acquiring the industrial image to be tested and its corresponding reference normal information; performing spatial correspondence processing on the industrial image to be tested and extracting the token features to be tested; extracting or reading the reference token features at the corresponding location according to the type of the reference normal information; calculating the token-level differential response and generating a differential visual prior map after local neighborhood consistency correction; determining suspected defect candidate regions based on threshold and connected component analysis; screening core anomaly tokens and boundary neighborhood tokens within the extended range of the candidate regions, and obtaining a simplified token set through merging, deduplication, and quantity constraints; and generating visual cue information for defect discrimination based on this set. This method can reduce the interference of irrelevant tokens on discrimination, retain the defect subject and boundary context, and improve the stability of candidate region localization and discrimination efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical fields of industrial visual inspection, industrial anomaly detection, image feature screening, and multimodal visual language model-assisted discrimination, and relates to a differential response token screening method for industrial defect detection. Background Technology

[0002] Industrial defect detection is a crucial technical aspect of intelligent manufacturing, quality control, and non-destructive testing. Industrial defects typically manifest as scratches, cracks, porosity, foreign objects, notches, ablation, misalignment, weld abnormalities, assembly deviations, contact deformation, and discontinuous areas within materials. Compared to natural image target detection, industrial defects are characterized by small size, varied shapes, repetitive backgrounds, blurred defect boundaries, long-tailed sample distribution, high cost of acquiring abnormal samples, and significant differences in imaging conditions across different inspection stations.

[0003] Existing industrial defect detection technologies mainly include methods based on manual features and threshold rules, methods based on traditional machine learning classifiers, supervised detection methods based on convolutional neural networks or Transformer networks, methods based on self-supervised or unsupervised anomaly detection, and multimodal visual language model-assisted discrimination methods that have emerged in recent years. While these methods can achieve certain results in specific scenarios, they still suffer from insufficient stability in scenarios involving cross-batch, cross-workstation, weak-texture defects, minute defects, and low-labeled samples.

[0004] Supervised defect detection methods typically require a large number of labeled defect images to train classification, detection, or segmentation models. However, in actual production lines, normal samples far outnumber abnormal samples, some defect types occur infrequently, and defect categories and morphologies are constantly changing, making models susceptible to imbalanced samples, annotation noise, and scene migration. For new products, new workstations, or new defect types, re-collecting and labeling a large number of samples is costly.

[0005] In unsupervised or few-sample anomaly detection methods, normal templates or normal feature distributions are often established using defect-free samples, and anomalies are then identified by the difference between the image under test and normal information. This type of method helps reduce dependence on anomaly sample annotations; however, existing techniques typically focus more on overall image reconstruction errors, pixel-level saliency maps, or global feature distances, making them susceptible to changes in illumination, imaging noise, subtle registration deviations, and repetitive background textures. When the defect size is small or the defect boundary transitions slowly with the background, the anomaly response may be masked by local noise, or a large number of isolated false responses may occur.

[0006] With the development of visual Transformers, self-supervised visual encoding networks, and multimodal visual language models, dividing industrial images into multiple image tokens and utilizing token features for defect understanding has become a feasible approach. Image tokens typically correspond to local image patches in the original image, carrying local texture, structural, and semantic information simultaneously. However, most areas in industrial images are usually normal backgrounds or repetitive structures. Directly inputting all image tokens into subsequent multimodal visual language models can easily introduce a large number of irrelevant tokens, increasing computational overhead and diluting minor defect tokens over long sequences.

[0007] Several existing methods employ fixed cropping windows, full-image input, manually set regions of interest (ROIs), or simple saliency thresholds to select tokens. Fixed cropping and manual ROI selection rely on prior experience and struggle to adapt to random variations in defect locations. Full-image input places high demands on model context length and computational resources. Simple threshold selection tends to retain only the highest-response local points, ignoring the defect boundary neighborhood and the contrast with the normal background, leading to difficulties in accurate defect morphology, boundaries, and categories in subsequent models. Anomaly detection methods based on memory banks, such as PatchCore, generate anomaly score maps by storing patch features of normal samples and calculating nearest-neighbor distances during inference, achieving good results on benchmark datasets like MVTec AD. However, PatchCore calculates anomaly scores position-by-position across the entire image patch, failing to distinguish between isolated noise responses and spatially continuous anomaly regions. In scenarios with weak texture defects or imaging noise, isolated high-scoring patches are easily misclassified as defect candidate regions. Furthermore, PatchCore's output is a full-image anomaly score map, without token-level simplification and selection to address the input length limitations of subsequent multimodal visual language models.

[0008] Therefore, there is an urgent need for a token screening method for industrial defect detection that can perform token-level difference modeling on the industrial image under test by combining reference normal information, retain spatially continuous abnormal regions while suppressing isolated noise responses, and simultaneously retain the defect subject token and boundary context token within the candidate region, thereby providing more concise, stable and interpretable visual cues for subsequent defect discrimination models. Summary of the Invention

[0009] In view of this, the purpose of this invention is to provide a differential response token screening method for industrial defect detection, to solve the problems of redundant whole-image token input, easy dilution of small defect tokens by normal background, difficulty in preserving boundary context by simple threshold screening, interference of candidate regions by isolated noise, and low discrimination efficiency of multimodal visual language models in the prior art. This invention further aims to provide a token-level differential response construction method that is compatible with both reference normal images and reference normal feature templates, making the method applicable to scenarios where a single reference normal image is available at a fixed workstation, as well as scenarios in standardized production lines where normal templates are pre-constructed from multiple defect-free samples.

[0010] To achieve the above objectives, the present invention provides the following technical solution: A differential response token screening method for industrial defect detection, the method specifically includes the following steps: S1. Acquire the industrial image to be tested, and determine the reference normal information corresponding to the industrial image to be tested based on the product category, detection station or imaging parameters of the industrial image to be tested. S2. Perform spatial correspondence processing on the industrial image to be tested and extract the image token feature set with a two-dimensional spatial location index; when the reference normal information is a reference normal image, perform corresponding spatial correspondence processing on the reference normal image and extract the reference token feature set; when the reference normal information is a reference normal feature template, read the corresponding template token feature according to the two-dimensional spatial location index of the image token to be tested to obtain the reference token feature set. S3. Calculate the token-level feature difference response value for the token features of the image to be tested and the reference token features at the corresponding spatial location, and construct a local neighborhood with the target token as the center. Based on the proportion of tokens whose difference response values ​​reach the high response judgment threshold and the degree of deviation of the target token response from the mean and standard deviation of the neighborhood response, perform local neighborhood consistency correction on the difference response value to suppress isolated high response tokens and maintain or enhance spatially continuous high response tokens, and obtain the difference visual prior map. S4. Determine the abnormal response threshold based on the difference visual prior map, mark the image tokens with response values ​​greater than or equal to the abnormal response threshold as abnormal candidate tokens, and perform connected component analysis based on the spatial location of the abnormal candidate tokens to obtain suspected defect candidate regions. S5. Within the suspected defect candidate area, a core anomaly token set is determined based on the difference response values ​​of each image token after local neighborhood consistency correction. Within the suspected defect candidate area and its extended neighborhood, a boundary neighborhood token set is determined based on the boundary contour, response gradient, or spatial adjacency relationship of the candidate area. The core anomaly token set and the boundary neighborhood token set are merged and deduplicated, and then filtered according to a preset token quantity constraint to obtain a simplified image token set for retaining the defect subject and its boundary context. S6. Based on the spatial location index of the simplified image token set and the difference visual prior map, generate visual cue information for industrial defect identification. The visual cue information includes candidate region boxes, candidate region masks, difference response heatmaps, or token location marker maps.

[0011] Further, in step S1, the reference normal information includes a reference normal image or a reference normal feature template; wherein, the reference normal image is a defect-free sample image acquired under the same product category, the same inspection station, and / or the same imaging conditions as the industrial image to be tested; the reference normal feature template is obtained by extracting Token features from multiple defect-free sample images that have been uniformly spatially aligned, and then performing mean aggregation, median aggregation, cluster center aggregation, or prototype feature aggregation at the same or corresponding two-dimensional spatial locations.

[0012] Furthermore, in step S2, the spatial correspondence processing includes at least one of size normalization, region of interest alignment, template matching, key point matching, edge contour matching, feature similarity matching, or image registration.

[0013] Further, in step S2, the image token features to be tested and the reference token features are extracted by a convolutional neural network, a visual Transformer network, a self-supervised visual coding network, a multimodal visual coding network, or an industrial defect feature extraction network; the image token is a local block feature obtained by dividing the image into blocks, a local feature corresponding to the position of the feature map grid, or a local feature unit in the output sequence of the visual encoder. Each image token has a two-dimensional spatial position index and corresponds to a local region in the image after spatial correspondence processing. The range of the local region is determined according to the image block size, feature map stride, receptive field, or spatial mapping relationship of the visual encoder.

[0014] Further, in step S3, the token-level feature difference response value is determined based on the current token feature difference, local neighborhood structure difference, and multi-level semantic difference; the current token feature difference, local neighborhood structure difference, and multi-level semantic difference are normalized respectively, and then fused according to their respective weights to obtain the first... Initial difference response value for each token:

[0015] in, Indicates the first The initial difference response value for each token. This represents the difference in characteristics of the current token after normalization. This represents the difference in local neighborhood structure after normalization. This represents the normalized multi-level semantic differences. The corresponding fusion weights, and satisfying ; The current token feature difference is based on the first [value] in the industrial image under test. The feature distance between a token feature and the reference token feature at the corresponding position in the reference normal information is determined; the local neighborhood structure difference is determined based on the feature relationship between the target token and the neighboring token in the industrial image under test, and the difference in the feature relationship between the corresponding token and the neighboring token in the reference normal information; the multi-level semantic difference is obtained by weighted fusion of the differences between the token features under test and the reference token features at corresponding spatial positions in multiple feature levels.

[0016] Furthermore, in step S3, the local neighborhood consistency correction includes: constructing a spatial neighborhood centered on the target token, and constructing a spatial continuous anomaly factor based on the distribution of anomalous responses within the neighborhood.

[0017] in, Indicates the first Each token corresponds to a high proportion of high-response tokens within its neighborhood. Indicates the first Each token corresponds to a spatial neighborhood. This indicates the threshold for judging a high response. The indicative function is represented; further, based on the degree of deviation of the target token response from the mean and standard deviation of the neighborhood responses, the normalized isolation deviation factor is determined:

[0018] in, and They represent the first The mean and standard deviation of the differential response values ​​within the spatial neighborhood corresponding to each token. To prevent positive numbers with a denominator of zero, adaptive corrections are made to the differential response based on the spatially continuous outlier factor and the normalized isolated deviation factor.

[0019] in, For continuous abnormal adjustment coefficients, For isolated outlier adjustment coefficients, and When isolated abnormal suppression terms Greater than continuous abnormal adjustment term When the correction factor is less than 1, the response value of isolated high-response tokens is reduced; when the continuous anomaly adjustment item... Not less than the isolated anomaly suppression term When the correction factor is greater than or equal to 1, it is used to maintain or enhance the response of spatially continuous anomalous regions.

[0020] Furthermore, in step S4, the abnormal response threshold is determined based on the response mean and response standard deviation, response quantile, adaptive threshold, or local window threshold of the difference visual prior map; connected component analysis is performed on adjacent abnormal candidate tokens, and further region merging and / or morphological processing can be performed to obtain the suspected defect candidate region.

[0021] Furthermore, in step S5, the core abnormal token screening process includes: determining the defect contribution score of each image token based on the difference response value after local neighborhood consistency correction, the local abnormality salience, and the spatial location of the candidate region; sorting the image tokens from high to low according to the defect contribution scores; and selecting core abnormal tokens according to a preset score threshold, a preset retention ratio, or an upper limit on the number of core abnormal tokens; the local abnormality salience is used to measure the degree of abnormal prominence of the target token relative to its spatial neighborhood tokens.

[0022] Furthermore, in step S5, the boundary neighborhood token screening process is determined based on the response change characteristics and spatial adjacency relationships around the core abnormal token. Specifically, it includes: selecting neighborhood tokens with a continuous transition relationship with the defect main area as boundary neighborhood tokens based on the differential response gradient changes within the suspected defect candidate area and its extended neighborhood, the spatial distance between the tokens and the core abnormal tokens, and the distribution of the core abnormal tokens; merging and deduplicating the core abnormal tokens and boundary neighborhood tokens, and then screening them according to a preset token quantity constraint to form a simplified image token set, so that the simplified image token set simultaneously contains defect main information and defect boundary context information.

[0023] Further, in step S6, the visual cue information is mapped to the original image coordinate system of the industrial image under test according to the two-dimensional spatial position index of the simplified image token set, and candidate region boxes, candidate region masks or token position marker maps are generated according to the image block size, feature map step size, image scaling ratio and / or spatial correspondence inverse transformation relationship; the visual cue information is used to input the industrial image under test and the industrial defect detection cue text together into the defect discrimination model or multimodal visual language model to obtain at least one of defect category, defect location, candidate region number, defect confidence or defect description information.

[0024] The beneficial effects of this invention are as follows: First, by referencing normal information to perform token-level difference modeling on the industrial image under test, this invention can highlight local areas that are inconsistent with the normal structure, so that the defect response is based on normal references of the same category, the same work station or the same imaging conditions, thereby reducing the risk of misjudgment caused by simply relying on global saliency or whole-image classification.

[0025] Second, the present invention introduces local neighborhood consistency correction after differential response calculation. It can distinguish between isolated noise response and spatially continuous abnormal region based on the proportion of high response tokens in the neighborhood around the target token and the degree of deviation of the target token response from the mean and standard deviation of the neighborhood response. This improves the stability of suspected defect candidate region and reduces false responses caused by imaging noise, registration micro-deviation or local texture fluctuation.

[0026] Third, this invention filters core anomaly tokens within the suspected defect candidate region based on the corrected differential response value, local response distribution, and spatial location of the candidate region, and retains boundary neighborhood tokens based on response gradient changes, token spatial distance, and core anomaly token distribution, enabling subsequent models to simultaneously obtain defect subject information and transition context between the defect and the normal background.

[0027] Fourth, this invention obtains a simplified image token set by merging, deduplication, and quantity constraints, which can reduce the input of irrelevant background tokens, reduce computational overhead and model context occupancy, and enable multimodal visual language models or other defect discrimination models to focus their attention on suspected defect areas, thereby improving discrimination efficiency and output interpretability.

[0028] Fifth, this invention is compatible with both reference normal images and reference normal feature templates. It can be used for difference comparison based on a single reference normal image in small-batch detection scenarios, and can also be used for batch rapid detection after pre-constructing reference normal feature templates in standardized production lines, thus having strong engineering adaptability.

[0029] Sixth, the visual prompts output by this invention can be represented as candidate region bounding boxes, candidate region masks, differential response heatmaps, or token location marker maps, which facilitate manual review, secondary model discrimination, defect report generation, and visualization and traceability of detection results.

[0030] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0031] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is a schematic diagram of the overall process of a differential response token screening method for industrial defect detection according to the present invention.

[0032] Figure 2 This is a schematic diagram illustrating the determination and construction of reference normal information in this invention.

[0033] Figure 3 This is a schematic diagram illustrating the token-level multi-factor differential response calculation and local neighborhood consistency adaptive correction of the present invention.

[0034] Figure 4 This is a schematic diagram illustrating the joint screening of the core anomaly token and boundary neighborhood token, and the generation of a simplified image token set in this invention.

[0035] Figure 5 This is a schematic diagram of the visual prompt information generation and defect identification process of the present invention. Detailed Implementation

[0036] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0037] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0038] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0039] In this specification, "Token" refers to a local feature unit in an image patch, feature map grid location, or visual encoder output sequence. Each Token has a corresponding two-dimensional spatial location index, which is used to identify the row and column position of the Token in the image grid and can be further mapped to the original image coordinate system according to the image patch size, scaling ratio, or registration transformation relationship.

[0040] The term "reference normal information" in this specification can refer to either a reference normal image or a reference normal feature template. A reference normal image represents a defect-free sample under the same or similar testing conditions as the industrial image under test; a reference normal feature template represents a normal feature baseline obtained by spatial alignment and token feature aggregation of multiple defect-free sample images.

[0041] The "difference visual prior map" referred to in this specification is a two-dimensional response map generated based on the difference response values ​​between the token features of the image under test and the reference token features. This response map corresponds to the token grid; a higher response value indicates that the corresponding local region is more likely to deviate from the normal reference structure.

[0042] Example 1: Token Filtering Based on Difference Response of Reference Normal Image like Figures 1 to 3 As shown, this embodiment is applicable to industrial inspection tasks where the product structure is relatively fixed, the inspection station is relatively stable, or the imaging conditions can perform spatial correspondence processing, such as X-ray image inspection of power equipment, appearance inspection of electronic components, surface defect inspection of metal materials, defect inspection of welded parts, and defect inspection of assemblies.

[0043] First, acquire the industrial image to be tested, and read the product category, inspection station, shooting angle, exposure parameters, image resolution, production batch, equipment model, or other information that can characterize the inspection conditions corresponding to the industrial image to be tested.

[0044] Based on the detection condition information, a reference normal image is determined from a pre-established defect-free sample library. The reference normal image is preferably a defect-free sample image that has the same product category, the same detection station, and the same or similar imaging conditions as the industrial image to be tested. When multiple candidate images exist in the defect-free sample library, the candidate defect-free sample images can be matched and sorted according to at least one of the following: product category consistency, detection station consistency, imaging parameter similarity, product structure contour matching degree, and global feature similarity. The defect-free sample image with the highest matching degree is then selected as the reference normal image.

[0045] In step S2, spatial correspondence processing is performed on the industrial image to be tested and the reference normal image. For images acquired at a fixed inspection station, size normalization, center cropping, region of interest extraction, or alignment based on tooling positioning points can be used. For images with translation, rotation, scale changes, or local deformation, at least one of template matching, key point matching, edge contour matching, feature similarity matching, or image registration can be used.

[0046] Spatial correspondence processing is used to establish the spatial positional correspondence between the industrial image under test and the reference normal image, so that the product structure in the industrial image under test and the corresponding normal structure in the reference normal image correspond to the same token grid position as much as possible, thereby reducing non-defect difference responses caused by imaging position offset, slight changes in viewing angle or image scaling.

[0047] After spatial correspondence processing is completed, the industrial image to be tested and the reference normal image are respectively input into the feature encoding network. The feature encoding network can be a convolutional neural network, a visual Transformer network, a self-supervised visual encoding network, a multimodal visual encoding network, or an industrial defect feature extraction network.

[0048] The industrial image under test and the reference normal image are divided into multiple local image blocks according to a preset or dynamically adjusted image block size, and each local image block corresponds to an image token. The image block size is determined based on the resolution of the industrial image under test, the expected scale of the defect of interest, and the number of input tokens required by the subsequent defect discrimination model. For the detection of minor defects, a smaller equivalent image block size can be used; for the detection of larger structural anomalies or detection scenarios with limited computing resources, a larger equivalent image block size can be used.

[0049] For size The input image, when the image patch size is The size of the resulting token grid can be represented as:

[0050] in, and These represent the number of rows and columns of the Token grid, respectively. Each Token has a corresponding two-dimensional spatial location index and can be mapped to the original image coordinate system of the industrial image under test based on the image patch size, image scaling ratio, and spatial correspondence transformation relationship. The feature encoding network obtains the Token feature set of the image under test:

[0051] And a set of reference token features:

[0052] in, Indicates the first element in the industrial image to be tested. The token characteristics corresponding to each spatial location This refers to token features that are located at the same or corresponding spatial position in a normal image. This indicates the total number of tokens.

[0053] In step S3, for the token features of the image to be tested and the reference token features at the corresponding spatial locations, the differences in current token features, local neighborhood structure, and multi-level semantic differences are calculated respectively.

[0054] The current token feature difference is used to reflect the direct differences between local features at corresponding spatial locations. When using cosine distance, the first... The current token characteristic differences of each token can be represented as:

[0055] in, To prevent positive numbers with a denominator of zero, the current token feature differences can also be determined using Euclidean distance, Mahalanobis distance, feature residuals, or learned feature distances.

[0056] The local neighborhood structure difference is used to reflect the changes in the local spatial structure between the target token and its surrounding tokens in the tested industrial image and the reference normal image. Let the first... The spatial neighborhood of each token is The differences in local neighborhood structure can then be expressed as:

[0057] in, This represents the similarity or distance metric between the features of two tokens. This represents the number of tokens within a spatial neighborhood. By comparing the feature relationships within corresponding neighborhoods in the tested industrial image and the reference normal image, the differences in local neighborhood structure can reflect changes in local structural arrangement, texture continuity, or relationships between adjacent components, thereby reducing unstable responses that rely solely on differences in the features of a single token.

[0058] When the feature encoding network outputs token features at multiple levels, the difference between the test token feature and the reference token feature is calculated at each level. Let the difference corresponding to the r-th feature level be... Then the first The multi-level semantic differences of a token can be represented as follows:

[0059] Where L represents the number of feature levels involved in the fusion. Indicates the normalized result of the first... Differences at each level, This represents the fusion weight for the corresponding level, and satisfies:

[0060] Shallow feature differences mainly reflect texture, edge and local grayscale changes, mid-level feature differences mainly reflect local structural changes, and high-level feature differences mainly reflect component semantics and overall structural anomalies.

[0061] The differences in current token features, local neighborhood structure, and multi-level semantics are normalized and then fused according to their respective weights to obtain the first... Initial difference response value for each token:

[0062] in, , and These represent the differences in current token features, local neighborhood structure, and multi-level semantic differences after normalization, respectively. , and Let these be the corresponding weighting coefficients, and satisfy the following:

[0063] The weighting coefficients can be preset or adaptively determined based on product category, defect type, imaging conditions, or the response stability of each difference component on the verification sample.

[0064] After obtaining the initial difference response value, with the first A spatial neighborhood is built around each token. And based on the distribution of high-response tokens within the spatial neighborhood, a spatial continuity anomaly factor is determined:

[0065] in, This indicates the threshold for judging a high response. Represents the characteristic function. It takes the value 1 when the condition is true, and 0 otherwise. Spatial continuity anomaly factor. The larger the value, the more high-response tokens exist around the target token, and the higher the probability that the target token belongs to a spatially continuous anomalous region.

[0066] Further calculation of the first Normalized isolation deviation factor of each token response relative to the statistics of its spatial neighborhood responses:

[0067] in, and Representing spatial neighborhood Mean and standard deviation of the initial differential response values ​​within the range, To prevent positive numbers with a denominator of zero, normalize the isolated deviation factor. The larger the value, the more prominent the target token's response is relative to surrounding tokens.

[0068] The initial differential response values ​​are adaptively corrected based on the spatially continuous outlier factor and the normalized isolated deviation factor:

[0069] in, Indicates the continuous abnormal adjustment coefficient. This represents the adjustment coefficient for isolated anomalies, and When the target token has a high initial difference response but a low spatial continuity anomaly factor and a high normalized isolation deviation factor, the suppression term in the correction formula dominates, making the corrected difference response value lower than the initial difference response value, thereby suppressing isolated high responses caused by imaging noise, local reflections, registration micro-biases, or occasional texture fluctuations.

[0070] When the target token and its multiple adjacent tokens have high differential responses, the spatial continuity anomaly factor is high. The continuity anomaly preservation or enhancement term in the correction formula dominates, so that the response of the target token is preserved or moderately enhanced, thereby preserving anomaly areas with spatial continuity such as cracks, scratches, pore edges, foreign object outlines, gaps or structural deformations.

[0071] Corrected difference response values ​​for all tokens The images are rearranged according to their two-dimensional spatial location index to form a difference visual prior map. This difference visual prior map reflects not only the token-level differences between the industrial image under test and the reference normal image, but also includes information on local structural changes, multi-level semantic changes, and spatial continuity of abnormal responses, which is used for subsequent anomaly candidate token determination and identification of suspected defect candidate regions.

[0072] Example 2: Token Filtering Based on Differential Responses from Reference Normal Feature Templates like Figure 2 As shown, in another embodiment, when multiple defect-free sample images are available for the same product category or inspection station, a reference normal feature template can be pre-constructed, eliminating the need to select a single reference normal image for each inspection. This approach is suitable for standardized production line batch inspections, long-term operation of fixed inspection stations, sufficient defect-free samples, or scenarios where it is desirable to reduce the randomness of a single reference image.

[0073] When constructing a reference normal feature template, multiple defect-free sample images are first collected, and each defect-free sample image is then spatially aligned uniformly. Spatial alignment can be based on a standard template image, average contour, fixed ROI, or tooling positioning points, so that the same product structure in different defect-free sample images corresponds to the same token grid position as much as possible.

[0074] Subsequently, the token features of each defect-free sample image are extracted using the token feature encoding module. For multiple token features at the same two-dimensional spatial location, mean aggregation, median aggregation, cluster center aggregation, or prototype feature aggregation can be used to obtain template token features. Mean aggregation is suitable for scenarios where normal samples have small fluctuations; median aggregation is suitable for scenarios with a small number of noisy samples; cluster center aggregation is suitable for scenarios where normal appearance has multiple stable patterns; and prototype feature aggregation is suitable for scenarios where it is desirable to retain multiple normal subtype features.

[0075] During the detection phase, the system only needs to perform spatial correspondence processing on the industrial image to be tested and extract the token feature set F. Then, it calculates the difference response between the token features at each position in F and the template token features at the same position in the reference normal feature template. Since the reference normal feature template is obtained by aggregating multiple defect-free samples, it has stronger robustness to normal texture fluctuations and imaging noise, and can reduce errors caused by improper selection of reference images.

[0076] In an optional implementation, the reference normal feature template can be established separately according to product category, inspection station, imaging parameters or equipment model; or multiple templates can be established under the same product category, and the most matching template can be selected for difference response calculation based on the overall similarity between the industrial image to be tested and each template during inspection.

[0077] When multiple normal prototype features correspond to the same spatial location, the current token feature difference between the token feature to be tested and each normal prototype feature is calculated, and the normal prototype feature with the smallest feature difference is determined as the reference token feature for that spatial location. Subsequently, the differences in current token features, local neighborhood structure, and multi-level semantics are calculated in accordance with the method described in Example 1, and local neighborhood consistency correction is performed; the subsequent processes of determining suspected defect candidate regions, screening core abnormal tokens, screening boundary neighborhood tokens, and generating visual prompt information are executed in accordance with Examples 3 to 5, respectively.

[0078] Example 3: Determination of Suspected Defect Candidate Regions After obtaining the difference visual prior map, the threshold and connected component analysis module determines the abnormal response threshold based on the difference visual prior map. This threshold is distinguished from the high response judgment threshold used in the local neighborhood consistency correction process. The abnormal response threshold for this step is denoted as... The abnormal response threshold can be determined using the global mean and standard deviation, for example:

[0079] in, and Let represent the mean and standard deviation of the corrected difference response values ​​in the difference visual prior map, respectively. This is the adjustment coefficient for the abnormal response threshold. Smaller candidate regions have higher recall rates. When the size is large, there are fewer candidate regions for false positives.

[0080] The anomaly response threshold can also be determined using response quantiles, for example, by using the tokens corresponding to the top q% of response values ​​in the difference visual prior image as anomaly candidate tokens. Alternatively, a local window threshold or an adaptive threshold can be used, allowing different image regions to be judged based on their local background response levels. For industrial images with uneven background textures or regional differences in imaging brightness, an adaptive threshold helps reduce the impact of local illumination changes on defect candidate regions.

[0081] The response value is greater than or equal to the abnormal response threshold. After a token is marked as an anomalous candidate token, the threshold and connected component analysis module performs connected component analysis based on the two-dimensional spatial location of the anomalous candidate token. The connectivity relationship can be determined using four-neighbor or eight-neighbor domains, or based on the spatial adjacency radius. Connected components with an area smaller than a preset area threshold can be considered isolated noise and eliminated; multiple connected components that are close to each other and have continuous response gradients can be merged; and morphological closing operations or region filling can be performed on boundary holes or broken regions.

[0082] After connected component analysis, one or more potential defect candidate regions are obtained. Each potential defect candidate region can be represented by information such as candidate region number, token location set, bounding rectangle, region area, average response value, maximum response value, response gradient, or region contour. The above information can be used for subsequent core anomaly token filtering, boundary neighborhood token filtering, and visual cues generation.

[0083] Example 4: Joint Filtering of Core Anomaly Tokens and Boundary Neighborhood Tokens like Figure 4 As shown, after obtaining one or more suspected defect candidate regions, core anomaly token screening and boundary neighborhood token screening are performed in each suspected defect candidate region.

[0084] For each suspected defect candidate region, the defect contribution score of each token is first determined based on the difference response value of each token in the region after local neighborhood consistency correction, the significance of local anomalies, and the spatial positional relationship within the candidate region.

[0085] The local anomaly salience reflects the degree of prominence of the target token relative to its spatial neighboring tokens, and can be determined based on the difference between the corrected difference response value of the target token and the mean response value of its neighbors. The spatial positional relationship reflects the distribution of the target token within the candidate region, and can be determined based on the relative position of the target token with the high response center, main direction of the region, connected component outline, or other high-contribution tokens in the candidate region.

[0086] In one implementation, the corrected difference response values, local anomaly significance, and spatial location relationships are normalized respectively, and then weighted and fused according to preset or adaptive weights to obtain a defect contribution score. Tokens within the suspected defect candidate region are sorted according to the defect contribution score, and tokens with higher scores are selected to form a core anomaly token set based on a scoring threshold, a preset retention ratio, or an upper limit on the number of core anomaly tokens.

[0087] For localized defects such as pores, foreign objects, and gaps, tokens located in the high-response main area can be prioritized for retention; for slender defects such as cracks and scratches, tokens continuously distributed along the defect extension direction can be retained in combination with the main direction of the candidate area to avoid core abnormal tokens being concentrated in a single highest response position.

[0088] After obtaining the core anomaly token set, the candidate range of boundary neighborhood tokens is determined based on the response change characteristics and spatial adjacency relationships around the core anomaly tokens. The candidate range of boundary neighborhood tokens can be obtained by spatially expanding the outline of the core anomaly token set or the suspected defect candidate region.

[0089] For tokens within the candidate range of the boundary neighborhood token, the selection is based on the change of the differential response gradient, the spatial distance between the token and the core abnormal token, and the overall distribution of the core abnormal token.

[0090] Among them, the difference response gradient change is used to determine the region where the defective subject response transitions to the normal background response; spatial distance is used to limit the adjacency range between the boundary neighborhood token and the defective subject; and the overall distribution of the core abnormal token is used to determine whether the candidate token is located in the peripheral region, extension direction or continuous transition region of the defective subject.

[0091] In one implementation, the response gradient, spatial distance, and spatial continuity are normalized and weighted and fused respectively, and the token with a continuous transition relationship with the defect subject is selected as the boundary neighborhood token based on the fusion result.

[0092] For defects such as cracks or scratches, adjacent tokens can be retained along the main distribution direction of the core abnormal token to express the extension direction and edge information of the defect; for defects such as pores, foreign objects or local gaps, adjacent tokens can be retained around the outer periphery of the core abnormal token to express the defect outline and the transition relationship between the defect and the normal background.

[0093] Subsequently, the core anomaly token set and the boundary neighborhood token set are merged, and tokens with the same two-dimensional spatial location index are deduplicated to obtain a candidate simplified token set.

[0094] When the number of tokens in the candidate simplified token set exceeds a preset quantity constraint, core abnormal tokens with higher defect contribution scores are retained first, and some boundary neighborhood tokens are retained based on response gradient, spatial adjacency, and spatial distribution uniformity. The quantity constraint can be determined based on a preset maximum number of tokens, the token retention ratio in candidate regions, or the input length limit of the subsequent defect discrimination model.

[0095] For multiple candidate areas with suspected defects, you can set an upper limit for the number of tokens for each area, or you can dynamically allocate the number of tokens based on the area, maximum response value, average response value, or priority of the suspected defects for each candidate area.

[0096] Through the above processing, the resulting simplified image token set contains both core anomaly tokens representing the defect subject and boundary neighborhood tokens representing the transition relationship between the defect boundary and the normal background. This reduces the number of irrelevant background tokens while retaining the subject information and boundary context information required for defect identification.

[0097] Example 5: Visual Cue Information Generation and Defect Identification like Figure 5 As shown, the visual cue generation module maps the filtered tokens to the original image coordinate system of the industrial image under test based on the two-dimensional spatial position index of the simplified image token set. If the industrial image under test undergoes scaling, cropping, rotation, or registration transformations during spatial correspondence processing, the token positions can be restored to the original image coordinate system according to the corresponding inverse transformation relationship.

[0098] In one implementation, the visual cue generation module generates candidate region boxes based on a set of simplified image tokens. The candidate region box can be the smallest bounding rectangle covering the location of the simplified token, or it can be expanded outwards from the bounding rectangle according to a preset expansion ratio to preserve the normal background context around the defect. The candidate region box may include the coordinates of the top-left corner, the coordinates of the bottom-right corner, the candidate region number, and corresponding response statistics.

[0099] In another implementation, the visual cue generation module generates a candidate region mask based on a set of simplified image tokens. The candidate region mask has the same or corresponding size as the industrial image to be tested. Image block regions in the mask corresponding to the simplified tokens are marked as candidate regions, while unselected regions are marked as background. The candidate region mask can be used for subsequent segmentation, verification, or overlay display.

[0100] In another implementation, the visual cue generation module generates a differential response heatmap or a token location map based on the differential visual prior map and the simplified image token set. The differential response heatmap is used to display the intensity of anomalous responses of different tokens; the token location map is used to display the spatial distribution of core anomalous tokens and boundary neighborhood tokens in the image, thereby enhancing the interpretability of the detection results.

[0101] The generated visual cues can be input into a defect discrimination model or a multimodal visual language model along with the industrial image under test and the industrial defect detection cues. The industrial defect detection cues can include the detection object, the type of defect of interest, output field requirements, confidence level requirements, and review criteria. For example, the cues can instruct the model to determine the presence of a defect in a candidate region and output the result according to the defect category, defect location, candidate region number, defect confidence level, defect description information, and review suggestions.

[0102] Since the visual information input to the model has been streamlined through difference response token filtering, the model can focus less on normal background areas and concentrate on analyzing suspected defective subjects and boundary contexts, thereby improving defect detection efficiency. For scenarios requiring manual review, visual cues can be directly overlaid on the original image to generate a detection report, helping reviewers quickly locate defective areas.

[0103] Example 6: Parameter Setting and Project Deployment Method In engineering implementation, the preset image patch size can be set according to the image resolution, the scale of the target defect, and the requirements of subsequent model input. For example, for high-resolution industrial images, a smaller image patch size is beneficial for preserving the location of small defects; for scenarios with large defect scales or limited computing resources, a larger image patch size can be used to reduce the number of tokens.

[0104] Local Neighborhood Window It can be based on the expected spatial continuous scale of the defects of interest. and image block size Adaptive determination:

[0105] in, This refers to the expected spatial continuity radius determined based on product category, type of defect of interest, historical defect scale statistics, or offline calibration results, rather than the actual scale of unknown defects in the industrial image under test. For point defects, small pores, or localized foreign objects, a smaller neighborhood window can be used; for cracks, scratches, or elongated structural anomalies, a larger neighborhood window can be used.

[0106] In the token-level feature difference response calculation, the weights corresponding to the current token feature difference, local neighborhood structure difference, and multi-level semantic difference are respectively... and satisfy as well as The weights can be preset or adaptively determined based on product category, type of defect of concern, imaging conditions, and the response stability of each difference component on the verification sample.

[0107] High response judgment threshold in local neighborhood consistency correction This is used to determine the proportion of high-response tokens within a spatial neighborhood. The high-response threshold can be determined based on the response quantiles, mean, and standard deviation of the initial differential response values, or local window statistics. For example, it can be determined using the following formula:

[0108] in, and These represent the mean and standard deviation of the initial differential response values, respectively. This is the adjustment coefficient for the high response judgment threshold.

[0109] Continuous abnormal adjustment coefficient The isolated anomaly adjustment coefficient is used to adjust the degree of preservation or enhancement of spatially continuous anomaly regions. This is used to adjust the suppression level of isolated high-response tokens. When industrial images have high noise, numerous local reflections, or minor registration deviations, this level can be appropriately increased. When focusing on defects with strong spatial continuity, such as cracks and scratches, the efficiency can be appropriately increased. .

[0110] The image patch size, neighborhood window size, differential component weight, high response judgment threshold, and continuous anomaly adjustment coefficient and isolated anomaly adjustment coefficient mentioned above can be calibrated offline according to the specific product category, inspection station, imaging conditions, and type of defect of interest. In the case of a small number of known defect samples, confirmatory adjustments can be made based on the candidate region recall rate, normal sample false detection rate, and token compression ratio.

[0111] The token quantity constraint can be set according to the length of the subsequent model context, computational resources, or real-time requirements. For example, when the number of image tokens that a multimodal visual language model can accept is limited, a maximum token quantity M can be set; when the area of ​​different candidate regions differs greatly, the token quantity can be dynamically allocated by combining the candidate region area and response intensity; when it is necessary to ensure the boundary context, a minimum retention ratio of core anomaly tokens and boundary neighborhood tokens can be set.

[0112] The method of this invention can be deployed on industrial camera workstations, non-destructive testing image analysis terminals, edge computing devices, servers, or cloud-based testing platforms. The method can be implemented as a software program, stored in a computer-readable storage medium, and executed by a processor to complete steps such as image acquisition, reference normal information determination, spatial correspondence processing, token feature extraction, difference response calculation, token filtering, and visual cue generation.

[0113] In actual production lines, the method of this invention can be used as a pre-token screening module, connected with existing classification models, detection models, segmentation models or multimodal visual language models; it can also be used as a defect review auxiliary module, providing candidate region boxes, masks, heat maps and token location marker maps for manual reviewers.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. 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 be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A differential response token screening method for industrial defect detection, characterized in that, The method specifically includes the following steps: S1. Acquire the industrial image to be tested, and determine the reference normal information corresponding to the industrial image to be tested based on the product category, detection station or imaging parameters of the industrial image to be tested. S2. Perform spatial correspondence processing on the industrial image to be tested and extract the image token feature set with a two-dimensional spatial location index; when the reference normal information is a reference normal image, perform corresponding spatial correspondence processing on the reference normal image and extract the reference token feature set; when the reference normal information is a reference normal feature template, read the corresponding template token feature according to the two-dimensional spatial location index of the image token to be tested to obtain the reference token feature set. S3. Calculate the token-level feature difference response value for the token features of the image to be tested and the reference token features at the corresponding spatial location, and construct a local neighborhood with the target token as the center. Based on the proportion of tokens whose difference response values ​​reach the high response judgment threshold and the degree of deviation of the target token response from the mean and standard deviation of the neighborhood response, perform local neighborhood consistency correction on the difference response value to suppress isolated high response tokens and maintain or enhance spatially continuous high response tokens, and obtain the difference visual prior map. S4. Determine the abnormal response threshold based on the difference visual prior map, mark the image tokens with response values ​​greater than or equal to the abnormal response threshold as abnormal candidate tokens, and perform connected component analysis based on the spatial location of the abnormal candidate tokens to obtain suspected defect candidate regions. S5. Within the suspected defect candidate area, a core anomaly token set is determined based on the difference response values ​​of each image token after local neighborhood consistency correction. Within the suspected defect candidate area and its extended neighborhood, a boundary neighborhood token set is determined based on the boundary contour, response gradient, or spatial adjacency relationship of the candidate area. The core anomaly token set and the boundary neighborhood token set are merged and deduplicated, and then filtered according to a preset token quantity constraint to obtain a simplified image token set for retaining the defect subject and its boundary context. S6. Based on the spatial location index of the simplified image token set and the difference visual prior map, generate visual cue information for industrial defect identification. The visual cue information includes candidate region boxes, candidate region masks, difference response heatmaps, or token location marker maps.

2. The differential response token screening method for industrial defect detection according to claim 1, characterized in that, In step S1, the reference normal information includes a reference normal image or a reference normal feature template; wherein, the reference normal image is a defect-free sample image acquired under the same product category, the same inspection station, and / or the same imaging conditions as the industrial image to be tested; the reference normal feature template is obtained by extracting Token features from multiple defect-free sample images that have been uniformly spatially aligned, and then performing mean aggregation, median aggregation, cluster center aggregation, or prototype feature aggregation at the same or corresponding two-dimensional spatial locations.

3. The differential response token screening method for industrial defect detection according to claim 2, characterized in that, In step S2, the spatial correspondence processing includes at least one of size normalization, region of interest alignment, template matching, key point matching, edge contour matching, feature similarity matching, or image registration.

4. The differential response token screening method for industrial defect detection according to claim 3, characterized in that, In step S2, the image token features to be tested and the reference token features are extracted by a convolutional neural network, a visual Transformer network, a self-supervised visual coding network, a multimodal visual coding network, or an industrial defect feature extraction network. The image token is a local block feature obtained by dividing the image into blocks, a local feature corresponding to the position of the feature map grid, or a local feature unit in the output sequence of the visual encoder. Each image token has a two-dimensional spatial position index and corresponds to a local region in the image after spatial correspondence processing. The range of the local region is determined according to the image block size, feature map stride, receptive field, or spatial mapping relationship of the visual encoder.

5. The differential response token screening method for industrial defect detection according to claim 4, characterized in that, In step S3, the token-level feature difference response value is determined based on the current token feature difference, local neighborhood structure difference, and multi-level semantic difference; the current token feature difference, local neighborhood structure difference, and multi-level semantic difference are normalized respectively, and then fused according to their respective weights to obtain the first... Initial difference response value for each token: in, Indicates the first The initial difference response value for each token. This represents the difference in characteristics of the current token after normalization. This represents the difference in local neighborhood structure after normalization. This represents the normalized multi-level semantic differences. The corresponding fusion weights, and satisfying ; The current token feature difference is based on the first [value] in the industrial image under test. The feature distance between a token feature and the reference token feature at the corresponding position in the reference normal information is determined; the local neighborhood structure difference is determined based on the feature relationship between the target token and the neighboring token in the industrial image under test, and the difference in the feature relationship between the corresponding token and the neighboring token in the reference normal information; the multi-level semantic difference is obtained by weighted fusion of the differences between the token features under test and the reference token features at corresponding spatial positions in multiple feature levels.

6. The differential response token screening method for industrial defect detection according to claim 5, characterized in that, In step S3, the local neighborhood consistency correction includes: constructing a spatial neighborhood centered on the target token, and constructing a spatial continuous anomaly factor based on the distribution of anomalous responses within the neighborhood. in, Indicates the first Each token corresponds to a high proportion of high-response tokens within its neighborhood. Indicates the first Each token corresponds to a spatial neighborhood. This indicates the threshold for judging a high response. The indicative function is represented; further, based on the degree of deviation of the target token response from the mean and standard deviation of the neighborhood responses, the normalized isolation deviation factor is determined: in, and They represent the first The mean and standard deviation of the differential response values ​​within the spatial neighborhood corresponding to each token. To prevent positive numbers with a denominator of zero, adaptive corrections are made to the differential response based on the spatially continuous outlier factor and the normalized isolated deviation factor. in, For continuous abnormal adjustment coefficients, For isolated outlier adjustment coefficients, and When isolated abnormal suppression terms Greater than continuous abnormal adjustment term When the correction factor is less than 1, the response value of isolated high-response tokens is reduced; when the continuous anomaly adjustment item... Not less than the isolated anomaly suppression term When the correction factor is greater than or equal to 1, it is used to maintain or enhance the response of spatially continuous anomalous regions.

7. The differential response token screening method for industrial defect detection according to claim 6, characterized in that, In step S4, the abnormal response threshold is determined based on the response mean and standard deviation, response quantile, adaptive threshold, or local window threshold of the difference visual prior map; connected component analysis is performed on adjacent abnormal candidate tokens, and further region merging and / or morphological processing can be performed to obtain the suspected defect candidate region.

8. The differential response token screening method for industrial defect detection according to claim 7, characterized in that, In step S5, the core abnormal token screening process includes: determining the defect contribution score of each image token based on the difference response value after local neighborhood consistency correction, the local abnormality salience, and the spatial location of the candidate region; sorting the image tokens from high to low according to the defect contribution scores; and selecting core abnormal tokens according to a preset score threshold, a preset retention ratio, or an upper limit on the number of core abnormal tokens; the local abnormality salience is used to measure the degree of abnormal prominence of the target token relative to its spatial neighborhood tokens.

9. The differential response token screening method for industrial defect detection according to claim 8, characterized in that, In step S5, the boundary neighborhood token screening process is determined based on the response change characteristics and spatial adjacency relationships around the core abnormal token. Specifically, it includes: selecting neighborhood tokens with a continuous transition relationship with the defect main area as boundary neighborhood tokens based on the differential response gradient changes within the suspected defect candidate area and its extended neighborhood, the spatial distance between the tokens and the core abnormal tokens, and the distribution of the core abnormal tokens; merging and deduplicating the core abnormal tokens and boundary neighborhood tokens, and then screening them according to a preset token quantity constraint to form a simplified image token set, so that the simplified image token set simultaneously contains defect main information and defect boundary context information.

10. The differential response token screening method for industrial defect detection according to claim 9, characterized in that, In step S6, the visual cue information is mapped to the original image coordinate system of the industrial image to be tested according to the two-dimensional spatial position index of the simplified image token set, and candidate region boxes, candidate region masks or token position marker maps are generated according to the image block size, feature map step size, image scaling ratio and / or spatial correspondence inverse transformation relationship. The visual cue information is used to input the defect discrimination model or multimodal visual language model together with the industrial image to be tested and the industrial defect detection cue text, so as to obtain at least one of the defect category, defect location, candidate region number, defect confidence or defect description information.