Class YoloModelDetectionRecognitionOptions
- Namespace
- CapCognition.Maui.YoloModelDetection
- Assembly
- CapCognition.Maui.YoloModelDetection.dll
public class YoloModelDetectionRecognitionOptions : RecognitionOptions, IDisposable
- Inheritance
-
YoloModelDetectionRecognitionOptions
- Implements
- Inherited Members
Constructors
YoloModelDetectionRecognitionOptions()
public YoloModelDetectionRecognitionOptions()
Properties
DoAutomaticDetectionOptimization
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 bool DoAutomaticDetectionOptimization { get; set; }
Property Value
DrawingOptions
Gets the overlay drawing options for the YOLO model detection.
public YoloModelDetectionOverlayDrawingOptions DrawingOptions { get; }
Property Value
LoadedYoloModel
public IYoloModel? LoadedYoloModel { get; }
Property Value
ModelConfidence
Gets or sets the model confidence to use for detection.
public float ModelConfidence { get; set; }
Property Value
ModelMulConfidence
Gets or sets the model multi-class confidence to use for detection.
public float ModelMulConfidence { get; set; }
Property Value
UseCroppedImageForRecognition
Set to true: 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 |
| |
| |
|................|
| |
| |
-------------------
Set to false: Use a fit 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 bool UseCroppedImageForRecognition { get; set; }
Property Value
Methods
ClearModelCacheFolder()
Clears the model cache folder.
public void ClearModelCacheFolder()
CreateAndLoadModel(string?)
Creates and loads the model in upfront. If the model are already created and loaded, this method does nothing and returns true. If the method is not called, the processor will create and load the model on the first detection call.
public bool CreateAndLoadModel(string? outputNameToSelect = null)
Parameters
outputNameToSelectstringThe name of the output to be selected. If null, the first output is selected
Returns
- bool
True if the model was created and loaded successfully.
CreateAndLoadModelAsync(string?)
Creates and loads the model asynchronously in upfront. If the model are already created and loaded, this method does nothing and returns true. If the method is not called, the processor will create and load the model on the first detection call.
public Task<bool> CreateAndLoadModelAsync(string? outputNameToSelect = null)
Parameters
outputNameToSelectstringThe name of the output to be selected. If null, the first output is selected
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()