Class ComputerVisionBuilderExtensions
- Namespace
- AiDotNet
- Assembly
- AiDotNet.dll
Extension methods for computer vision operations.
public static class ComputerVisionBuilderExtensions
- Inheritance
-
ComputerVisionBuilderExtensions
- Inherited Members
Methods
DetectAndTrack<T>(AiModelBuilder<T, Tensor<T>, TrackingResult<T>>, Tensor<T>)
Performs detection and tracking in one step.
public static TrackingResult<T> DetectAndTrack<T>(this AiModelBuilder<T, Tensor<T>, TrackingResult<T>> builder, Tensor<T> image)
Parameters
builderAiModelBuilder<T, Tensor<T>, TrackingResult<T>>The configured builder.
imageTensor<T>Input image tensor.
Returns
- TrackingResult<T>
Tracking result with tracked objects.
Type Parameters
TThe numeric type used for calculations.
DetectObjects<T>(AiModelBuilder<T, Tensor<T>, DetectionResult<T>>, Tensor<T>)
Performs object detection on an image.
public static DetectionResult<T> DetectObjects<T>(this AiModelBuilder<T, Tensor<T>, DetectionResult<T>> builder, Tensor<T> image)
Parameters
builderAiModelBuilder<T, Tensor<T>, DetectionResult<T>>The configured builder.
imageTensor<T>Input image tensor [batch, channels, height, width].
Returns
- DetectionResult<T>
Detection result with bounding boxes and labels.
Type Parameters
TThe numeric type used for calculations.
RecognizeText<T>(AiModelBuilder<T, Tensor<T>, OCRResult<T>>, Tensor<T>)
Performs OCR on an image.
public static OCRResult<T> RecognizeText<T>(this AiModelBuilder<T, Tensor<T>, OCRResult<T>> builder, Tensor<T> image)
Parameters
builderAiModelBuilder<T, Tensor<T>, OCRResult<T>>The configured builder.
imageTensor<T>Input image tensor.
Returns
- OCRResult<T>
OCR result with recognized text.
Type Parameters
TThe numeric type used for calculations.
SegmentInstances<T>(AiModelBuilder<T, Tensor<T>, InstanceSegmentationResult<T>>, Tensor<T>)
Performs instance segmentation on an image.
public static InstanceSegmentationResult<T> SegmentInstances<T>(this AiModelBuilder<T, Tensor<T>, InstanceSegmentationResult<T>> builder, Tensor<T> image)
Parameters
builderAiModelBuilder<T, Tensor<T>, InstanceSegmentationResult<T>>The configured builder.
imageTensor<T>Input image tensor.
Returns
- InstanceSegmentationResult<T>
Instance segmentation result with masks.
Type Parameters
TThe numeric type used for calculations.
UpdateTracks<T>(AiModelBuilder<T, Tensor<T>, TrackingResult<T>>, List<Detection<T>>)
Updates object tracking with new detections.
public static TrackingResult<T> UpdateTracks<T>(this AiModelBuilder<T, Tensor<T>, TrackingResult<T>> builder, List<Detection<T>> detections)
Parameters
builderAiModelBuilder<T, Tensor<T>, TrackingResult<T>>The configured builder.
detectionsList<Detection<T>>Detections from the current frame.
Returns
- TrackingResult<T>
Tracking result with updated tracks.
Type Parameters
TThe numeric type used for calculations.
VisualizeDetections<T>(AiModelBuilder<T, Tensor<T>, DetectionResult<T>>, Tensor<T>, DetectionResult<T>, string[]?)
Visualizes detection results on an image.
public static Tensor<T> VisualizeDetections<T>(this AiModelBuilder<T, Tensor<T>, DetectionResult<T>> builder, Tensor<T> image, DetectionResult<T> result, string[]? classNames = null)
Parameters
builderAiModelBuilder<T, Tensor<T>, DetectionResult<T>>The configured builder.
imageTensor<T>Input image.
resultDetectionResult<T>Detection result to visualize.
classNamesstring[]Optional class name mapping.
Returns
- Tensor<T>
Image with visualizations drawn.
Type Parameters
TThe numeric type used for calculations.
VisualizeOCR<T>(AiModelBuilder<T, Tensor<T>, OCRResult<T>>, Tensor<T>, OCRResult<T>)
Visualizes OCR results on an image.
public static Tensor<T> VisualizeOCR<T>(this AiModelBuilder<T, Tensor<T>, OCRResult<T>> builder, Tensor<T> image, OCRResult<T> result)
Parameters
builderAiModelBuilder<T, Tensor<T>, OCRResult<T>>The configured builder.
imageTensor<T>Input image.
resultOCRResult<T>OCR result to visualize.
Returns
- Tensor<T>
Image with visualizations drawn.
Type Parameters
TThe numeric type used for calculations.
VisualizeSegmentation<T>(AiModelBuilder<T, Tensor<T>, InstanceSegmentationResult<T>>, Tensor<T>, InstanceSegmentationResult<T>, string[]?)
Visualizes instance segmentation results on an image.
public static Tensor<T> VisualizeSegmentation<T>(this AiModelBuilder<T, Tensor<T>, InstanceSegmentationResult<T>> builder, Tensor<T> image, InstanceSegmentationResult<T> result, string[]? classNames = null)
Parameters
builderAiModelBuilder<T, Tensor<T>, InstanceSegmentationResult<T>>The configured builder.
imageTensor<T>Input image.
resultInstanceSegmentationResult<T>Segmentation result to visualize.
classNamesstring[]Optional class name mapping.
Returns
- Tensor<T>
Image with visualizations drawn.
Type Parameters
TThe numeric type used for calculations.