# Play with Tutorial

This topic introduces how you can play with the tutorial of the VisionPro Deep Learning tool.

## Recap: Training Workflow

The training workflow of Red Analyze Focused Supervised can be summarized into:

1. Collect images that represent the full range of defects that you expect to encounter.
2. Define ROI, and masks if necessary, to define the views.
3. Create image sets for convenience, if necessary.

4. Go through each view and carefully label the defects.

   Defect | Label
   --- | ---

5. Add good images and label them as Good.

6. Split the entire images into the training images and the test images. Add the training images to the training set.

7. Edit tool parameters.
8. Train the tool.

9. Evaluate the results of tool by presenting images that were not used during training (test set), which contain defects as well as good images that do not contain defects.

   Defect Marking

## Download Tutorial

These tutorials are available on the Cognex Support website; download them and then import them into a newly created workspace, remove all tools and start from scratch.

Cognex provides several tutorials to help you learn how to use the VisionPro Deep Learning software, as well as understand some of the key concepts.

1. Download the VisionPro Deep Learning tutorials from Cognex support website.
2. Start the VisionPro Deep Learning graphical user interface (GUI).
3. Import a tutorial workspace from the Workspace menu, which launches the Import Workspace dialog.

4. Navigate to the directory where you stored the downloaded tutorials, and select a workspace to get started.

   Note:

   To navigate to a previously created workspace, expand the Workspace container by pressing the icon, and then select the desired workspace from the list and press the arrow icon:

   Note: You can consult the Cognex Deep Learning Tutorials topics for additional information.

5. Click each tool, update it with Tool - Update Parameters, and click the brain icon to train and see the results.

## Tutorial: Inspect Textures

Textures often have a pseudo-random character. They can be partially described by some basic characteristics (like the direction or width of the brush strokes). However, they also have a random character which changes from one sample to the next. The challenge is to accept these "normal" variations while still detecting small, yet visually disturbing, defects.

While the Red Analyze Tool – Unsupervised Mode is able to find anomalies in complex surfaces and textures, it requires that the anomalies are visually sufficiently salient to be separable from the background texture. If this is not the case, or essentially, if Red Analyze tool in Unsupervised Mode is not responding to certain anomalies or defects as required or expected, you need to switch to Red Analyze Tool – Supervised Mode.

The objective of this tutorial is understanding the difference between the Supervised and Unsupervised mode of the Red Analyze tool.

Note: For more information on the specific steps of setting up the tool, see the Red Analyze Focused Supervised.

1. Add the images for the Textures tutorial.
2. Add a Red Analyze tool.
3. Use the default ROI size, and segment the images by clicking the Scissors icon.
4. Label all of the images as Good.
5. Use the Display Filters to sort the images that contain the word "bad" in their file-name (type 'bad' into the Display field). Label those images as Bad.
6. Train the tool and review the results.
7. Note that the performance is very poor, with the tool reporting nearly all the images as intermediary.
8. Switch the tool to Red Analyze Focused Supervised.
9. In 20 of the "bad" images, label the defective areas with Regions.
10. Train the tool and review the results.
11. If necessary, label additional defective areas and retrain.