Quality Control in Industry with CV and TinyML
Quality control on production lines with computer vision and TinyML for the automatic inspection and defect detection in products as they move along the production line

Asset Description
Computer Vision (CV) algorithms can be used to analyse images of products and compare them to a "good" or "reference" image to identify any defects. These algorithms can be trained to detect a wide range of defects, including scratches, dents, misalignments, and missing components. Additionally, Computer Vision algorithms are able to work in real-time, allowing it to detect defects in products as they move along the production line and flag them for further inspection or rejection.
TinyML is a field that involves developing machine learning models that can run on small, resource-constrained devices such as microcontrollers. In the context of quality control on production lines, TinyML can be used to enable the CV algorithms to run on embedded devices, such as cameras or sensors, that are integrated into the production line. This allows the system to process images and make decisions about defects without the need to send data to a separate computer for analysis.
By combining computer vision algorithms and TinyML technology, it's possible to create a real-time, automated quality control system that can detect defects in products as they are produced, improving the overall quality and efficiency of the production process.
Features
This asset includes a Jupyter notebook that presents a complete pipeline for:
| Feature | Description |
|---|---|
| Exploratory Data Analytics (EDA) on image data | xxx |
| Data preparation and augmentation | xxx |
| Image classification with TensorFlow | with Deep learning (CNN) models |
| Models evaluation | xxx |
| Model interpretation predictions | with LIME |
| Transformation for use in embedded devices | transformation to TFLite format |
| Post-training quantization | xxx |
| Quantization aware training | xxx |
| Overall evaluation | xxx |
| Real-time usage of the developed models | with a python script opencv_object_tracking.py |
User Journey
This Notebook assumes that there is available a dataset of labeled images of a product and demonstrates how the user can perform the following:
- Dataset overview
- Data preparation and augmentation
- CV model creation for image classification
- Model transformation to TinyML using TfLite
- Comparison between the original and TfLite mode.
Usage Walkthroughs
- Instructions available here
- Detailed step-by-step demontration of the Quality Control asset can be found here
Acknowledgement
This repository was created in the context of the H2020 AI REGIO project (AI REGIO is a project funded by the European Union Framework Programme for Research and Innovation Horizon 2020 under Grant Agreement No 952003.)
Resources
- Notebook available in Github
- Created by ExpertAI - SCCH
- Contact xxxx@xxx.xx