Defect Detection Demo
Pre-requisite:
The Defect Detection Demo tutorial requires video pipeline services, which are available in the
Video Analytics
or
Video Analytics and Time series
use cases installer package downloaded through the
Download
option on the
Edge Software Hub.
In this tutorial, you'll run the Defect Detection Demo to verify that
Edge Insights for Industrial
was installed successfully and to start getting familiar with its modules and structure. By following this tutorial, you will learn:
- How to startEdge Insights for Industrial
- How to visualize the results of the demo application
- How the application works at a high level
The Defect Detection Demo performs a quality control inspection on a video of the printed circuit boards (PCBs). In this scenario, the PCBs are inspected for quality control and detects two types of defects:
- A missing component. In the following illustration, PCB #1, on the left, is missing a component. PCB #2, on the right, shows the component in place:
- A component short: In the following illustration, PCB #1, on the left, has two solder joints connected that should not be connected, resulting in a short. PCB #2, on the right, shows the correct solder:
Step 1: Start the
Edge Insights for Industrial Containers
Edge Insights for Industrial
Containers- Run theEdge Insights for Industrial:$ xhost + $ cd $HOME/edge_insights_industrial/Edge_Insights_for_Industrial_2.4/IEdgeInsights/build $ sudo sg docker -c 'docker-compose up --build -d'Success is indicated by a screen similar to:In addition, the visualizer displays an image that displays metadata and a separate window that shows the PCB image with the defects outlined by red boxes:
- Verify the containers are running:docker psThe result looks similar to:The following table describes the contents of the screen.Image Column ContentDescriptionia_video_ingestion:2.4Ingests video frames from a video source, like a video file or camera, using theGStreamer*pipeline. Data, consisting of a frame and metadata, is published to the message bus.ia_video_analytics:2.4UseOpenVINO™on the data to perform inference. The data are received from the video ingestion and new data is published to the message bus.ia_visualizer:2.4Use a Python-based visualizer to display the frame sent by video analytics.ia_etcd:2.4etcd*provides endpoint configurations to establish the message bus and configuration ofEdge Insights for Industrialcontainers.ia_etcd_ui:2.4Web user interface foretcd*configurations.
- Check the log files to verify the data pipeline inEdge Insights for Industrialis working correctly:sudo docker logs -f ia_video_analytics
- Press Ctrl+C on your keyboard to stop the log file.
You must stop the containers to close the visualizer.
Step 2: Stop the
Edge Insights for Industrial Containers
Edge Insights for Industrial
Containers- Stop theEdge Insights for Industrialcontainers:cd $HOME/edge_insights_industrial/Edge_Insights_for_Industrial_2.4/IEdgeInsights/build sudo sg docker -c 'docker-compose down’
How the PCB Defect Detection Demo Works
Video frames are sent to a Python* application named
filter
in the Video Ingestion container where unwanted frames are filtered out and frames of interest are passed to a Python application named
classifier
. The classifier application is also in the Video Analytics container. This container is for deep learning inference via the data bus.
Results are saved to a database and passed to the data bus, which is used by the Visualizer container that runs a sample Python application to display the images on the
target system
.
Summary and Next Steps
In this tutorial, you learned to start
Edge Insights for Industrial
and see the results of the demo application as it performed a quality control inspection on a video of PCBs. You also learned how the application works at a high level and are more familiar with its modules and structure. For more Edge Insights for Industrial features/configurations, refer to edge_insights_industrial/Edge_Insights_for_Industrial_2.4/IEdgeInsights/README.md.
As a next step, see the
Textile Defect Classifier tutorial.