OcrPretrainedModel

Description

The types of pretrained OCR models that are available for selection in the relevant filters. Each model is assigned a reliable detection range: if the height of a character falls below a set percentage of the inCharHeight parameter or rises above a set percentage of the inCharHeight parameter, then, while it may end up being detected and recognized anyway, the accuracy of that detection and recognition will likely be lower than it would be if it were to fall within the reliable detection range. The inCharHeight parameter is set in one of the two filters which infer an OcrPretrainedModel, either DL_ReadCharacters or DL_ReadCharacters_Deploy.
  • Fast:
    • recommended for cases where high inference speed is crucial and the font size can be guaranteed to remain relatively stable across inspected images
    • reliable detection range: roughly between 0,86 × inCharHeight and 1,14 × inCharHeight. For example, if the uppercase letter "A" is 35 pixels high, then other uppercase letters not lower than 30 pixels and not higher than 40 pixels will fall within the reliable detection range
    • very fast and relatively accurate, but not very flexible
  • FastWide:
    • recommended for cases where high inference speed is crucial, but the font size cannot be guaranteed to remain relatively stable across inspected images
    • reliable detection range: roughly between 0,57 × inCharHeight and 1,43 × inCharHeight. For example, if the uppercase letter "A" is 35 pixels high, then other uppercase letters not lower than 20 pixels and not higher than 50 pixels will fall within the reliable detection range
    • very fast and relatively flexible, but not always very accurate
  • Balanced:
    • most highly optimized of all the models, combining fast execution with high accuracy of detection and recognition
    • recommended for cases where the font size cannot be guaranteed to remain stable across inspected images
    • reliable detection range: roughly between 0,57 × inCharHeight and 1,43 × inCharHeight. For example, if the uppercase letter "A" is 35 pixels high, then other uppercase letters not lower than 20 pixels and not higher than 50 pixels will fall within the reliable detection range
    • relatively fast, very accurate and relatively flexible
  • Scalable:
    • recommended for cases where the font size is expected to change drastically across inspected images
    • reliable detection range: roughly between 0,34 × inCharHeight and 1,67 × inCharHeight. For example, if the uppercase letter "A" is 60 pixels high, then other uppercase letters not lower than 20 pixels and not higher than 100 pixels will fall within the reliable detection range
    • relatively fast, relatively accurate and extremely flexible
  • Extended:
    • very similar to the Balanced model, but also outputs character masks (the only model that does; the output outMasks[] returns only an array of empty regions if the selected pretrained model is any other than Extended)
    • recommended for cases where the font size is expected to change drastically across inspected images
    • reliable detection range: roughly between 0,57 × inCharHeight and 1,43 × inCharHeight. For example, if the uppercase letter "A" is 35 pixels high, then other uppercase letters not lower than 20 pixels and not higher than 50 pixels will fall within the reliable detection range
    • relatively fast, very accurate and relatively flexible
  • OcrA:
    • very similar to the Balanced model, but trained solely on OcrA font samples
    • recommended for cases where an OcrA text must be read, not recommended for any other font
    • reliable detection range: roughly between 0,57 × inCharHeight and 1,43 × inCharHeight. For example, if the uppercase letter "A" is 35 pixels high, then other uppercase letters not lower than 20 pixels and not higher than 50 pixels will fall within the reliable detection range
    • relatively fast and extremely accurate for the OcrA font

Values of this enumeration:

  • Fast
  • FastWide
  • Balanced
  • Scalable
  • Extended
  • OcrA