TextDetectorBase<T>

Base Classes · AiDotNet.ComputerVision.Detection.TextDetection

Base class for text detection models.

Inheritance: ModelBase<T, Tensor<T>, Tensor<T>> → VisionTaskModelBase<T> → TextDetectorBase<T>

Implements: IGeneratedParameterRegistrar<T>, ITextDetectionTrainingModel<T>

Known derived types: CRAFT<T>, DBNet<T>, EAST<T>

Properties

Property Summary
double ConfidenceThreshold { get; } Gets the default minimum confidence a text region needs to be reported.
int MaxDetections { get; } Gets the maximum number of text regions kept for a single image.
string Name { get; } Name of this text detector.

Methods

Method Summary
IReadOnlyList<TextDetectionResult<T>> DetectBatch(Tensor<T> images) Detects text regions in every image of a batch, with one forward pass.
IReadOnlyList<TextDetectionResult<T>> DetectBatch(Tensor<T> images, double confidenceThreshold) Detects text regions in every image of a batch with a custom confidence threshold.
Task LoadWeightsAsync(string pathOrUrl, CancellationToken cancellationToken) Loads pretrained weights.
Tensor<T> Predict(Tensor<T> input) Predicts by running the forward pass and returning the primary output map.
TextDetectionResult<T> Detect(Tensor<T> image) Detects text regions in one image.
TextDetectionResult<T> Detect(Tensor<T> image, double confidenceThreshold) Detects text regions in one image with a custom confidence threshold.
long GetParameterCount() Gets the total parameter count of the model.
void SaveWeights(string path) Saves model weights.
void SetTrainingMode(bool training) Sets the model to training or inference mode.
void TrainTextDetections(Tensor<T> images, TextDetectionTrainingBatch targets) One training step on page images and their text polygons.