Visual product inspection is crucial for manufacturing, retail and many other industries. Shipment of damaged goods erodes customerstust and incurs additional costs for reimbursement or replacements. Today, there is a growing interest in automating the inspection process to increase the flow, reduce costs and accelerate feedback loops.
Anomali -Detection Predicts where a product differs from the norm infects possible indication; Localization anomaly is the more complex task of highlighting anomal regions using pixel anomalic scores. Despite progress in computer vision, there is a gap between research and implementation of anomalic location methods for the real world production environments. Most existing models focus on product -specific defects, so they are for limited use of manufacturers dealing with different products.
In a paper we have recently published in Elsevier’s Journal of Manufacturing Systems, we present the first benchmarking frame-a recently labeled product-magnoic data set and suggested the evaluation protocol for the anomalic location of the real world. We upset anomal examples from existing data sets, collection of higher-level human-understanding descriptions to produce a new dataset that can be used to evaluate models in a general, product-embarrassment way.
We also identified optimal modeling methods, developed effective training and inference schemes and performed an ablation study of different techniques for estimating the optimal pixel intensity limits for segmenting anomal and non-anomal regions of an image. Users from different can use this benchmarking frame to implement automated visual inspection in production pipes.
Benchmarking framework
Using monitored learning to train anomalic location models have major disadvantages: compared to images of defective products, images of defective product are scarce; and defective product images impizing labeling. Therefore, our benchmarking frames require no anomal images during the training phase. Instead of the defective examples, the model teaches a distribution of typical image functions.
During the validation phase, we then only need a few anomal images to determine where the distribution of anomaly scores the boundary between normal and anomal pixels should fall. At infernic time, the trained model generates an anomali score map to highlight deviations in each input image. Then, using the optimal pixel intensity limit, it calculates a segmentation card that masks the non-anomalic pixels.
Ourchmarking Framework has three most important building blocks: the product-magnostic data set, a set of models and a set of evaluation methods. We go out of modeling methods for the widespread categories of the oven, depending on how they generate anomaly score maps: reconstruction, price card, patch equality and normalization of flow. The framework includes an advanced representative of each category.
For practical use, anomaly -localization must follow a double evaluation procedure: Metrics validation does not require a threshold, target inferencing metrics do. We emphasize effective determination of thresholds and address a gap in previous research. Different measurements have advantages in different boxes in the real world: Ourchmark provides a detailed analysis of inferencies (threshold-dependent) measurements, comparing four modeling methods with five different threshold-technical estimate.
Product-agostic dataset
To create a product-anghnostic data set, we reclass the anomal images in two existing data sets (MVTEC and BTAD) in accordance with higher level categories, more general categories. The anomal images in both data sets included pixel-precise anomali segmentation cards that highlight defects and masking defect-free regions.
We first categorize product images based on the presence or absence of background. An image with background has a product (eg a trunk or a hazelnut) on the background. In an image without a background, a close -up of the product (eg the woven of a blanket or texture of wood) draws for all pixels in the picture.
We notice additional anomal product images according to the oven’s product-magnoMe defective categories:
Structural | Distorted or missing Objex parts or some significant damage to the product structure. Examples: holes, bends, missing parts, etc. |
Surface | Defects that are mostly limited to smaller regions of the product surface, which requires relatively less repair. Examples: scratches, teeth, iron rust, etc. |
Pollution | Defects that indicate the presence of some foreign material. Examples: Glue Glide, Dust, Dirt, etc. |
Combined | Defects that combine one of the above with the types, with several connected components in the group’s truth segmentation card. Example: A hole in a contaminated background. |
The labeling was done by a team of annotators using a custom -built user interface. The Annotators manually labeled each anomal image by comparing it to a defective product image and consulting the corresponding truth segmentation card for an appropriate defective categorization. These product-anghnostic labels are now available in the supplementary materials of the paper. Researchers can use these labels to perform new experience and develop product prosthetic benchmarks.
Benchmarking of a new product
Benchmarking Framework provides valuable insight and guidance in the choice of modeling method, estimate of threshold method and process evaluation. As an effective starting point for a manufacturer that comes in with a new product, we suggest using Patch Distribution Model (PADIM), a patch-stilary-based approach and estimation of the egg from IOU (cross over Union) curve. If surface defects are more likely to appear, the conditional-normalization flow (CFLOW) model, a normalization-flow-based approach, may be preferable to PADIM. While we highlight the limitations of validation metrics, we emphasize that Iou is a more reliable inference metric for estimating segmentation performance.
To illustrate the process, consider the product Boottle from the MVTEC data set. The data set contains 209 normally and 63 anomal images of the bottle. The first step is to comment on the anomal images according to the Product-Replacement Categorization; This provides 41 images with structural defects, 21 with pollution and one with combined defects. Given this proportion of defects, PADIM should be the appropriate modeling method with the optimal threshold determined from the IOU curve. The next steps involve training of PADIM on normal images, estimating the threshold using the validation set, generating segmentation cards for test set images and visual confective regions for domain understanding.
We have released our benchmark in the hope that other researchers will expand it to help bridge the impressive progress of anomalic location in research and the challenges of implementation in the real world.