Automated Visual Inspection
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™.
Load Training Data
Train Anomaly Detector
|Train fully convolutional data description (FCDD) anomaly detection network (depuis R2022b)|
|Train FastFlow anomaly detection network (depuis R2023a)|
|Train PatchCore anomaly detection network (depuis R2023a)|
|Optimal anomaly threshold for set of anomaly scores and corresponding labels (depuis R2022b)|
Detect Anomalies Using Deep Learning
|Detect anomalies using fully convolutional data description (FCDD) network for anomaly detection (depuis R2022b)|
|Detect anomalies using FastFlow network (depuis R2023a)|
|Detect anomalies using PatchCore network (depuis R2023a)|
|Classify image as normal or anomalous (depuis R2022b)|
|Predict unnormalized anomaly scores (depuis R2022b)|
Detect and Classify Objects
Visualize and Evaluate Results
|Predict per-pixel anomaly score map (depuis R2022b)|
|Overlay heatmap on image using per-pixel anomaly scores (depuis R2022b)|
|View anomaly detection results (depuis R2022b)|
|Evaluate anomaly detection results against ground truth (depuis R2022b)|
|Anomaly detection metrics (depuis R2022b)|
Load Detector for Code Generation
- Getting Started with Anomaly Detection Using Deep Learning
Anomaly detection using deep learning is an increasingly popular approach to automating visual inspection tasks.
- Getting Started with YOLOX for Object Detection
Use the YOLOX object detector to detect small objects with improved performance.