# 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 Green Classify High Detail Quick can be summarized into:

1. Collect images that represent the full range of each classification tag 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. Label all views with an appropriate tag.

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

6. Edit tool parameters.

7. Train the tool and check the result.

8. You can check the result even if you stop in the middle of training of High Detail Quick mode. However, there would be no result or the result will not be updated when you stop in the middle of the preparing the training.

## 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: Recognize Objects

Distinguishing different objects under various viewing angles and lighting conditions is a common, yet difficult task. Approaches like pattern matching or color histogram comparison may be viable in certain cases. In general, however, they do not work reliably, are difficult to tune, and need to be carefully selected on a case-by-case basis by a vision expert.

In this tutorial, we will use the Green Classify Tool and its simple and intuitive interface to work on an image classification database containing 150 different objects. There are 24 images from different viewing angles for each object. The goal is to use a subset of images from each class to train, and then to test the resulting performance on the remaining, untrained images.

The objectives of this tutorial are:

- Get to know the Green Classify tool.
- Tag images according to their class (use automatic tagging based on the image file names).
- Use a splitting ratio to separate training and testing samples to assess classification performance.
- Investigate the relevance of color for this application.

Note: For more information on the specific steps of setting up the tool, see the Green Classify High Detail Quick.

1. Add the images for the Classify tutorial.
2. Add a Green Classify High Detail Quick tool.
3. Process the images (in other words, image segmentation).

4. Label the images according to the image filename, using the following regular expression: (\d*)_.*

   The images are given the following name, n_Ixcy.png, where n is the object number, composed of 1 to 3 characters, and x and y are numbers describing the incidence of light.

   We want to tag them according to the object number. To do this, we will use a regex (regular expression):

       (^.*)_.*
       select: ()
       all characters at the beginning: ^.*
       before '_': _
       and ignore the rest: .*

5. Now that the images are correctly tagged, it is possible to run the first training. Let's keep all the parameters at their default values.
6. Verify that the Training Set dialog is set to 50%.
7. Train the tool, using the images you imported.
8. Review the results. This training does not rely on cross validation data, which means that all the data used for the training is the same as that used to measure the performance. There is no indication that this training will generalize to new data.