Collecting Data for Visual Inspection with Vision
  • 11 Mar 2024
  • 3 Minutes to read
  • Contributors

Collecting Data for Visual Inspection with Vision


Article Summary

Create a dataset of defective parts towards a visual inspection quality check application.

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.

Lighting Recommendations

Overall, to create a consistent, reliable way to gather data, users should follow these tips:

  • Lighting setup should be consistent.
  • Restrict any shadow/glare in the camera view.
  • Set up at a high resolution if supported (you can do this by changing camera properties on the shopfloor page).
  • The position of the object that you are capturing should be the same/very similar.

How to Create a Dataset

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.
image.png

Check out this library app, Vision Data Collection, as a reference!

Further reading


Did you find what you were looking for?

You can also head to community.tulip.co to post your question or see if others have faced a similar question!


Was this article helpful?