Class DefaultOrientationMapper

java.lang.Object
com.itextpdf.pdfocr.onnxtr.orientation.DefaultOrientationMapper
All Implemented Interfaces:
IOutputLabelMapper<TextOrientation>

public class DefaultOrientationMapper extends Object implements IOutputLabelMapper<TextOrientation>
Default implementation for mapping output of a crop orientation model to TextOrientation values.

It expects the output to be an integer in the [0, 3] range, where the value specifies the amount of 90 degree rotations. Usually the model output would be a 4-element vector of probability-like values, which is then converted to an integer index via an argmax function.

  • Constructor Details

    • DefaultOrientationMapper

      public DefaultOrientationMapper()
      Constructs a new DefaultOrientationMapper with default behavior. This constructor performs no initialization logic.
  • Method Details