IPostprocessor<T, TInput, TOutput>

Interfaces · AiDotNet.Interfaces

Defines a postprocessor that transforms model outputs into final results.

Known implementations: PostprocessorBase<T, TInput, TOutput>

For Beginners

A postprocessor is like a translator that:

  1. Takes raw model output (like numbers or probabilities)
  2. Converts it into something meaningful (like text, labels, or structured data)

Examples:

  • Converting softmax outputs to class labels
  • Decoding text from token IDs
  • Applying Non-Maximum Suppression to bounding boxes
  • Cleaning up OCR text output

How It Works

This is the core interface for all postprocessing operations in AiDotNet. Unlike preprocessing (which follows sklearn-style Fit/Transform pattern), postprocessing typically doesn’t require fitting - it transforms model outputs directly into the desired format.

Properties

Property Summary
bool IsConfigured { get; } Gets whether this postprocessor requires configuration before use.
bool SupportsInverse { get; } Gets whether this postprocessor supports inverse transformation.

Methods

Method Summary
IList<TOutput> ProcessBatch(IEnumerable<TInput> inputs) Transforms a batch of model outputs.
TInput Inverse(TOutput output) Reverses the postprocessing (if supported).
TOutput Process(TInput input) Transforms model output into the final result format.
void Configure(Dictionary<string, object> settings) Configures the postprocessor with optional settings.