# Train Blue Locate for Generating a Pose

You train the tool to generate a pose for downstream tools.

## Prerequisites

- You have created or imported a workspace into VisionPro Deep Learning application.

- You have collected images and loaded them into the application.

## Procedure

1. Add a Blue Locate tool.

2. Define ROI The Region of Interest (ROI) defines the area of operation for the tool. The ROI preserves the positions, angles, stretch and skew of the original image. (Region of Interest) to construct Views. If necessary, adjust the ROI of the tool.

3. Configure Features parameters and Sampling parameters before 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..

   1. In the bottom-left corner of the display, there is a circle graphic that graphically illustrates the size of the Feature Size parameter setting.

   2. This circle graphic can be moved into the ROI and placed over the largest feature A feature is a visually distinguishable area in an image. Features typically represent something of interest for the application (a defect, an object, a particular component of an object).. Then, using the drag handle, you can adjust the Feature Size so that it approximately covers the feature.

4. Within the ROI, while hovering over the image, the mouse-cursor will have a cross-hairs icon which is used to place the feature label of the Blue tool. Click on a feature to label it.

5. The feature label will have a default character of 0. Enter in a meaningful character (A-Z, 0-9, up to 140 characters) to identify the feature. For identical features, you can use the same identifier.

   If there is more than one feature that you want to find in the image, identify and label each feature.

6. Create a model A specific spatial arrangement of a set of features (Blue Locate and Blue Read tools only.) During a post-processing step, the Blue Locate and Blue Read tools can fit all of the features detected in an image to the models defined for the tool. The overall pose and identity of the model is then returned. out of the labeled features. When used to generate a pose, you create a Node Model, which is used to output a transform that can be applied to any Views that are referencing that node model. A node model can be created of a single feature or a combination of multiple features.

   1. Select the labeled features that will compose the nodes of the model. To create a node model of multiple features, hold down the Shift key while selecting the labeled features, or hold down the Shift key and drag your mouse over the desired features.

   2. After selecting the labeled features, right-click on the View and from the menu, click on Create Model and select Create Node Model.

   3. This will automatically use the selected features and area as the nodes for the model, based on the input image, and open the Model Editor dialog.

   4. With the node model created, you can now label the rest of the images/views based on the node model.

   5. The node model will be based on the last labeled feature when you generated the node model. Place this label on the feature, and the tool will automatically generate the node model.

   6. The other nodes will indicate that they are potential parts of the node model. Select each feature to label each instance of the node.

   7. Label the rest of the images/views based on the previous two steps.

   8. Press the Process icon of the tool to apply the model to all of the images.

7. Once you have applied the node model to several of the images, press the Brain icon to train the tool.

   Tip: In addition to the following tips, consider using the bootstrap method of labeling your images. "Bootstrap" labeling refers to the process of beginning your labeling process by just labeling a small sample size of your images, then 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. the tool, and reviewing the results by accepting views with correct markings to convert them into labels, and removing incorrect markings and replacing them with correct labels. You can speed up this process further by dividing images into multiple views and only labeling a single view A view of an image is a region of pixels in an image. Tool processing is limited to the pixels within the view. You can manually specify a view, or you can use the results of an upstream tool to generate a view.. In addition, you can also temporarily reduce the Epoch Count parameter (one of the ), which will make the training time shorter.
8. After training, review the results by going through all of the images and determining whether or not the tool correctly marked the features and generated the appropriate model in the image.

1. Go through all of the images and determine whether or not the tool correctly marked the features in the image.

   1. If the tool has correctly marked the features and the model, right-click the image and select Accept View.

   2. If the tool has incorrectly marked the features or model, failed to identify a present feature or generated mismatches, do the following:

      1. Right-click the image and select Accept View.
      2. Right-click the image again and select Clear Markings and Labels.

      3. Manually re-label the features in the image based on steps E through F above.

9. If you encountered the scenario in (A.), you are ready to use the tool. If you encountered the scenario in (B.), you will need to retrain the tool and repeat the previous two steps.