# Breaking Changes to the API

As High Detail Quick modes are added in VisionPro Deep Learning 2.1, there are some changes to API as well.

### Green Classify High Detail Quick C API

Training

Copy

Green High Detail Quick Training with C API

    1
    2
    3
    4
    5
    6
    // Green high-detail-quick mode
    ...
    param_ss << "workspaces/" << workspace_name << "/streams/" << stream_name << "/tools/" << tool_name << "/tool_type";
    status = vidi_training_set_parameter(param_ss.str().c_str(), "green_quick");
    ...

To train Green Classify High Detail Quick, the parameter_path ("workspaces/[workspace-name]/streams/[stream-name]/tools/[tool-name]/tool_type") should be set to "green_quick" for vidi_training_set_parameter.

To configure the Tool Parameters for Green Classify High Detail Quick, the parameter_path also should be set. For example, if you want to change Epoch Count in Training Parameters, set the parameter_path as "workspaces/[workspace-name]/streams/[stream-name]/tools/[tool-name]/training_parameters/count_epochs."

See "C:\ProgramData\Cognex\VisionPro Deep Learning\2.1\Examples\c++\Example.Training.HDGreen\example_training_hdgreen.cpp" for the more detailed examples of training C API codes.

Processing

The way to process Green Classify High Detail Quick with API is the same as those of Green Classify Focused and Green Classify High Detail. See "C:\ProgramData\Cognex\VisionPro Deep Learning\2.1\Examples\c++\Example.Runtime.HDGreen\example_runtime_hdgreen.cpp" for the details.

### Green Classify High Detail Quick .NET API

Training

Copy

Green High Detail Quick Training with .NET API

    1
    2
    3
    4
    5
    ...
    // Green high-detail-quick mode
    hdGreenTool.Database.Tool.Type = ToolType.GreenQuickHighDetail;
    ...

To train Green Classify High Detail Quick, the ViDi2.Training.ITool.Type should be set to ToolType.GreenQuickHighDetail.

To configure the Tool Parameters for Green Classify High Detail Quick, the ViDi2.Training.IGreenHighDetailParameters should be set. For example, you should set the value of CountEpochs for IGreenHighDetailParameters.

See "C:\ProgramData\Cognex\VisionPro Deep Learning\2.1\Examples\c#\Example.Training.HDGreen.Console\Program.cs" for the more detailed examples of training .NET API codes.

Processing

The way to process Green Classify High Detail Quick with API is the same as those of Green Classify Focused and Green Classify High Detail. See "C:\ProgramData\Cognex\VisionPro Deep Learning\2.1\Examples\c#\Example.Runtime.HDGreen.Console\Program.cs" for the details.

### Red Analyze High Detail Quick C API

Training

Copy

Red High Detail Quick Training with C API

    1
    2
    3
    4
    5
    6
    ...
    // Red high-detail quick mode
    param_ss << "workspaces/" << workspace_name << "/streams/" << stream_name << "/tools/" << tool_name << "/tool_type";
    status = vidi_training_set_parameter(param_ss.str().c_str(), "red_quick");
    ...

To train Red Analyze High Detail Quick, the parameter_path ("workspaces/[workspace-name]/streams/[stream-name]/tools/[tool-name]/tool_type") should be set to "red_quick" for vidi_training_set_parameter.

To configure the Tool Parameters for Red Analyze High Detail Quick, the parameter_path also should be set. For example, if you want to change Epoch Count in Training Parameters, set the parameter_path as "workspaces/[workspace-name]/streams/[stream-name]/tools/[tool-name]/training_parameters/count_epochs."

See "C:\ProgramData\Cognex\VisionPro Deep Learning\2.1\Examples\c++\Example.Training.HDRed\example_training_hdred.cpp" for the more detailed examples of training C API codes.

Processing

The way to process Red Analyze High Detail Quick with API is the same as those of Red Analyze Focused Supervised and Red Analyze High Detail. See "C:\ProgramData\Cognex\VisionPro Deep Learning\2.1\Examples\c++\Example.Runtime.Red\example_runtime_red.cpp" for the details.

### Red Analyze High Detail Quick .NET API

Training

Copy

Red High Detail Quick Training with .NET API

    1
    2
    3
    4
    ...
    // Red high-detail quick mode
    hdRedTool.Database.Tool.Type = ToolType.RedQuickHighDetail;
    ...

To train Red Analyze High Detail Quick, the ViDi2.Training.ITool.Type should be set to ToolType.RedQuickHighDetail.

To configure the Tool Parameters for Red Analyze High Detail Quick, the ViDi2.Training.IRedHighDetailParameters should be set. For example, you should set the value of CountEpochs for IRedHighDetailParameters.

See "C:\ProgramData\Cognex\VisionPro Deep Learning\2.1\Examples\c#\Example.Training.HDRed.Console\Program.cs" for the more detailed examples of training .NET API codes.

Processing

The way to process Red Analyze High Detail Quick with API is the same as those of Red Analyze Focused Supervised and Red Analyze High Detail. See "C:\ProgramData\Cognex\VisionPro Deep Learning\2.1\Examples\c#\Example.Runtime.HDRed.Console\Program.cs" for the details.