Class YoloModelDetectionRecognitionOptionBuilder
public class YoloModelDetectionRecognitionOptionBuilder
- Inheritance
-
YoloModelDetectionRecognitionOptionBuilder
- Inherited Members
Constructors
YoloModelDetectionRecognitionOptionBuilder(RecognitionOptionBuilder, Action<YoloModelDetectionRecognitionOptions>)
public YoloModelDetectionRecognitionOptionBuilder(RecognitionOptionBuilder parent, Action<YoloModelDetectionRecognitionOptions> onDone)
Parameters
parentRecognitionOptionBuilderonDoneAction<YoloModelDetectionRecognitionOptions>
Methods
ConfigureOption(Action<YoloModelDetectionRecognitionOptions>)
Gives the option to configure the YoloModelDetectionRecognitionOption and directly calling methods on the option.
public YoloModelDetectionRecognitionOptionBuilder ConfigureOption(Action<YoloModelDetectionRecognitionOptions> configAction)
Parameters
configActionAction<YoloModelDetectionRecognitionOptions>
Returns
DoAutomaticDetectionOptimization(bool)
Set the true to do optimization of the processing methods when the models are loaded the first time. Only enable when using the models for multiple detections.
public YoloModelDetectionRecognitionOptionBuilder DoAutomaticDetectionOptimization(bool value = true)
Parameters
valuebool
Returns
Done()
Call this when done configuring this option Note: This method has to be the last method called in the builder chain.
public RecognitionOptionBuilder Done()
Returns
UseCroppedImageForRecognition()
Use cropped image for recognition. The image will be cropped (stretched) to fill the recognition area. Depending on the image aspect ratio, the image might be stretched horizontally or vertically so only the center part is taken for the recognition.
-------------------
| |
|................|
| |
| Recognized |
| |
| |
|................|
| |
| |
-------------------
public YoloModelDetectionRecognitionOptionBuilder UseCroppedImageForRecognition()
Returns
UseCudaProvider(bool)
Set the true to use the CUDA provider for the recognition. Note: Only enable when cuda toolkit (https://developer.nvidia.com/cuda-downloads) and CUDNN (https://developer.nvidia.com/cudnn) are installed. Only available for Windows and Linux. Under ARM64 or ARM32, the CUDA provider is not available.
public YoloModelDetectionRecognitionOptionBuilder UseCudaProvider(bool value = true)
Parameters
valuebool
Returns
UseFittedImageForRecognition()
Use a fitted image for recognition. The image will be resized to fit the recognition area.
-------------------
| b. . b|
| l. . l|
| a. Recognized . a|
| c. . c|
| k. . k|
| . . |
-------------------
public YoloModelDetectionRecognitionOptionBuilder UseFittedImageForRecognition()
Returns
UseModel(ModelStreamInfo)
Use the specified model for recognition.
public YoloModelDetectionRecognitionOptionBuilder UseModel(YoloModelDetectionRecognitionOptions.ModelStreamInfo modelStream)
Parameters
modelStreamYoloModelDetectionRecognitionOptions.ModelStreamInfoThe model stream information.