# Feature Sampling

During training, Focused mode tools use a special technique to selectively sample at a higher rate those parts of the images that are determined to be more likely to contribute additional information to the network. Focused mode tools do not sample the input images the same way although the image sampling does cover the entire image extent.

Because the training is performed using both information within the sample region and contextual information from around the sample region, samples collected at the edge of an image can strongly influence the tool. If you use a view within an image, then the context information for samples collected at the edge of the view use pixels from outside of the view for context data.

1 | Feature Size
2 | Sample Region
3 | Context Region

If the sample is at the edge of the image itself, the tool generates synthetic pixels for use as context. You can control the specific method used for this through the use of masks, borders, and sample color channels with the Border Type and Color parameters.

By using a mask, you can exclude parts of the image from training, although even masked regions are considered as context, depending on the Masking Mode parameter setting.

Finally, if you are using color images (or any image with multiple planes or channels), you can specify which channels are sampled. Using multiple channels has a minor impact on training and processing time, but it can allow the tools to work more accurately in cases where color provides important information.

Note: You can use the Masking Mode parameter as an alternative method for handling image boundaries. By masking the border of an image, you can prevent the tool from collecting image samples that require the generation of synthetic pixels for context.