Main Content

Automated Visual Inspection

Automate quality control tasks using anomaly detection and localization methods

Automated visual inspection (AVI) is a set of techniques used to detect and classify defects in manufactured products. Modern visual inspection uses machine learning and deep learning algorithms to assist and improve quality assurance processes.

Custom defect detection must accurately determine the location of defects in a given image and classify the defect category. Generally, you can detect defects of different sizes using state-of-the-art supervised deep learning models such as the latest you only look once (YOLO) algorithms. Best performing models characterize and locate defects in real-time.

You can use anomaly detection deep learning methods to determine whether an image of a manufactured product is normal or anomalous. Additionally, you can produce precise and interpretable results using anomaly localization. This method enables you to create a visualization of the defects using an anomaly map.

The specific detection model you select to automate a visual inspection task depends on several factors. These factors include the amount of training data available for normal and anomalous samples, the number of anomaly classes to recognize, and the type of localization information required for understanding and monitoring predictions. For more information, see Getting Started with Anomaly Detection Using Deep Learning.

To perform automated visual inspection, download the Computer Vision Toolbox™ Automated Visual Inspection Library from the Add-On Explorer. For more information on downloading add-ons, see Get and Manage Add-Ons. Some functionality also requires Deep Learning Toolbox™.


développer tout

groundTruthGround truth label data
imageDatastoreDatastore for image data
sceneLabelTrainingDataCreate training data for scene classification from ground truth (depuis R2022b)
splitAnomalyDataSplit data into training, validation and testing sets for anomaly detection (depuis R2023a)
trainFCDDAnomalyDetectorTrain fully convolutional data description (FCDD) anomaly detection network (depuis R2022b)
trainFastFlowAnomalyDetectorTrain FastFlow anomaly detection network (depuis R2023a)
trainPatchCoreAnomalyDetectorTrain PatchCore anomaly detection network (depuis R2023a)
anomalyThresholdOptimal anomaly threshold for set of anomaly scores and corresponding labels (depuis R2022b)
fcddAnomalyDetectorDetect anomalies using fully convolutional data description (FCDD) network for anomaly detection (depuis R2022b)
fastFlowAnomalyDetectorDetect anomalies using FastFlow network (depuis R2023a)
patchCoreAnomalyDetectorDetect anomalies using PatchCore network (depuis R2023a)
classifyClassify image as normal or anomalous (depuis R2022b)
predictPredict unnormalized anomaly scores (depuis R2022b)
yoloxObjectDetectorDetect objects using YOLOX object detector (depuis R2023b)
trainYOLOXObjectDetectorTrain YOLOX object detector (depuis R2023b)
detectDetect objects using YOLOX object detector (depuis R2023b)
anomalyMapPredict per-pixel anomaly score map (depuis R2022b)
anomalyMapOverlayOverlay heatmap on image using per-pixel anomaly scores (depuis R2022b)
viewAnomalyDetectionResultsView anomaly detection results (depuis R2022b)
evaluateAnomalyDetectionEvaluate anomaly detection results against ground truth (depuis R2022b)
anomalyDetectionMetricsAnomaly detection metrics (depuis R2022b)
vision.loadYOLOXObjectDetectorLoad YOLOX object detector model for code generation (depuis R2023b)