DLRuntime Edit ControlCognex VisionPro 9.24

The DLRuntime tool edit control provides a graphical user interface to the CogDLRuntimeTool API, which you use to integrate a saved VisionPro Deep Learning (VPDL) runtime workspace into your VisionPro application. See the topic Integrating a VPDL Runtime Workspace for more information.

For example, the following figure shows a DLRuntime tool after executing the Blue Read tool of an integrated VPDL workspace:

ImageProcessing_VPDL_WholeControl

The edit control offers the following features:

  • A row of control buttons at the top provide access to the most common operations.
  • A set of function tabs allow you specify the VPDL workspace you want to import and view results from the tools contained in the workspace.
  • An image display window displays the images you acquire and the results of processing the image with the various VPDL tools configured in the runtime workspace.

To include the edit control in your custom vision application, you must first add it to your Visual Studio .NET development environment. See the topic Adding Edit Controls to Visual Studio for more information.

See the following sections for more information:

Control Buttons

Cognex Barcode Barcode Barcode Tool Button Bar

The following table describes the function of each button:

ButtonDescriptionFunction
Run Button
RunRun the tools contained in the VPDL runtime workspace on the image stored in the Current.InputImage record.
Electric Button
Electric modeToggle electric mode, where the DLRuntime tool executes automatically when particular configuration parameters change. In electric mode, a lightning bolt appears next to every electric property.

Local Display Button

Local image display

Open or close the local image display window. A DLRuntime tool supports the following image buffers:

  • The Current.InputImage buffer contains the current image the tool will analyze.
  • The LastRun.InputImage buffer contains the last image processed by the DLRuntime tool.
  • Other LastRun image buffers to display tool results from the VPDL tools in the runtime workspace and any additional image processing you perform on the image.
Floating Display Button
Floating image displayOpen one or more floating image windows, which support the same image buffers as the local image display window.
Open Button
OpenOpen a VisionPro persistence (.vpp) file that contains a set of saved properties for this vision tool object type. VisionPro reports an error if you try to open a .vpp file for another object type.
Save Button
SaveSave the current properties of the vision tool to a VisionPro persistence (.vpp) file. The edit control allows you to choose between saving the vision tool with or without its image buffers and tool results.
Save As Button
Save AsSave the current properties of the vision tool to a new VisionPro persistence (.vpp) file.

Reset Button

Reset

Reset the vision tool to its default state.

The tool gives you a choice between resetting to the default-constructed state, which is appropriate when you are using it in a Visual Studio.NET application, or its template-initialized state, which is appropriate for QuickBuild applications.

Floating Results
Show Floating ResultsOpen a separate results window with the same contents as seen in the Results tab.
Tool Tips Button
Show ToolTipsEnable or disable the display of tooltips for individual items in the edit control.
Help Button
HelpOpen this VisionPro online help file.
DL Workspace

Use the DL Worksapce tab to select the VisionPro Deep Learning (VPDL) runtime workspace you want to integrate into QuickBuild. Use the following element to toggle between simple and advanced mode:

ImageProcessing_VPDL_SimpleAdvanced

Simple Mode

The tab offers the following parameters in simple mode:

ImageProcessing_VPDL_SimpleOptions

File NameThe VPDL runtime workspace to integrate with your VisionPro application
StateIndicates whether the workspace file is currently open and usable
SelectLaunch a file selection dialog box, assign the selected filename, and attempt to open it.
CloseClose any open VPDL runtime workspace.
Advanced Mode

The tab offers the following parameters in advanced mode:

ImageProcessing_VPDL_AdvancedOptions

File NameThe runtime workspace to be integrated
StateIndicates whether the workspace file is currently open and usable
BrowseLaunch a file selection dialog box and store the filename you select.
AssignApply the contents of the text box to the File Name property of the tool.
OpenOpen the specified runtime workspace file.
CloseClose any open VPDL runtime workspace.
Stream

Use Selected Stream Name to select the stream you want to process:

ImageProcessing_VPDL_Stream

Every VPDL workspace supports a collection of streams, where each stream supports its own database of training images and deep learning tools. Refer to your VisionPro Deep Learning technical documentation for details on streams.

Parameters

Use Parameters to modify certain runtime parameters for the various VPDL tools:

ImageProcessing_VPDL_Parameters

Depending on the VPDL tools in your integrated workspace, you can modify the following parameters:

  • The Threshold parameter of the Blue Read, Blue Locate, and the Legacy type of the Green Classify tools.
  • The Probability Threshold parameter of the Standard type of the Green Classify tool.
  • The Region Threshold of the Red Analyze tool, in all types.

    In addition, the edit control allows you to select a Red Analyze tool class by name.

Refer to your VisionPro Deep Learning technical documentation for details on these threshold parameters.

Click Save VRWS to save any changes to the original VPDL workspace.

Advanced

Use the Advanced tab to optimize the performance of this DLRuntime tool with the installed NVIDIA GPU:

ImageProcessing_VPDL_AdvancedTab

GPU Affinity

Use GPU Affinity to specify a particular installed GPU to use with this DLRuntime tool:

ImageProcessing_VPDL_GPUAffinity

The default value of -1 configures the DLRuntime tool to choose the GPU automatically from those available.

TensorRT Optimization

Use TensorRT Optimization to enhance the performance of an individual tool within your VPDL runtime workspace based on your installed NVIDIA GPU. To optimize a given machine-learning vision tool allows VisionPro to use a set of techniques that compress and improve your trained model to make predictions or decisions based on new, unseen data.

The DLRuntime tool makes TensorRt optimization available for select VPDL tools. The Advanced tab displays what vision tools are available for optimization with your selected GPU:

ImageProcessing_VPDL_TensorRT

Cognex recommends TensorRT Optimization for applications that you deploy on hosts with a supported NVIDIA GPU. If you do not know what GPU will be available for a deployed application, Cognex recommends you do not perform any TensorRt optimization. An optimized vision tool might completely fail to function in a deployment PC with an unsupported GPU.

The optimization option offers the following parameters:

Mode

Choose a speed-optimization method from the following options:

  • None: No speed optimization
  • Basic: Basic speed optimization, works with color images
  • Int8: Use optimization with network parameters and activations converted from floating point to 8 bit, making optimization faster but sometimes hurting accuracy
GPUThe setting for GPU Affinity
Width and HeightBy default, the tool performs TensorRT optimization for the trained image size, but you can specify a custom image size.
BatchThe batch size to use in optimizing this VPDL tool. See your VisionPro Deep Learning documentation for details on using batches.

Click Save VRWS to save any changes to the original VPDL workspace.

Graphics

Use the Graphics tab to enable or disable various graphics over the LastRun records associated with any VPDL tool in the runtime workspace:

ImageProcessing_VPDL_GraphicsTab

Results

Enable Show Red Score Maps to show the ScoreMap image for any Red tool.

Diagnostics

Enable or disable any of the following diagnostic graphics:

ImageProcessing_VPDL_DiagGraphics

Show Input ImageThe Without Copy, With Copy, and None options determine whether or not the input image is recorded as part of the diagnostic record; and whether the image is copied to the record or saved in the record as a reference.
Show Red DiagnosticsShow limited diagnostic graphics for any Red tool in the processed stream.
Show Red Diagnostics with HeatmapShow diagnostic graphics with heat map for any Red tool in the processed stream.
Show Green DiagnosticsShow diagnostic graphics for any Green tool in the processed stream.
Show Blue DiagnosticsShow diagnostic graphics for any Blue tool in the processed stream
Result

Use the Result tab to view the Results from any VisionPro Deep Learning tool in the runtime workspace:

ImageProcessing_VPDL_ToolResults

Use Tool to choose which VPDL tool result to display. Refer to your VisionPro Deep Learning documentation for details on the results for any tool.