---
title: "Collect data for visual inspection"
slug: "collect-data-for-visual-inspection"
updated: 2024-03-11T22:01:29Z
published: 2024-03-11T22:01:29Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.tulip.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Collect data for visual inspection

*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.

[Embedded content](https://www.youtube.com/embed/AAAQbXE-A78)

## 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](https://support.tulip.co/docs/getting-started-with-vision) article.

For learning how snapshots Triggers work, which we use in this app, refer to the [using the snapshot feature](https://support.tulip.co/docs/using-visions-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.

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Collecting%20data%20for%20visual%20inspection%20with%20Vision_409558407.png)

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

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Collecting%20data%20for%20visual%20inspection%20with%20Vision_409558435.png)

## 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](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28485%29.png)

Check out this library app, [Vision Data Collection](https://tulip.co/library/apps/vision-data-collection/), as a reference!

## Further reading

- [Getting started with Vision](https://support.tulip.co/docs/getting-started-with-vision)
- [Using Vision Snapshots](https://support.tulip.co/docs/using-visions-snapshot-feature)
- [Using the Vision Camera Widget](https://support.tulip.co/docs/using-the-vision-camera-widget-in-apps)
- [Using Vision Snapshots with an External OCR Service](https://support.tulip.co/docs/using-visions-snapshot-feature-with-an-external-ocr-service)
- [Using Azure CustomVision.ai with Tulip for Visual Inspection](https://support.tulip.co/docs/using-microsoft-azure-customvisionai-with-tulip-vision-for-visual-inspection)

---

Did you find what you were looking for?

You can also head to [community.tulip.co](https://community.tulip.co) to post your question or see if others have faced a similar question!

**Tulip Player**

**Tulip Player** is the Windows/Mac executable program where users can run Tulip apps. Tulip player allows you to create a more seamless user experience by removing the need for a web browser and allows increased IT controls.

**Tulip Vision**

**Vision**is a simple no-code tool to use cameras for visual inspection, process adherence, equipment, personnel, and material tracking on the shop floor.

**Region**

**Regions**are user-established parts of a camera view within **Tulip Vision.****Detectors**can be added to individual regions, and when that detector is triggered, app logic can be executed. Multiple regions can be established in a single camera view.

**Trigger**

**Triggers** are groups of logic that are tied to an app event, such as step open, timer, widget interaction, etc. App builders can add triggers to **widgets**, **machines**, **devices**, **apps**, and **steps**.

**Triggers** can contain **actions**, **transitions**, and **conditions**.

**Tulip Player**

**Tulip Player** is the Windows/Mac executable program where users can run Tulip apps. Tulip player allows you to create a more seamless user experience by removing the need for a web browser, and allows increased IT controls.

**Tulip Tables**

**Tulip Tables** are a global location to store your production data. **Tables** are made up of **Records** (rows). A single can be accessed from multiple apps or stations at the same time. ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Tulip%20Tables%20Overview%20-%20Feature%20Overview(1).gif)
