# Training Set

The VisionPro Deep Learning tools are based on deep learning, which teaches a neural network by feeding the network data and having the machine deduce from the learned data what should be accomplished. So the data that is fed into the network is vitally important. The largest single determinant that you can use to affect the network training Training is the process that your tool, which is a neural network, is learning about the features (pixels) based on the labels you made. For example, a tool will learn the defect/normal pixels in each image based on the defect/normal labels you drew. The goal of the tool Training is learning enough to give the correct inspection results of whether an unseen image is defective or not. The key to training is to ensure that you include all possible variations within your training set, and that your images are accurately labeled. Training times vary by the application, tool setup and the GPU in the PC being used to train the network. phase is the composition of the training image set A collection of images of your specific application. A training image set represents images of a specific part or process acquired in a consistent way using the lighting, optical, and mechanical characteristics of your runtime system. The training image set includes images that represent the range of image appearances that you expect to see in normal operation.. That is to say, a famous phrase in the field of machine learning "Garbage in, garbage out" also applies in the training of VisionPro Deep Learning tools. If meaningful images properly labeled are put into your neural network, the results of training could be good, but if not, there is no chance for good results. Therefore, it is paramount to ask yourself, "What am I teaching the network?"

What you are teaching the network is based on your training set. The training set represents the data that you are feeding your network. For the VisionPro Deep Learning tools, images constitute the backbone of the dataset that will be used to teach the tools. With deep learning, a large set of data is fed into the system, and the system will then deduce from the data what it is that we are trying to accomplish. So the data, in this context, images, is critically important.

Within the deep learning realm, the training image sets represent the data that will be passed into the network. When constructing your training image set, you will want to consider the following:

- Is my training image set representative of runtime images? This includes the following:

  - Lighting – If there will be lighting variations, then your Training Set should include the lighting variations you expect at runtime.
  - Color – Are parts going to change color during runtime? Then you should include all of the different color variations.
  - Rotation/Scale – When the part is presented to the camera, will it show up rotated or scaled? Then those variations should be included.
  - Part-to-part variation – If the parts being inspected may have subtle variations, then those variations should be included in your Training Set.
  - Background – In a lot of instances, images of your part may be captured on your desk. However, the parts will ultimately be running on a conveyor belt, which provides a much more interesting background for the Deep Learning tools. If that will be the case, you should get a Training Set of the part on the conveyor belt. And, if the background is not important to the inspection, you can mask it out. Masking out the background will generally improve the performance of the tool by not teaching the network about extraneous information.
- Is my training image set providing enough data? Many problems encountered while programming the Deep Learning tools can be solved by providing more images and data, and then retraining the tools.

Tip: If you annotate your images, in other words, provide descriptive information in the file names, such as "good", "bad", etc., you can help speed up the process of labeling Labeling is the process of annotating an image with "ground truth". Depending on the tool that you are using, labeling can take different forms. You label an image set for two reasons: to provide the information needed to train the tool and to allow you to measure and validate the performance of the trained tool against the ground truth. your images.