Today's visual inspection applications can utilize the power of Machine Learning to automate the process and replace a human inspector. The cost of running such applications is ever decreasing and their accuracy in some cases may surpass human levels.
However, all machine learning applications rely on training data. Just like training a person to spot defects is required, the artificial detection model needs to be trained. We do that by collecting a set (called a "dataset") of images of correctly manufactured parts vs. defective parts. To that end we have created a simple application which you can get from the Tulip App Library.
Prerequisites
To start working with the data collection app we need:
A camera connected to a Tulip Player machine
Have the camera configured in Tulip Vision
Download the Data Collection app from the Tulip App Library
Assign the app to the same machine with the connected camera
Change the camera assignment in the app to match your connected camera
Optionally, set up regions in the camera view to constrain the collection area
You can learn about setting up Vision cameras in the getting started with vision article.
For learning how snapshots triggers work, which we use in this app, refer to the using the snapshot feature article.
How its done
Once you run the app on your Player machine, you're taken to a view from the camera. You also have two button for annotating the view as "Pass" or "Fail". Click the buttons to mark the current view as a good or bad part, and observe the table filling up with samples. Collect at least 10 images from each class: Pass and Fail.

To verify your work, go to the data collection table and see your samples and annotations.

Conclusion
Start collecting a visual dataset of defects for parts in your manufacturing process to prepare for automatic visual inspection with machine learning. Using the data collection app you create your dataset in a Tulip Table, which you can then export (click on the ellipsis icon on the table to download the Image Dataset) for usage with a model training service.Simply run the app on a Player machine with a camera connected and annotate the images.