Run the SDK C# Example Project¶
The SDK_Example project provides examples showing how to use the Mech-DLK SDK to implement the required functions in the application.
Taking defect segmentation as an example, this section provides the required model and image dataset to lead the user to run the SDK project:
Open the example project
Double-click the file SDK_Example.sln in the path shown below to open it with Visual Studio 2019.
Referencing SDK
Right-click on Browse…, check the file mmind_dl_sdk_csharp.dll in the folder run_time and click on OK.
. The reference manager window will pop up. Click onBuild solution
Click on
to generate the executable file. Check the path generated by the executable in the output section at the bottom of the interface.Add the “run_time” library
Copy all the dll format files in the folder below to the release directory of the executable file generated in the previous step. If there are duplicate files, just overwrite them.
Original file location:
Target path:
Start project
Click on Start to run the program.
Program interface after startup:
Load Image: Load the image to be inferred.
Load Model: Load a model in dlkpack format exported by Mech-DLK.
Infer: perform inference.
Execution result:
Attention
It takes a little longer to load the model for the first time. About 5 minutes. It is recommended to use multiple threads to call the corresponding interface.