Intel’s OpenVINO™ Defect Detection with Anomalib offers a comprehensive solution to quality control through near-real-time detection of manufacturing defects. The kit uses Anomalib, an open-source deep-learning library, to simplify training, testing, and deploying anomaly detection models on public and custom datasets. Models can be exported to the OpenVINO™ Intermediate Representation and deployed on Intel hardware. Optimized for inference performance, these models are trainable on CPU, require low memory, and are well-suited for edge deployment.
This kit uses the following technology stack:
Check out our AI Reference Kits repository for other kits.
New updates will be added here.
Table of Contents
If you have not installed all required dependencies, just run pip install anomalib
in the same OpenVINO Notebooks environment.
This notebook demonstrates how NNCF compresses a model trained with Anomalib. The notebook is divided into the following sections:
- Train an Anomalib model without compression
- Train a model with NNCF compression
- Compare the performance of the two models (FP32 vs INT8)
Connect your USB Camera and verify it works using a simple camera application. Once it is verified, close the application.
- Install Dobot requirements (See Dobot documentation here: https://en.dobot.cn/products/education/magician.html).
- Check all connections to the Dobot and verify it is working using the Dobot Studio.
- Install the vent accessory on the Dobot and verify it works using Dobot Studio.
- In the Dobot Studio, hit the "Home" button, and locate the:
a. Calibration coordinates: Initial position upper-left corner of cubes array.
b. Place coordinates: Position where the arm should leave the cubic over the conveyor belt.
c. Anomaly coordinates: Where you want to release the abnormal cube.
d. Then, replace those coordinates in the notebook
For data acquisition and inferencing we will use 501b notebook. There we need to identify the acquisition
flag, True for acquisition mode and False for inferencing mode. In acquisition mode be aware of the normal or abnormal folder we want to create, in this mode the notebook will save every image in the anomalib/datasets/cubes/{FOLDER} for further training. In inferencing mode the notebook won't save images, it will run the inference and show the results.
Note: If you don't have the robot you could jump to another notebook 501a and download the dataset from this link
For training, we will use the 501a notebook. In this example we are using "Padim" model and we are using Anomalib API for setting up the dataset, model, metrics, and the optimization process with OpenVINO.
- Learn more about OpenVINO
- Explore OpenVINO’s documentation