AI-based defect detection for non-destructive inspection
Through the pre-training and denoising technology of feature matching models, the problem of difficulty in detecting aviation component defects in the prior art is solved, and more efficient and accurate abnormality detection is achieved.
Patent Information
- Application Number
- CN202510092744.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-01-23
- Filing Date
- 2025-01-21
- Publication Date
- 2025-07-25
AI Technical Summary
Existing non-destructive inspection techniques are difficult to effectively detect defects in aviation components, especially when imaging through ultrasonic waves, where failures or problems in the image are difficult to detect visually.
The feature matching model is used for pre-training. By generating core set samples and testing patch features, the image-level and patch-level denoising technology is used to improve the accuracy and reliability of the model and identify abnormalities.
Improves the efficiency and accuracy of abnormal detection, allowing more accurate identification of potential defects, such as cracks or corrosion in aviation components.
Smart Images

Figure CN120374494A_ABST
Abstract
Description
Technical Field
[0001] Aspects of the present disclosure relate to anomaly detection, and more particularly, to performing image-based anomaly detection using a feature matching model. Background Art
[0002] Early identification of defects in devices or components is important for ensuring the safety and reliability of airline operations. Non-destructive inspection (NDI) is a preferred method for this purpose because it can evaluate the characteristics of components without causing any damage to the original parts. For example, when inspecting components (such as wing panels) inside an aircraft, NDI techniques can deploy ultrasonic waves into the components to detect faults within the materials. Summary of the Invention
[0003] In one aspect, the present disclosure provides a method that includes: receiving a plurality of normal images; generating a plurality of patch features by processing each of the plurality of normal images; generating a coreset including one or more coreset samples, where the one or more coreset samples are selected from the plurality of patch features; receiving a test image; generating one or more test patch features by processing the test image; and generating an anomaly score by comparing the one or more test patch features with the one or more coreset samples.
[0004] Other aspects of the present disclosure provide one or more non-transitory computer-readable media that contain computer program code in any combination, which, when executed by the operation of a computer system, performs the operations according to one or more of the above methods, and a system including one or more computer processors and one or more memories containing computer-executable instructions, where the computer-executable instructions, when executed by the one or more computer processors, perform the operations according to one or more of the above methods. Brief Description of the Drawings
[0005] For a more particular description of the features described above in a manner that can be understood in detail, reference may be made to example aspects, some of which are illustrated in the drawings.
[0006] Figure 1 An example workflow for the operation of an anomaly detection model according to some aspects of the present disclosure is depicted.
[0007] Figure 2 An example workflow for image-level noise cancellation according to some aspects of the present disclosure is depicted.
[0008] Figures 3A to 3BDepicts an example workflow for patch-level noise cancellation according to some aspects of the present disclosure.
[0009] Figure 4 Depicts an example workflow for anomaly detection of test images according to some aspects of the present disclosure.
[0010] Figure 5 Depicts an example input window and output window of an anomaly detection model according to some aspects of the present disclosure.
[0011] Figure 6 Depicts an example method for processing normal images to generate core set samples for anomaly detection according to some aspects of the present disclosure.
[0012] Figure 7 Depicts an example method for detecting anomalies in test images using the generated core set samples according to some aspects of the present disclosure.
[0013] Figure 8 Is a flowchart depicting an example method for pre-training an anomaly detection model according to some aspects of the present disclosure.
[0014] Figure 9 Depicts an example computing device configured to perform various aspects of the present disclosure according to one aspect.
[0015] For ease of understanding, wherever possible, the same reference numerals are used to denote the same elements identical to those in the drawings. It is contemplated that elements disclosed in one aspect may be beneficially used in other aspects without specific recitation. Detailed Description
[0016] The present disclosure relates to anomaly detection and, more particularly, to detecting anomalies using a model trained using a feature matching method.
[0017] A variety of non-destructive inspection (NDI) techniques produce a large amount of highly complex data that is challenging to evaluate. For example, ultrasonic techniques can generate images or other visual representations of the internal structure of a component, but faults or other problems within such data are often difficult or impossible to visually detect. The present disclosure provides methods and techniques for detecting anomalies in images obtained from NDI scans or other similar techniques.
[0018] In some aspects, before performing anomaly detection on a test image, a feature matching technique can be incorporated to pre-train a model for anomaly detection using a normal dataset. As used herein, the normal dataset can consist of images (or other visual representations) obtained by NDI or other scanning methods depicting parts without any defects. Pre-training can ensure that the model establishes a clear baseline of what constitutes the "normal" state of the part, thus allowing the model to more effectively and accurately distinguish anomalies within the test image. In some aspects, to further improve the accuracy and reliability of the anomaly detection model, noisy data within the normal dataset can be identified and removed early in the training process. The present disclosure describes methods and techniques for denoising the normal dataset at the image level, patch level, or both, before incorporating the feature matching technique for pre-training the anomaly detection model. By implementing a two-layer denoising process, in some aspects, the anomaly detection model can more accurately capture the inherent patterns or characteristics of the normal dataset, thus improving the efficiency and precision of the model in detecting anomalies.
[0019] Figure 1 An example workflow 100 for the operation of an anomaly detection model in accordance with some aspects of the present disclosure is depicted.
[0020] In the example shown, a collection of normal images 105 (e.g., depicting a standard or normal aircraft wing panel or other parts without defects) are provided to an anomaly detection model 115 for pre-training. After receiving the normal images 105, the anomaly detection model 115 performs feature extraction to generate a core set 120. In some aspects, the core set 120 can include one or more core set samples selected from a large set of patch features extracted from the normal images. Each patch feature can capture a specific pattern and / or characteristic of the normal image. These core set samples can be selected based on their representativeness and importance within the overall normal dataset and can be used as a baseline for anomaly detection. As shown, the core set 120 is stored in a storage 125 or database and can be quickly accessed by the anomaly detection model 115 when a test image is received.
[0021] In the example shown, a test image 110 (e.g., depicting an aircraft wing panel with a potential defect) is introduced for inspection. An anomaly detection model 115 processes the test image 110, extracts patch features from the image, and compares the patch features with a core set 120 stored in a storage 125. The anomaly detection model 115 then identifies the nearest core set sample that aligns with the test patch features. Based on the degree of deviation / dissimilarity between the test patch features and the nearest core set sample, the anomaly detection model 115 determines the likelihood that an anomaly (e.g., a crack or corrosion in the wing panel) exists within the test image. The deviation can be measured by various distance metrics (e.g., Euclidean distance or cosine similarity) or other predefined criteria. In some aspects, the greater the deviation, the higher the likelihood that the test image is anomalous and / or contains an anomaly.
[0022] As shown, the anomaly detection model 115 generates an anomaly output 130 for the test image. In some aspects, the anomaly output 130 can include a determination indicating whether the test image 110 is normal (e.g., the wing panel within the test image is normal) or contains an anomaly (e.g., the wing panel within the test image has a defect). In some aspects, the anomaly output 130 can also include an anomaly score that quantifies the likelihood that the test image contains or depicts an anomaly. In some aspects, the anomaly output 130 can include a visual representation (e.g., a heat map) of the test image, where different colors highlight regions where the likelihood of containing an anomaly varies. For example, regions, patches, and / or pixels with a high likelihood of containing an anomaly can be highlighted in red, while regions, patches, and / or pixels with a medium likelihood of containing an anomaly can be highlighted in green or yellow, and regions, patches, and / or pixels with a low likelihood of containing an anomaly can be highlighted in blue.
[0023] In some aspects, advanced techniques such as non-destructive inspection (NDI) can be used to generate normal images 105 and test images 110 (e.g., for an aircraft wing panel). When NDI is used to inspect a component (e.g., an aircraft wing panel or an aircraft engine), ultrasonic waves can be emitted by the test component. As these ultrasonic waves travel through the component, they can interact with the internal structure or material of the component. For example, the ultrasonic waves can be reflected, refracted, or absorbed by the internal structure or material. Based on the received signals (received by the test component or by different components), an image (e.g., normal images 105 and test images 110) depicting or representing the internal structure of the component can be generated. The received signals can refer to the ultrasonic waves that return after interacting with the internal structure or material. Changes in the received signals that may be caused by inconsistencies or potential defects (e.g., cracks, corrosion, deformation) within the component can be reflected as visual changes in these images.
[0024] The anomaly detection model 115 can include various computing modules each configured for a different task, such as Figure 3A the feature extraction module 315, Figure 3A the dimensionality reduction module 325, Figure 3A the patch feature generation module 335, Figure 3B the patch feature projection module 345, Figure 3B the patch feature denoising module 355, Figure 4 the core set subsampling module 380 and the nearest neighbor search module 425. More details are discussed below with reference to FIGS. Figures 3A to 3B and Figure 4 Although depicted as discrete modules or components for conceptual clarity, in some aspects, the operations of the depicted modules or components (and other modules or components not depicted) may be combined or distributed across any number and type of modules and may be implemented using hardware, software, or a combination of hardware and software.
[0025] Figure 2 FIG. depicts an example workflow 200 for image-level noise cancellation according to some aspects of the present disclosure. In some aspects, the workflow 200 may be executed by one or more computing devices, such as Figure 1 the anomaly detection model 115 shown in FIG. Figure 9 and / or the computing device 900 shown in FIG.
[0026] In the example shown, a plurality of normal images 205 are received for pre-training the anomaly detection model (e.g., Figure 1 115). As shown, the normal images 205 depict standard / normal aircraft wing panels. In some aspects, image-level noise cancellation may be performed before applying the normal images 205 to pre-train the anomaly detection model. This step can filter out potential blurry or anomalous images and thus improve the quality and reliability of the normal dataset for further processing (e.g., generating patch features or core set samples).
[0027] As shown, image-level denoising begins by dividing the normal images 205 into three folds or groups 205-1, 205-2, and 205-3. Each fold contains an equal number of images. The three folds of the normal images are then used for cross-validation.
[0028] In the first iteration of the cross-validation process, fold 1 (205-1) is assigned as the validation dataset, and folds 2 (205-2) and 3 (205-3) are grouped together as the training dataset. During the first iteration, folds 2 and 3 are provided to train the outlier detection model 210 (e.g., PaDim). During the training phase, the outlier detection model 210 assumes that the images within the training dataset are normal and learns common patterns and features from these images. Once the training phase is complete, the trained outlier detection model 210 is deployed to process the images from fold 1 within the validation dataset. During the validation phase, the trained outlier detection model 210 compares the patterns and features of the test images (e.g., from fold 1 in the validation dataset) with the patterns and features it learned from the training dataset. Based on the comparison, the outlier detection model 210 generates an outlier probability (also referred to as an outlier probability score in some aspects) for each image within the validation dataset. The value of the outlier probability indicates the likelihood that the image deviates from what the model normally learned based on the training dataset. A high outlier probability (e.g., above a defined threshold) can indicate that the image may be blurry or potentially anomalous. At the end of the first iteration, a set of outlier probabilities 215-1 is generated for the images in fold 1.
[0029] As shown, in the second iteration of the cross-validation process, folds 1 (205-1) and 3 (205-3) are combined as the training dataset, and fold 2 (205-2) is designated as the validation dataset. Following a process similar to the first iteration, the outlier detection model 210 is trained on the images from folds 1 and 3. The outlier detection model 210 again learns patterns and features from the training dataset and identifies them as "normal" patterns for outlier detection. During the validation phase, the trained outlier detection model 210 processes each image from fold 2 (205-2) and assigns an outlier probability to each image based on the deviation of each image from the learned normal patterns. At the end of the second iteration, a set of outlier probabilities 215-2 is generated for the images in fold 2.
[0030] In the third iteration, folds 1 (205-1) and 2 (205-2) are merged and assigned as the training dataset, and fold 3 (205-3) is set as the validation dataset. The outlier detection model 210 is trained with the combined images from folds 1 and 2 and then deployed on the images from fold 3 to generate a set of outlier probabilities 215-3. In the case where the third iteration is complete, outlier probabilities have been generated for each image in all three folds (e.g., 205-1, 205-2, and 205-3).
[0031] The example of dividing a normal image into three groups or folds shown is provided only for conceptual clarity. In some aspects, a normal image can be divided into any number (e.g., N) of folds or groups. The cross-validation process can be iterated any number of times (e.g., N) to obtain a complete list of outlier probabilities for all images within the normal dataset.
[0032] In the example shown, after the cross-validation process, the outlier probabilities 215-1, 215-2, and 215-3 from all three iterations are concatenated into a single list 220. The list 220 includes all the images from the normal dataset 205 and their corresponding outlier probabilities. The images are then arranged in descending order based on their outlier probabilities, where those images with the highest outlier probabilities are placed at the front of the sorted list 225.
[0033] In the example shown, the established criteria are applied to the sorted list 225 to filter out the noisy data from the normal dataset. For example, in some aspects, the criteria can indicate removing the top n% of the images with the highest outlier probabilities (e.g., 230). The value of n can be adjusted according to relevant factors such as the specific requirements of the denoising system, the quality and characteristics of the normal dataset. By applying the criteria, the images that are most likely to be blurry or potentially abnormal are removed. The remaining images 235 are then provided for subsequent pre-training of the anomaly detection model. In some aspects, the system can set a threshold for the outlier probability. Images with a probability equal to or exceeding the threshold (e.g., 230) can be removed from further processing.
[0034] Figures 3A to 3B An example workflow for patch-level noise elimination according to some aspects of the present disclosure is depicted. In some aspects, Figure 3A workflow 300A and Figure 3B workflow 300B (collectively forming workflow 300) can be executed by one or more computing devices, such as Figure 1 the anomaly detection model 115 shown and / or Figure 9 the computing device 900 shown.
[0035] Figures 3A to 3BDepicts an example workflow for patch - level noise cancellation in an aircraft wing panel image. In the example shown, the training data set includes N normal images 305, and each of the N normal images 305 is divided into n sub - segments (e.g., from 310 - 1 to 310 - n). The feature extraction module 315 processes the segmented images to produce high - dimensional feature maps of size (C×H’×W’) (e.g., from 320 - 1 to 320 - 1 - N). Then, the dimensionality reduction module 325 reduces the size of these high - dimensional feature maps to create smaller feature maps (e.g., from 330 - 1 to 330 - 1 - N). After dimensionality reduction, the patch feature generation module 335 compiles patch features across each location of the segmented images, resulting in a total of (n×H×W) locations. For each location, a set of patch features of size (N×C) is generated (e.g., from 340 - 1 to 340 - P). These sets of patch features (e.g., from 340 - 1 to 340 - P) are projected by the patch feature projection module 345 into the shared feature space 350. The patch feature denoising module 355 then filters out features with high outlier scores. Thereafter, the core set subsampling module 380 selects a subset of patch features that accurately represents the overall pattern or characteristics of the normal data set (e.g., normal images 305).
[0036] In the example shown, a data set of normal images 305 (which may correspond to Figure 2 the filtered normal image 235) is received. As shown, the normal images 305 depict a standard / normal aircraft wing panel. The training data set includes N normal images 305 and may have been filtered to exclude images with a higher outlier probability, as described above. Each of the N normal images 305 is divided into n sub - segments or patches (e.g., from 310 - 1 to 310 - n). As a result, a total of (N×n) segmented images are produced. In some aspects, the segmentation can be performed by dividing each image into a grid of equally - sized segments or patches to ensure uniform coverage of features within each image. In some aspects, given the unique characteristics of each image, the size and number of these patches can be determined randomly. Image segmentation can ensure a more localized analysis of the features of each image. In some aspects, the segmented images have a size of (3×H’×W’), where H’ represents the height of the pixels, W’ represents the width of the pixels, and 3 represents the number of color channels in the image.
[0037] In the example shown, a segmented image (e.g., 310-1) is processed by a feature extraction module 315 to extract high-dimensional feature maps (e.g., from 320-1 to 320-1-N) having dimensions of (C×H’×W’). These high-dimensional feature maps are then processed by a dimensionality reduction module 325 to generate feature maps having reduced dimensions of (C×H×W) (where H is less than H’ and / or W is less than W’) (e.g., from 330-1 to 330-1-N). A total of (N×n) feature maps 330 are generated for a normal dataset (e.g., from 330-1 to 330-n-N). In some aspects, the feature extraction module 315 can include one or more convolutional layers followed by an activation function (e.g., a convolutional neural network (CNN) or a similar deep learning model), which is designed to capture hierarchical patterns and features within a normal image. In some aspects, the dimensionality reduction module 325 can include one or more pooling layers (e.g., max pooling or average pooling), which are configured to reduce the spatial dimensions of the feature maps derived from a normal image.
[0038] In the example shown, the feature maps 330 having reduced dimensions are provided to a patch feature generation module 335, which compiles patch features across each location of the segmented image. Assuming that each feature map 330 contains (H×W) locations and each of the N normal images is divided into n sub-sections, a total of (n×H×W) locations are identified. For each location within a normal image, a set of patch features having dimensions of (N×C) is generated (e.g., from 340-1 to 340-P).
[0039] Go to Figure 3B, the patch feature set (e.g., from 340-1 to 340-P) is then transmitted to the patch feature projection module 345, which projects each patch feature (having a dimension of (1×C)) into the shared feature space 350. In the example shown, the projection is performed by pooling all sets (e.g., from 340-1 to 340-P), where the patch features at all positions are jointly projected into the feature space 350. The projected patch features are then processed by the patch feature denoising module 355, where an outlier score is determined for each patch feature using a density-based method (e.g., Local Outlier Factor (LOF)). Under the LOF method, the patch feature denoising module 355 measures the local density around the data point 350-1 (also referred to as the projected patch feature in some embodiments), where the local density is determined by the distance from the data point 350-1 to its k-th nearest neighbor. This local density is then compared with the density of the neighbors of the data point 350-1, and a corresponding LOF score is generated. An LOF score significantly greater than 1 indicates that the data point 350-1 is in a sparser region compared to its neighbors and is thus considered an outlier. An LOF score closer to 1 indicates that the data point 350-1 is in a region with a similar density to its neighbors. The higher the LOF score, the more likely the data point (or projected patch feature) is an outlier.
[0040] In the example shown, the patch feature denoising module 355 aggregates the outlier scores of all patch features (from all sets 340) to create a list 360. Then, based on their corresponding outlier scores (e.g., depicted by the sorted list 365), the patch features are sorted in descending order. A filtering criterion is then applied to the list 365 to perform patch-level noise elimination. The criterion can be percentage-based (such as removing the top n% of patch features with the highest outlier scores) or threshold-based (such as removing patch features with outlier scores equal to or exceeding a defined threshold). After the implementation of the filtering criterion, the patch features 370 with higher outlier scores (e.g., more likely to be noisy) are removed, and then the refined or filtered patch features 375 are provided to the core set subsampling module 380 for core set selection.
[0041] In some aspects, instead of pooling patch features from all sets together, the patch features can be projected individually for each set. For example, the patch feature projection module 345 can project a set of patch features at a specific location (e.g., 340-1) into the feature space 350, and can calculate an outlier score for each patch feature within a specific set (e.g., 340-1). Based on the ranked outlier scores, the patch feature denoising module 355 can apply a filtering criterion to further refine the patch features within a specific set (e.g., 340-1). For example, the patch feature denoising module 355 can remove the top n% of the patch features within the set that have the highest scores (e.g., 340-1). This process can be repeated for each set of patch features (e.g., from 340-1 to 340-P) to ensure that each patch feature is analyzed and denoised individually. In some aspects, given the varying characteristics of each set, an outlier in one set can be a normal feature in another set. By processing each set of patch features individually, the patch feature denoising module 355 can focus on more localized noise removal (e.g., denoising the patch features at a specific location). This method can improve the accuracy and efficacy of the noise removal process.
[0042] In the example shown, after patch-level denoising, the refined or filtered patch features 375 are transmitted to the core set subsampling module 380 for core set selection. The core set selection process aims to identify a subset of data points (or patch features) that can effectively and accurately represent the overall pattern or characteristics of a normal data set (e.g., normal image 305). Various methods can be used for core set selection, including but not limited to unsupervised machine learning (ML) models (e.g., k-means clustering) or greedy algorithms. In some aspects, such as when using a k-means clustering model, the core set subsampling module 380 can classify the filtered patch features 375 into several clusters and select the centroid of each corresponding cluster as a core set sample.
[0043] In the example shown, the selected core set samples (collectively referred to as core set 390-1) are stored in the storage 385 (which can correspond to Figure 1 memory bank 125) along with their corresponding outlier scores 390-2. The storage 385 can serve as a repository for these representative patch features, which can be quickly retrieved for future comparison and anomaly detection (e.g., when a test image is received).
[0044] Figure 4 Depicted is an example workflow 400 for anomaly detection of a test image according to some aspects of the present disclosure. In some aspects, the workflow 400 can be executed by one or more computing devices, such as Figure 1 the anomaly detection model 115 shown and / or Figure 9 the computing device 900 shown.
[0045] Figure 4 Depicts workflow 400 for an example of anomaly detection in test aircraft wing panel image 405. In the example shown, test image 405 is divided into a number of sub-sections (e.g., from 410-1 to 410-n), resulting in a total of (1×n) segmented test images. Feature maps (e.g., from 415-1 to 415-n) are generated for each segmentation within a reduced dimension (C×H×W). These test feature maps (e.g., from 415-1 to 415-n) are then processed to generate patch features for each of the total (n×H×W) positions identified in the test image. Thereafter, nearest neighbor search module 425 analyzes the extracted patch features 420, and nearest neighbor search module 425 compares the extracted patch features 420 with the core set samples 390-1 for a normal data set (e.g., normal image 305) stored in storage 385. Module 425 identifies the core set sample 430 closest to the patch feature 420 and calculates the anomaly score 435 for each image sub-section 410 and the overall test image 405.
[0046] In the example shown, test image 405 is provided for inspection. As shown, the test image depicts an aircraft wing panel that may or may not have any defects (e.g., cracks, corrosion, deformation, holes, or perforations). Test image 406 is divided into a number of sub-sections or patches (e.g., from 410-1 to 410-n). In some aspects, the number of sub-sections in the test image corresponds to the number of sub-sections into which the normal image is divided. For example, if the normal image is segmented into 10 sub-sections, the test image can also be divided into 10 sub-sections for comparison. As shown, a total of (1×n) segmented test images are generated.
[0047] In the example shown, feature maps (e.g., from 415-1 to 415-n) are generated for each segmented test image. In some aspects, the segmented test images can first be passed through a feature extraction module (e.g., Figure 3A 315) (e.g., comprising one or more convolutional layers accompanied by an activation function), which identifies patterns and / or characteristics within the test image. Then, the extracted patterns can be processed by a dimensionality reduction module (e.g., Figure 3Aprocessed by a dimensionality reduction module (e.g., including one or more pooling layers) 325, which compresses the pattern into a set of feature maps (e.g., from 415-1 to 415-n). As shown, each feature map corresponds to a segmented test image (e.g., feature map 415-1 corresponds to segmented test image 410-1, and feature map 415-n corresponds to segmented test image 410-n), and has a reduced dimension (C×H×W). Assuming the test image is divided into n segmented test images, a total of n feature maps are generated.
[0048] In the example shown, the test feature maps (e.g., from 415-1 to 415-n) are then provided to a patch feature generation module (e.g., Figure 3A 335), which generates patch features for each location across the segmented test images. Considering that each test feature map 415 contains (H×W) locations, a total of (n×H×W) locations are identified, and the test image 405 is divided into n sub-sections. For each location within the test image, a patch feature of size (1×C) is generated (e.g., from 420-1 to 420-P). The extracted patch features 420 are then provided to a nearest neighbor search module 425. The nearest neighbor search module 425 is communicatively coupled to a memory 385 that stores a core set sample 390-1 extracted from a normal data set (e.g., normal image 305) during a pre-training phase. The nearest neighbor search module 425 searches the memory 385 to identify the core set sample 430 that is closest or nearest to these patch features 420.
[0049] In the example shown, after identifying the nearest core set sample 430 for each patch feature 420, the nearest neighbor search module 425 generates an anomaly score 435 for each sub-section 410 and / or the test image 405. For example, in some aspects, module 425 may first compare each patch feature (e.g., 420-1) with its nearest core set sample (e.g., 430) to generate a distance (e.g., Euclidean distance or cosine similarity). For each patch feature 420, the distance may then be weighted by the outlier score 390-2 of its corresponding core set sample. Thereafter, these weighted distances are then aggregated to produce a final anomaly score 435 for the test image 405. In some aspects, the anomaly score may be in the range of 0 to 1. The higher the anomaly score, the higher the likelihood that the test image contains an anomaly (e.g., indicating an anomaly in the wing panel within the test image and containing a potential defect).
[0050] In some aspects, the anomaly score 435 can be compared with a defined threshold. If the anomaly score is equal to or exceeds the threshold, it indicates that the test image contains an anomaly, and an inspection decision indicating an anomaly in the wing panel within the test image and / or containing potential defects can be generated. If the score drops below the threshold, it indicates that the test image is normal, and an inspection decision indicating that the wing panel with the test image is normal can be generated. In some aspects, after determining that the test image 403 contains an anomaly (e.g., the score exceeds the threshold), a visual representation of the test image with highlighted regions of interest (e.g., regions or patches with a high probability of containing the anomaly are marked in red) can be generated. These highlighted regions provide a clear and direct view of the potential defect locations on the wing panel and can help the inspector or relevant maintenance personnel focus their attention on these specific regions for further evaluation and analysis.
[0051] Figure 5 Depicts an example input window 505 and output window 510 of an anomaly detection model according to some aspects of the present disclosure.
[0052] As shown, the input window 505 of the anomaly detection model provides a simplified interface for the user. The input window 505 includes an "Upload" button 515, a "Reset" button 520, and an "Inspect" button 525. The "Upload" button 515 allows the user to upload their test image into the system. Once clicked, in some aspects, the system can open a file browser window to select an image file. Once the test image is uploaded, the image can be displayed within the input window (e.g., 535), which allows the user to visually confirm the image they have uploaded. Once the image is uploaded and confirmed, the user can click the "Inspect" button 525 to initiate the anomaly detection process. The results will be displayed in the output window 510. The "Reset" button 520 provides a simple way for the user to clear the uploaded test image and any related results. Below the three buttons, the input window also includes a box 530 that displays the name or version of the model being used.
[0053] As shown in the figure, the output window 510 is designed to display the anomaly detection results to the user. The first box 540 in the output window 510 is used to display the inspection results. For example, depending on the model evaluation, if an anomaly is detected within the test image, the box 540 may include text such as "Inspection result: Anomaly". If it is determined that the test image is normal, the box 540 may include text such as "Inspection result: Normal". The second box 545 in the output window 510 shows the anomaly score generated for the uploaded test image. For example, the second box 545 may contain "Inspection score: 0.4323". The anomaly score displayed within the second box 545 can provide the user with a direct insight into the degree to which the test image deviates from the normal dataset. The third box 550 in the output window 510 displays the name or version of the model being used. Below the third box 550, the fourth box 555 displays the test image, where the regions with a high probability of containing the anomaly 560 are highlighted. In some aspects, regions with varying probabilities within the test image can be highlighted using different colors. For example, the region 560 with a high probability can be marked as red, the regions with a medium probability can be colored green or yellow, and the regions with a low probability can be colored blue.
[0054] In some aspects, the user can upload multiple images together. For example, after clicking the "Upload" button 515 within the input window 505, a file browser window is prompted, allowing the user to select a batch of images from their files. Depending on the system capabilities, the uploaded images can be accessed and processed sequentially (one image at a time) or in parallel (multiple images simultaneously). Once the processing is complete, in some aspects, the system can aggregate and jointly display the final results in the output window 510.
[0055] Figure 6 An example method 600 for processing normal images to generate core set samples for anomaly detection according to some aspects of the present disclosure is depicted. The example method 600 is designed to pre-train an anomaly detection model using a feature matching method (e.g., Figure 1 115). Through pre-training, the model learns, extracts, and identifies core set samples that capture the most fundamental and representative patterns within the normal dataset. When a test image is received, the model can effectively compare the test image with these core set samples for anomaly detection.
[0056] In some aspects, the example method 600 can be executed by one or more computing devices, such as Figure 1 the anomaly detection model 115 shown, Figure 3A the feature extraction module 315, the dimensionality reduction module 325, and the patch feature generation module 335 shown, Figure 3B the patch feature projection module 345 and the core set subsampling module 380 shown, and / orFigure 9 Computing device 900 shown.
[0057] At block 605, a computing system (e.g., Figure 1 115) receives a plurality of normal images (e.g., Figure 2 205). In some aspects, the normal images may depict an object in its normal or standard state. In the context of aircraft inspection and maintenance, these normal images may be generated by NDI techniques and capture the internal structure of a component or device (e.g., a wing panel or an aircraft engine) in its normal or defect-free condition. These normal images may be used as a baseline to constitute "normal", and the patch features extracted from the normal images may be used for comparison with test images for anomaly detection. The normal images may be retrieved from a database or directly sourced from user submissions through an input interface (e.g., Figure 5 input window 505).
[0058] At block 610, the computing system evaluates each normal image (e.g., Figure 2 205) to determine its likelihood of being blurry or noisy. In some aspects, the likelihood of blurriness may be measured by an outlier probability score (also referred to as outlier probability in some aspects), which quantifies the probability that a particular image deviates from the normal state (established based on other received normal images). A higher score may indicate that the image is more likely to be blurry or potentially anomalous compared to other images. In some aspects, n-fold cross-validation may be performed to calculate the outlier probability score. For example, the entire dataset of normal images (e.g., Figure 2 205) may be divided into n (e.g., n = 3) different subsets (e.g., Figure 2 205-1, 205-2, and 205-3). Then, the system may iteratively train (n - 1) of these subsets (e.g., folds 205-2 and 205-3 for training the outlier detection model 210) and validate / test the remaining subset (e.g., fold 205-1 for validation). The training cycle may be repeated n (e.g., n = 3) times, each time with a different subset reserved for testing / validation. Thus, an outlier probability score is generated for each image within the dataset. The n-fold cross-validation provides each image with an opportunity in both the training and test subsets. This method can mitigate overfitting and ensure that the generated outlier probability scores are not biased towards any particular part of the normal dataset.
[0059] At block 615, the computing system examines the received set of normal images (e.g., Figure 2whether each image within the 205) has been processed and whether a corresponding outlier probability score has been generated. If the system determines that all images have been processed, method 600 proceeds to block 620. If the system determines that some images remain unprocessed, method 600 returns to block 610, where the system evaluates the omitted images and generates corresponding outlier probability scores.
[0060] At block 620, the computing system performs image-level denoising based on the generated outlier probability scores of the images within the received normal data set. In some aspects, the computing system may first arrange the images in descending order according to the outlier probability scores of the images. Images with relatively high scores may be placed at the front of the list (e.g., Figure 2 of 225), while images with relatively low scores may be placed at the end of the list. After sorting the images, the system may apply filtering criteria, such as excluding the top n% of the images with the highest outlier probability scores, to remove the most likely noisy or blurry images. In some aspects, the system may define a threshold for the outlier probability scores. After determining that the score of an image is equal to or higher than the threshold, the system may remove the image. The threshold and value may be adjusted according to various factors, such as the size of the normal data set, the quality of the images within the normal data set, and the accuracy and / or efficiency requirements of the anomaly detection model, etc.
[0061] At block 625, after image-level denoising, the cleaned or refined normal images (e.g., Figure 2 of 235 or Figure 3A of 305) are segmented into smaller segments (e.g., from 310-1 to 310-n). Segmentation is optional and may benefit the system when the normal image is of large size or includes a wide range of details where more refined and localized analysis becomes necessary. In some aspects, such as when the normal image depicts an aircraft wing panel, segmentation may isolate the individual slots of the wing for more detailed feature extraction.
[0062] At block 630, the computing system processes the refined normal images (e.g., Figure 3A of 305) to extract patch features (e.g., Figure 3A of 340-1 to 340-P). In some aspects, the computing system may first pass the normal image or the segmented image through a feature extraction module (e.g., Figure 3A of 315). The module (e.g., which consists of a convolutional layer followed by an activation function) may help the system identify various spatial features or characteristics within the normal image. The output of the module may be a set of feature maps of dimension (C×H’×W’) (e.g., Figure 3A of 320-1 to 320-N). To further improve computational efficiency, the set of feature maps may then be provided to a dimensionality reduction module (e.g., which consists of a pooling layer) (e.g.,Figure 3A 325) to compress the data, thereby generating a feature map with a reduced dimension of (C×H×W) (where H is less than H' and / or W is less than W') (e.g., Figure 3A from 330-1 to 330-n-N). After dimensionality reduction, the system then splits these reduced feature maps into patch features. Since multiple normal images are processed (e.g., N normal images are received), for each position within the reduced-dimension feature map, a corresponding set of patch features with a dimension of (N×C) is generated (e.g., from Figure 3A 340-1 to 340-P). Each set of patch features can capture the localized features or characteristics of the normal images at a specific position. In some aspects, the system can project each set of patch features individually into a corresponding feature space, which allows the system to perform noise cancellation within each set. In some aspects, the system can pool all the patch features from all sets and project them into a single and shared feature space (e.g., Figure 3B 350). This method can enable the system to analyze the collective pattern of all patch features and perform more global noise cancellation.
[0063] At block 635, the computing system uses a density-based method (e.g., LOF) to calculate the outlier score for each patch feature. The LOF algorithm measures the local density deviation of a patch feature from its neighbors. An LOF score for a patch feature significantly greater than 1 indicates that the patch feature is in a sparser region (within the feature space) compared to its neighbors, which can indicate that the patch is an outlier. Conversely, an LOF score closer to 1 indicates that the patch feature has a density similar to its surrounding neighbors. After the calculation, each patch feature is associated with a corresponding outlier score representing its deviation from the norm.
[0064] At block 640, the computing system performs patch-level denoising. In some aspects, the computing system can first sort all the patch features in descending order based on their corresponding outlier scores. In the ordered list (e.g., Figure 3BThe patch features in front of (365) have the highest outlier scores. After rearrangement, the computing system can apply defined filtering criteria to the sorted list, where patch features that meet or exceed the criteria can be removed from further processing. The filtering criteria can be predefined based on historical data, the accuracy and efficiency requirements of the anomaly detection model, or the nature of the patch feature dataset. As described above, in some aspects, the filtering criteria can be percentage-based, such as eliminating the top n% of patch features with the highest outlier scores. In some aspects, the filtering criteria can be threshold-based, where a threshold for defining the outlier score is set, and images with outlier scores equal to or higher than the threshold are removed. Patch-level denoising allows the system to discard the patch features that are most likely to be outliers (or blurry), and thus mitigate the risk of being misled by noisy data during subsequent anomaly detection when a test image is received.
[0065] At block 645, denoised patch features (e.g., Figure 3B of 375) are provided for core set subsampling, where the computing system identifies a subset of the most representative patch features and captures the overall pattern or characteristics of the normal dataset. The subset of patch features selected during core set subsampling can also be referred to as the core set (e.g., 390-1), and the patch features in the subset can also be referred to as core set samples. In some aspects, the system can use the k-means clustering algorithm to classify the denoised patch features into multiple clusters and identify the centroid of each corresponding cluster as a core set sample.
[0066] At block 650, the computing system saves the identified core set samples (e.g., Figure 3B of 390-1) in a storage or database (e.g., Figure 3B storage 385). When evaluating a new test image, these core set samples can be used as a baseline for future anomaly detection. In some aspects, the outlier scores of the identified core set samples (e.g., 390-2) can also be saved to the storage or database, and the outlier scores can be used to weight the final anomaly scores (e.g., Figure 4 of 435) generated for the new test image.
[0067] Figure 7 Illustrates an example method 700 for detecting anomalies in a test image using the generated core set samples according to some aspects of the present disclosure. The example method 700 is designed for model inference, where a pre-trained anomaly detection model (e.g., Figure 1 of 115) processes a new test image and performs anomaly detection by comparing the test image with the core set samples (which are generated during the pre-training process).
[0068] In some aspects, the example method 700 can be executed by one or more computing devices, such asFigure 1 the illustrated anomaly detection model 115, Figure 3A the illustrated feature extraction module 315, dimensionality reduction module 325, and patch feature generation module 335, Figure 3B the illustrated patch feature projection module 345, Figure 4 the illustrated nearest neighbor search module 425, and / or Figure 9 the illustrated computing device 900.
[0069] At block 705, a computing system (e.g., Figure 1 115) receives a test image (e.g., Figure 4 405). In some aspects, the test image (e.g., Figure 4 405) can depict an aircraft wing panel with potential defects.
[0070] At block 710, the computing system divides the test image into multiple segments (e.g., from 410-1 to 410-n). The segmentation is optional and can allow the system to perform more fine-grained and localized anomaly detection by independently evaluating each smaller segment of the test image. In some aspects, the test image can be divided into the same number of segments in the same manner as normal images during the pre-training phase. By doing so, consistency in subsequent feature extraction and nearest neighbor search processes can be ensured.
[0071] At block 715, the computing system extracts patch features from the test image. For example, in some aspects, the computing system can first pass the test image or its segmented segments through a feature extraction module (e.g., Figure 3A 315) to extract high-dimensional feature maps. These feature maps capture unique spatial patterns and / or characteristics within the test image. To simplify the computation, the system can then reduce the dimensions of these feature maps via a dimensionality reduction module (e.g., Figure 3A 325). Once the dimensionality reduction is complete, the system can divide these reduced-dimensional feature maps (with dimensions of (C×H×W)) (e.g., Figure 4 415-1 to 415-n) into patch features (e.g., Figure 4 420-1 to 420-P). For each position within the reduced-dimensional feature maps (e.g., a total of (n×H×W) positions), a corresponding patch feature (with dimensions of (1×C)) is generated. The patch features include local spatial information and can be used for comparison with the core set samples for anomaly detection.
[0072] At block 720, the computing system accesses a storage containing the core set samples (e.g., Figure 4 390-1) identified during the pre-training process (e.g., Figure 4385). For each patch feature derived from the test image, the system searches the memory for the nearest or closest core set sample (e.g., Figure 4 430).
[0073] At block 725, for each patch feature, the computing system calculates the distance between the feature and its nearest core set sample. Various distance metrics can be used based on the specific implementation, such as Euclidean distance or cosine similarity.
[0074] At block 730, the computing system aggregates the calculated distances and generates an anomaly score for the test image (e.g., Figure 4 435). In some aspects, the distance between each patch feature and its nearest core set sample can be weighted by the outlier score (e.g., LOF score) of the core set sample (e.g., Figure 4 390 - 2). The weighting mechanism incorporates the outlier score into the anomaly detection such that the anomaly score is not only a measure of the raw deviation but is also adjusted by the importance and / or reliability of each core set sample. Under the weighted approach, the patch features extracted from the test image are not treated equally. Instead, the influence of patch features with higher outlier scores (i.e., more representative) can be enhanced, and the influence of patch features with lower outlier scores (i.e., less representative) can be reduced.
[0075] At block 735, the computing system compares the anomaly score of the test image (e.g., Figure 4 435) with a defined threshold. The threshold can determine the sensitivity of the anomaly detection model. If the anomaly score is equal to or exceeds the threshold, method 700 proceeds to block 740, where the system classifies the test image as anomalous (or containing an anomaly). In some embodiments, associated results can be generated to report the anomaly (e.g., Figure 5 540). In some aspects, after the determination, a detailed report or visual representation (e.g., Figure 5 555) can be generated to highlight the anomalous section. If the anomaly score is below the threshold, method 700 proceeds to block 745, where the system determines the test image to be normal. In some aspects, results can be generated to report the normal state, which indicates the absence of detectable anomalies.
[0076] Figure 8 is a flowchart depicting an example method 800 for pre - training an anomaly detection model according to some aspects of the present disclosure.
[0077] At block 805, the computing system (e.g., Figure 1 115) receives a plurality of normal images (e.g., Figure 2 205 or Figure 3A 305).
[0078] At block 810, the computing system generates a plurality of patch features by processing each of the plurality of normal images (e.g., Figure 3A 340 of
[0079] At block 815, the computing system generates a core set including one or more core set samples (e.g., Figure 3B 390-1 of Figure 3B 340 of
[0080] At block 820, the computing system receives a test image (e.g., Figure 4 405 of
[0081] At block 825, the computing system generates one or more test patch features by processing the test image (e.g., Figure 4 420 of
[0082] At block 830, the computing system generates an anomaly score by comparing one or more test patch features (e.g., Figure 4 420 of Figure 4 435 of
[0083] In some aspects, the computing system may further divide each of the plurality of normal images (e.g., Figure 3A 305 of Figure 3A 310 of
[0084] In some aspects, the computing system may also generate an outlier probability for each of the plurality of normal images, including dividing the plurality of normal images into a plurality of groups (e.g., Figure 2 205-1, 205-2, and 205-3 of Figure 2 205-1 of Figure 2 210 of Figure 2 205-1 of
[0085] In some aspects, after determining that one or more of the multiple normal images have an outlier probability that meets the first criterion, the computing system can generate a subset of normal images (e.g., Figure 2 230 of Figure 2 235 of Figure 3A 340 of Figure 3B 370 of Figure 3B 375 of Figure 3B 375 of
[0086] by removing one or more normal images from the multiple normal images (e.g., Figure 3B 390-2 of Figure 3B 385 of the storage body of Figure 3B 340 of Figure 4 435 of Figure 4 390-2 of
[0087] In some aspects, the computing system can further divide a test image (e.g., Figure 4 405 of Figure 4 410 of
[0088] Figure 9Illustrates an example computing device 900 configured to perform various aspects of the present disclosure. Although depicted as a physical device, in some aspects, computing device 900 may be implemented using virtual devices and / or across multiple devices (e.g., in a cloud environment). Computing device 900 may include, as Figure 1 shown, an anomaly detection model 115.
[0089] As shown, computing device 900 includes a CPU 905, a memory 910, a storage device 915, one or more network interfaces 925, and one or more I / O interfaces 920. In the aspect shown, CPU 905 retrieves and executes programming instructions stored in memory 910, as well as stores and retrieves application data resident in storage device 915. CPU 905 generally represents a single CPU and / or GPU, multiple CPUs and / or GPUs, a single CPU and / or GPU having multiple processing cores, etc. Memory 910 is generally included to represent random access memory. Storage device 915 may be any combination of disk drives, flash-based storage devices, etc., and may include fixed and / or removable storage devices, such as fixed disk drives, removable memory cards, caches, optical storage devices, network-attached storage (NAS), or storage area network (SAN).
[0090] In some aspects, I / O devices 935 (such as keyboards, monitors, etc.) are connected via I / O interface 920. Additionally, via network interface 925, computing device 900 may be communicatively coupled to one or more other devices and components (e.g., via a network, which may include the Internet, a local network, etc.). As shown, CPU 905, memory 910, storage device 915, network interface 925, and I / O interface 920 are communicatively coupled via one or more buses 930.
[0091] In the aspect shown, memory 910 includes an image denoising component 950, a patch feature generation component 955, a patch feature denoising component 960, a core set subsampling component 965, and a nearest neighbor search component 970. Although depicted as discrete components for conceptual clarity, in some aspects, the operations of the depicted components (and other components not shown) may be combined or distributed across any number of components. Additionally, although depicted as software resident in memory 910, in some aspects, the operations of the depicted components (and other components not shown) may be implemented using hardware, software, or a combination of hardware and software.
[0092] In the aspect shown, image denoising component 950 is configured to provide a noisy image for pre-training an anomaly detection model (e.g., Figure 1Remove the noisy image from the received normal dataset before (as in 115). In some aspects, the image denoising component 950 can generate an outlier probability (also referred to as an outlier probability score in some aspects) for each normal image (e.g., Figure 2 as in 205) through an n-fold cross-validation process. For example, the image denoising component 950 can first divide the normal dataset into several groups or folds (e.g., n folds) (e.g., Figure 2 205-1, 205-2, and 205-3), with each group containing an equal number of normal images. For each iteration, one of these groups can be selected as the validation dataset, while the remaining groups can be used as the training dataset. The image denoising component 950 can include an outlier detection model (e.g., Figure 2 as in 210), which is trained on the training dataset and then validated on the validation dataset to calculate the outlier probability. The calculation can be repeated several times (e.g., n times) until each image in the normal dataset is associated with an outlier probability. Thereafter, the image denoising component 950 can rank the images based on their associated outlier probabilities in descending order. To filter out the noisy images, the component 950 can apply an established criterion to the sorted list, such as removing the top n% of the images with the highest probabilities or eliminating the images whose probabilities exceed a defined threshold.
[0093] In the illustrated example, the patch feature generation component 955 is configured to process the received image (e.g., Figure 3A the normal image 305 or Figure 4 the test image 405) and generate corresponding patch features. For example, in some aspects, the patch feature generation component 955 can extract a high-dimensional feature map (e.g., Figure 3A 320-1 and 320-1-N) by passing the image through a convolutional layer, which is deployed to identify the spatial hierarchy and patterns within the image. After feature extraction, the component 950 can then continue to use a pooling layer to reduce the dimension of these feature maps. After dimension reduction, the component 950 can divide the refined feature map (e.g., Figure 3A 330-1 or Figure 4 415-1) into patch features (e.g., Figure 3A 340-1 or Figure 4 420-1), where each patch feature corresponds to a specific location within the image and represents the localized pattern or characteristics of the image at that location.
[0094] In the illustrated example, the patch feature denoising component 960 is designed to further refine patch features (e.g., by removing noisy patch features) before the patch features extracted from the normal images are provided for the core set subsampling. In some aspects, before performing denoising, the patch feature denoising component 960 can first generate an outlier score for each patch feature using a density-based method (e.g., LOF). Using the LOF method, the patch feature denoising component 960 can first project the patch features into a shared feature space (e.g., Figure 3B of 350), where the outlier score of a given patch feature is calculated based on its local density deviation compared to neighboring patch features. In some aspects, the local density can be determined by the distance between a patch feature and its k-th nearest neighbor in the feature space. After the outlier scores have been determined for all patch features, the component 960 can continue to rank the patch features in descending order based on their scores (e.g., Figure 3B of 365), and apply the determined criteria to filter out patch features that may mislead the anomaly detection (e.g., Figure 3B of 370). In some aspects, the criteria can be set to exclude the top n% of patch features with the highest outlier scores. In some aspects, the criteria can be defined to remove any patch feature whose outlier score exceeds a defined threshold.
[0095] In the illustrated aspect, the core set subsampling component 965 selects core set samples from the refined set of patch features (e.g., Figure 3B of 375). In some aspects, these core set samples can capture the most representative patterns or characteristics of the normal data set and can serve as a baseline for anomaly detection when processing new test images. The core set samples and their associated outlier scores can be saved in the storage device 915 or a remote database (e.g., Figure 1 of 125).
[0096] In the illustrated aspect, the nearest neighbor search component 970 is configured to measure the similarity between a test image (e.g., Figure 4 of 405) received during model inference and one or more normal images (e.g., Figure 3A of 305) received during model pre-training. The nearest neighbor search component 970 can first identify the core set samples that are nearest or closest to the patch features extracted from the test image (e.g., Figure 4 of 430). This involves calculating the distance between each test patch feature and the entire set of core set samples and identifying those with the shortest distances. After determining the closest core set sample for each patch feature, the component aggregates these individual distances to create an anomaly score for the test image (e.g., Figure 4of 435). The anomaly score can quantify the overall deviation of the test image from the established "normal" state and thus provide an indication of the likelihood that the test image is anomalous and / or contains anomalies. The higher the score, the more likely the test image is to be anomalous and / or contain anomalies. In some aspects, the outlier scores of the most recent core set samples (e.g., Figure 4 of 390-2) can be incorporated into the calculation of the anomaly score. For example, in some aspects, the core set samples may not be treated equally when determining the anomaly score of a test image. Instead, the distance between a patch feature and its most recent core set sample can be adjusted by the outlier score associated with that core set sample.
[0097] In the example shown, the storage device 915 can include core set samples 975, outlier scores 980 associated with these core set samples, and historical anomaly scores 985 generated for test images. In some aspects, the foregoing data can be stored in a remote database (e.g., Figure 1 of 125) connected to the computing device 900 via a network.
[0098] This application relates to the following clauses:
[0099] Clause 1. A method, the method comprising:
[0100] Receiving a plurality of normal images (305);
[0101] Generating a plurality of patch features (340) by processing each of the plurality of normal images (305);
[0102] Generating a core set (390-1) including one or more core set samples, wherein the one or more core set samples are selected from the plurality of patch features (340);
[0103] Receiving a test image (405);
[0104] Generating one or more test patch features (420) by processing the test image; and
[0105] Generating an anomaly score (435) by comparing the one or more test patch features (420) with the one or more core set samples.
[0106] Clause 2. The method according to clause 1, the method further comprising: dividing each of the plurality of normal images into a plurality of segments (310), wherein each segment of the plurality of segments includes a sub-region of the normal image within the plurality of normal images.
[0107] Clause 3. The method according to Clause 1, the method further comprising: generating an outlier probability (360) for each of the plurality of normal images, generating the outlier probability comprising:
[0108] Dividing the plurality of normal images into a plurality of groups, each group comprising an equal number of normal images;
[0109] Designating a first group of the plurality of groups as a validation data set, and designating the remaining groups of the plurality of groups as a training data set;
[0110] Training an outlier detection model on the training data set; and
[0111] Generating the outlier probability for each image within the validation data set based on a validation performed by the trained outlier detection model.
[0112] Clause 4. The method according to Clause 1, the method further comprising:
[0113] After determining that one or more of the plurality of normal images have an outlier probability that meets a first criterion, generating a subset of normal images by removing the one or more normal images from the plurality of normal images;
[0114] Generating the plurality of patch features by processing each of the subset of normal images;
[0115] Calculating an outlier score for each patch feature within the plurality of patch features;
[0116] After determining that one or more of the plurality of patch features have an outlier score that meets a second criterion, creating a subset of patch features by removing the one or more patch features from the plurality of patch features; and
[0117] Selecting the one or more core set samples within the core set from the subset of patch features.
[0118] Clause 5. The method according to Clause 4, wherein the outlier score for each patch feature within the plurality of patch features is calculated using a density-based method.
[0119] Clause 6. The method according to Clause 5, wherein the density-based method evaluates a local density deviation of a patch feature relative to adjacent patch features within the plurality of patch features, and determines the outlier score of the patch feature based on the local density deviation.
[0120] Clause 7. The method according to Clause 1, wherein each respective core set sample (390-1) within the one or more core set samples is stored in a database (385) together with a respective outlier score (390-2).
[0121] Clause 8. The method according to Clause 1, wherein the one or more core set samples (390-1) are selected from the plurality of patch features (340) using a clustering model.
[0122] Clause 9. The method according to Clause 8, wherein the clustering model divides the plurality of patch features into one or more clusters, and the one or more core set samples include centroids within the one or more clusters.
[0123] Clause 10. The method according to Clause 1, wherein the anomaly score (435) is weighted by an outlier score associated with the one or more core set samples.
[0124] Clause 11. The method according to Clause 1, the method further comprising: dividing the test image (405) into a plurality of test segments (410), wherein each of the plurality of test segments corresponds to a respective segment within each of the plurality of normal images.
[0125] Clause 12. A system, the system comprising:
[0126] One or more memories that collectively store computer-executable instructions; and
[0127] One or more processors configured to collectively execute the computer-executable instructions and cause the system to perform the following operations:
[0128] Receive a plurality of normal images (305);
[0129] Generate a plurality of patch features (340) by processing each of the plurality of normal images (305);
[0130] Generate a core set (390-1) including one or more core set samples, wherein the one or more core set samples are selected from the plurality of patch features (340);
[0131] Receive a test image (405);
[0132] Generate one or more test patch features (420) by processing the test image; and
[0133] An anomaly score (435) is generated by comparing the one or more test patch features (420) with the one or more core set samples.
[0134] Clause 13. The system according to clause 12, wherein the computer-executable instructions, when executed by the one or more processors, further cause the system to divide each of the plurality of normal images (305) into a plurality of segments (310), wherein each of the plurality of segments includes a sub-region of a normal image within the plurality of normal images.
[0135] Clause 14. The system according to clause 12, wherein the computer-executable instructions, when executed by the one or more processors, further cause the system to generate an outlier probability (360) for each of the plurality of normal images, and generating an outlier probability includes:
[0136] Dividing the plurality of normal images into a plurality of groups, each group including an equal number of normal images;
[0137] Designating a first group of the plurality of groups as a validation data set and designating the remaining groups of the plurality of groups as a training data set;
[0138] Training an outlier detection model on the training data set; and
[0139] Generating the outlier probability for each image within the validation data set based on a validation performed by the trained outlier detection model.
[0140] Clause 15. The system according to clause 12, wherein the computer-executable instructions, when executed by the one or more processors, further cause the system to perform the following operations:
[0141] After determining that one or more of the plurality of normal images have an outlier probability that meets a first criterion, generating a subset of normal images by removing the one or more normal images from the plurality of normal images;
[0142] Generating a plurality of patch features by processing each of the subset of normal images;
[0143] Calculating an outlier score for each patch feature within the plurality of patch features;
[0144] After determining that one or more of the plurality of patch features have an outlier score that meets a second criterion, creating a subset of patch features by removing the one or more patch features from the plurality of patch features; and
[0145] Select the one or more core set samples within the core set from the patch feature subset.
[0146] Clause 16. The system according to Clause 12, wherein the outlier score of each patch feature among the plurality of patch features is calculated using a density-based method, the density-based method evaluates the local density deviation of the patch feature relative to adjacent patch features within the plurality of patch features, and determines the outlier score of the patch feature based on the local density deviation.
[0147] Clause 17. The system according to Clause 12, wherein each corresponding core set sample (390-1) within the one or more core set samples is stored in a database (385) together with a corresponding outlier score.
[0148] Clause 18. The system according to Clause 12, wherein the one or more core set samples (390-1) are selected from the plurality of patch features (340) using a clustering model, and wherein the clustering model divides the plurality of patch features into one or more clusters, and the one or more core set samples include the centroids within the one or more clusters.
[0149] Clause 19. The system according to Clause 12, wherein the anomaly score (435) is weighted by the outlier scores associated with the one or more core set samples.
[0150] Clause 20. One or more non-transitory computer-readable media, the non-transitory computer-readable media containing computer program code in any combination, the computer program code when executed by the operation of a computer system performs operations including the following:
[0151] Receive a plurality of normal images (305);
[0152] Generate a plurality of patch features (340) by processing each of the plurality of normal images (305);
[0153] Generate a core set (390-1) including one or more core set samples, wherein the one or more core set samples are selected from the plurality of patch features (340);
[0154] Receive a test image (405);
[0155] Generate one or more test patch features (420) by processing the test image; and
[0156] An anomaly score (435) is generated by comparing the one or more test patch features (420) with the one or more core set samples.
[0157] In the present disclosure, reference is made to various aspects. However, it should be understood that the present disclosure is not limited to the specifically described aspects. Instead, any combination of the following features and elements (whether or not related to different aspects) is contemplated for implementing and practicing the teachings provided herein. Additionally, when elements of the aspects are described in the form of "at least one of A and B", it will be understood that aspects including only element A, only element B, and aspects including both element A and B are contemplated. Furthermore, although some aspects may achieve advantages over other possible solutions and / or over the prior art, whether a given aspect achieves a particular advantage does not limit the present disclosure. Thus, the aspects, features, aspects, and advantages disclosed herein are merely illustrative and are not to be considered elements or limitations of the appended claims unless expressly recited in the claims. Similarly, references to "the invention" should not be construed as a generalization of any inventive subject matter disclosed herein and should not be considered an element or limitation of the appended claims unless expressly recited in the claims.
[0158] As will be understood by those skilled in the art, the aspects described herein may be embodied as a system, a method, or a computer program product. Accordingly, the aspects may take the form of an entirely hardware aspect, an entirely software aspect (including firmware, resident software, microcode, etc.), or an aspect combining software and hardware aspects, which aspects are generally referred to herein as "circuitry", "module", or "system". Additionally, the aspects described herein may take the form of a computer program product embodied in one or more computer-readable storage media having computer-readable program code embodied thereon.
[0159] The program code embodied on the computer-readable storage media may be transmitted using any suitable medium, including but not limited to wireless, wired, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
[0160] Computer program code for performing operations in accordance with aspects of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, etc. and conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter case, the remote computer may be connected to the user's computer through any type of network connection, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0161] Aspects of the present disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to aspects of the disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing apparatus create means for implementing the functions / acts specified in the (one or more) blocks of the flowchart illustration and / or block diagram.
[0162] These computer program instructions may also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions for implementing the functions / acts specified in the (one or more) blocks of the flowchart illustration and / or block diagram.
[0163] The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other devices to produce a computer-implemented process, such that the instructions executed on the computer, other programmable data processing apparatus, or other devices provide a process for implementing the functions / acts specified in the blocks of the flowchart illustration and / or block diagram.
[0164] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various aspects of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of code that includes one or more executable instructions for implementing the specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, depending on the functionality involved, or the blocks may sometimes be executed in the reverse order or in an unordered manner. It should also be noted that each block of the block diagrams and / or flowchart diagrams, and combinations of blocks in the block diagrams and / or flowchart diagrams, can be implemented by a system based on dedicated hardware that performs the specified functions or acts, or by a combination of dedicated hardware and computer instructions.
[0165] While the foregoing is directed to aspects of the present disclosure, other and further aspects of the present disclosure may be devised without departing from the basic scope thereof, and the scope of the present disclosure is determined by the appended claims.
Claims
1. A method, the method comprising: Receiving a plurality of normal images (305); Generating a plurality of patch features (340) by processing each of the plurality of normal images (305); Generating a core set (390-1) including one or more core set samples, wherein the one or more core set samples are selected from the plurality of patch features (340); Receiving a test image (405); Generating one or more test patch features (420) by processing the test image; and Generating an anomaly score (435) by comparing the one or more test patch features (420) with the one or more core set samples.
2. The method according to claim 1, wherein the method further comprises: Dividing each of the plurality of normal images into a plurality of segments (310), wherein each segment of the plurality of segments includes a sub-region of the normal image within the plurality of normal images.
3. The method according to claim 1, the method further comprising: Generating an outlier probability (360) for each of the plurality of normal images, generating the outlier probability including: Dividing the plurality of normal images into a plurality of groups, each group including an equal number of normal images; Designating a first group of the plurality of groups as a validation data set and designating the remaining groups of the plurality of groups as a training data set; Training an outlier detection model on the training data set; and Generating the outlier probability for each image within the validation data set based on a validation performed by the trained outlier detection model.
4. The method according to claim 1, the method further comprising: After determining that one or more of the plurality of normal images have an outlier probability that meets a first criterion, generating a subset of normal images by removing the one or more normal images from the plurality of normal images; Generating the plurality of patch features by processing each of the subset of normal images; Calculating an outlier score for each patch feature within the plurality of patch features; After determining that one or more of the plurality of patch features have an outlier score that meets a second criterion, creating a subset of patch features by removing the one or more patch features from the plurality of patch features; And Selecting the one or more core set samples within the core set from the subset of patch features.
5. The method according to claim 4, wherein, The outlier score for each patch feature within the plurality of patch features is calculated using a density-based method.
6. The method according to claim 5, wherein, The density-based method evaluates the local density deviation of a patch feature relative to adjacent patch features within the plurality of patch features and determines the outlier score of the patch feature based on the local density deviation.
7. The method according to claim 1, wherein, Each corresponding core set sample (390-1) within the one or more core set samples is stored in a database (385) together with a corresponding outlier score (390-2).
8. The method according to claim 1, wherein The one or more core set samples (390-1) are selected from the plurality of patch features (340) using a clustering model.
9. A system, the system comprising: One or more memories that jointly store computer-executable instructions; And One or more processors, the one or more processors being configured to jointly execute the computer-executable instructions and cause the system to perform the following operations: Receive a plurality of normal images (305); Generate a plurality of patch features (340) by processing each of the plurality of normal images (305); Generate a core set (390-1) including one or more core set samples, wherein the one or more core set samples are selected from the plurality of patch features (340); Receive a test image (405); Generate one or more test patch features (420) by processing the test image; and Generate an anomaly score (435) by comparing the one or more test patch features (420) with the one or more core set samples.
10. One or more non-transitory computer-readable media, the non-transitory computer-readable media containing computer program code in any combination, the computer program code performing operations including the following when executed by the operation of a computer system: Receive a plurality of normal images (305); Generate a plurality of patch features (340) by processing each of the plurality of normal images (305); Generate a core set (390-1) including one or more core set samples, wherein the one or more core set samples are selected from the plurality of patch features (340); Receive a test image (405); Generate one or more test patch features (420) by processing the test image; and Generate an anomaly score (435) by comparing the one or more test patch features (420) with the one or more core set samples.