# Setup a Parameter Search Test

Note: A previously configured and saved Parameter Search Data XML file can be loaded and used as the basis for a new test by pressing the Load button.

1. From the Workspace drop-down, select the workspace to load. The loaded workspace will contain all of the configured streams and tools in that workspace.

   Note: The utility automatically points to the directory where your VisionPro Deep Learning workspaces are stored. If you want to use a different workspace from another directory, press the Import button to load that workspace.
2. From the Stream drop-down, select the stream you want to test.
3. From the Tool, select the tool.
4. In the table, select the parameter to test. Click the Parameter field, which will initiate a drop-down menu, where you can scroll through the full list of tool parameters.
5. Check the Process Only checkbox, which is disabled by default, if you only want to vary the processing parameters, while keeping the training parameters the same over multiple iterations.

6. In the Values field, enter the parameter value combinations to test.

   Note:
   - To enter additional parameters, press Enter after adding the Values. To add multiple values for a specific parameter, use a blank(Space key) as the separator between each value.
   - If after entering the value the Values field is outlined in red, there is an error in the syntax.

   Example:

   Parameter | Tool | Data Type | Example
   --- | --- | --- | ---
   AspectRatio | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage. If you want to test 0%, 2% and 5%, you would enter: 0 2 5
   BorderType | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Enum: Black White Reflect Wrap Replicate | The syntax is the name of the parameter setting. If you want to test Black and Replicate, you would enter: Black Replicate
   Capacity | Red Focused - Unsupervised | Enum: Huge Large Medium Small Tiny | The syntax is the name of the parameter setting.
   Centered | Red Analyze - Focused (Supervised, Unsupervised) | Boolean | The syntax is the Boolean state, True or False. If you want to test the two states, enter: True False
   ColorChannels | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Int32 | The syntax is a 32-bit integer, 1 through 4. If you want to test greyscale, BGR and BGR(A), enter: 1 3 4
   Contrast | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   CountEpochs | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Int32 | The syntax is a 32-bit integer, 1 through 100000. The corresponding variable name in GUI is Epoch Count.
   Exclusive | Green Classify - Focused | Boolean | The syntax is the Boolean state, True or False.
   FeatureFilter | Blue Locate Blue Read | String | The syntax is a string representing the filter to be used. If you want to filter out features whose center is within the ROI, enter: x in [0,width] and y in [0,height]
   FeatureSize | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Size | If you want to test combinations of 90, 100, 110, you would enter: 90x90 100x100 110x110
   Flip | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Enum: None Horizontal Vertical Both | The syntax is the name of the parameter setting.
   GenerateLowPrecisionModel | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised) | Boolean | The syntax is the Boolean state, True or False.
   InvertContrast | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Boolean | The syntax is the Boolean state, True or False.
   KeepTrainSelection | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Boolean | The syntax is the Boolean state, True or False.
   LowPrecision | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised) | Boolean | The syntax is the Boolean state, True or False.
   Luminance | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   MaskingMode | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Enum: Transparent Mask Overlay | The syntax is the name of the parameter setting.
   OrientedFeatures | Blue Locate Blue Read | Boolean | The syntax is the Boolean state, True or False.
   Precision | Blue Locate Blue Read | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   RegionFilter | Red Analyze High Detail, Red Analyze - Focused (Supervised, Unsupervised) | String | The syntax is a string representing the filter to be used. Example: area > 500
   Rotation | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | List of intervals | The syntax is [low,high], where "low" and "high" are numbers. To enter a series of intervals, separate the values within the brackets with a space. If you wanted to test rotation intervals of (0°, 90°), (5°, 110°) and (-5°, -90°) you would enter: [0,90] [5,110] [-5,-90]
   SamplingDensity | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   SamplingIterations | Red Analyze - Focused (Supervised, Unsupervised) | Int32 | The syntax is a 32-bit integer, 1 through 10.
   Scale | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   ScaledFeatures | Blue Locate Blue Read | Boolean | The syntax is the Boolean state, True or False.
   Shear | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   SimpleRegions | Red Analyze Focused (Supervised and Unsupervised) | Boolean | The syntax is the Boolean state, True or False.
   Threshold | Blue Read, Blue Locate, Green Classify Focused | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   Threshold | Red Analyze - Focused (Supervised, Unsupervised), Red Analyze High Detail | Interval | An interval by 2 threshold values. Each threshold (the minimum and the maximum) value is double-formatted, between 0 and 1. Example: [0.7036, 0.9051]
   TrainingPasses | Red Focused - Unsupervised | Int32 | The syntax is a 32-bit integer, 1 through 3.
   TrainSelection | Green Classify - Focused, Red Analyze - Focused (Supervised, Unsupervised), Blue Locate, Blue Read | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   UseBaseline | Red Focused - Unsupervised | Boolean | The syntax is the Boolean state, True or False.
   NetworkModel | All | String | The syntax is the name of the parameter setting.
   MinimumEpochs | Green Classify and Red Analyze in High Detail modes | Int32 | The syntax is a 32-bit integer, 0 through current epoch.
   Stride | Red Analyze in High Detail mode | Int32 | The syntax is a 32-bit integer, 10 through 100.
   PatchSize | Red Analyze in High Detail mode | String | 128x128 or 256x256
   Patience | Green Classify High Detail, Red Analyze High Detail | Int32 | The syntax is a 32-bit integer, 0 through 100000.
   OptimizedBatchSizeOn | Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   RegionSmoothing | Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   DownsamplingSize | Red Analyze in High Detail mode | Int32 | The syntax is a 32-bit integer, 1 through 100000. The corresponding variable name in GUI is DownsamplingSize.
   ClassWeights | Green Classify in High Detail mode | Dictionary | Example of 3 parameter values: { "tag1": 1, "tag2": 1, "tag3": 1 } { "tag1": 1, "tag2": 1, "tag3": 2 } { "tag1": 2, "tag2": 1, "tag3": 1 } The ratio of Class 1 to Class 2 as 2:1 means that the number of training images for Class 1 is as twice as Class 2.
   ValidationSetRatio | Green Classify, Red Analyze in High Detail mode | Int32 | The syntax is a 32-bit integer, 1 through 50.
   UseHFlip | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseVFlip | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseRotation90 | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseRotation | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseZoomin | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseColorwise | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseGradation | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseDistortion | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseContrast | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseLuminance | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseSharpen | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseBlur | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   UseNoise | Green Classify, Red Analyze in High Detail mode | Boolean | The syntax is the Boolean state, True or False.
   ResizeSize | Green Classify in High Detail mode | Size | You would enter the size you want to resize: 90x90 100x100 110x110.
   Probability Threshold | Green Classify in High Detail mode | Single | The syntax is a number, 0 through 100.
   Heatmap | Green Classify in High Detail mode | Boolean | The syntax is the Boolean state, True or False.

7. In the Runs field, enter the number of iterations to perform. Multiple iterations will provide more statistical analysis, such as the mean, median and standard deviation, but will also require more time to execute.
8. Check the Reset checkbox, which is disabled by default, if you want to reset (i.e. un-train) the tool between train/process cycles.
9. Leave the Keep Train Selection checkbox enabled if you do not want the split between the Train Selection parameter to change. Otherwise, disable the checkbox.
10. Check the Save Tools checkbox, which is disabled by default, if you want to export the tool to the directory containing the Parameter Search experiment file.
11. The Filter field is used to create Display Filters. By default, it is set to not trained.

12. Press the Init button to initialize the parameter settings, which will then be displayed in the Results table. This will also enable the Start button.

    Note: If you make additional changes to the parameters and their settings, you will need to press the Init button again to update the parameters and values.

13. Press the Save button to save the Parameter Search Data XML file.

    Note: If you have not saved the file, when you press the Start button, you will automatically be prompted to save the Parameter Search Data file.

14. Press the Start button to begin the computation of the parameter settings.

    Once the tests begin to execute, the utility will indicate the time remaining for the test in the lower left corner of the application.

15. Once the test completes, you can review the results to determine the best combination of parameter settings.

16. If you click a cell in the R1 column, you can see the information displayed on Database Overview.