View Source Evision.DNN.TextRecognitionModel (Evision v0.1.7)

Link to this section Summary

Functions

Create text recognition model from network represented in one of the supported formats Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method

Create text recognition model from network represented in one of the supported formats Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method

Get the decoding method

Get the vocabulary for recognition.

Raising version of recognize/2.

Given the @p input frame, create input blob, run net and return recognition result

Given the @p input frame, create input blob, run net and return recognition result

Set the decoding method options for "CTC-prefix-beam-search" decode usage

Set the decoding method options for "CTC-prefix-beam-search" decode usage

Set the decoding method of translating the network output into string

Set the vocabulary for recognition.

Link to this section Functions

Link to this function

dnn_TextRecognitionModel!(model)

View Source

Raising version of dnn_TextRecognitionModel/1.

Link to this function

dnn_TextRecognitionModel!(model, opts)

View Source

Raising version of dnn_TextRecognitionModel/2.

Link to this function

dnn_TextRecognitionModel(model)

View Source

Create text recognition model from network represented in one of the supported formats Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method

Positional Arguments
  • model: string.

    Binary file contains trained weights

Keyword Arguments
  • config: string.

    Text file contains network configuration

Python prototype (for reference):

TextRecognitionModel(model[, config]) -> <dnn_TextRecognitionModel object>
Link to this function

dnn_TextRecognitionModel(model, opts)

View Source

Create text recognition model from network represented in one of the supported formats Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method

Positional Arguments
  • model: string.

    Binary file contains trained weights

Keyword Arguments
  • config: string.

    Text file contains network configuration

Python prototype (for reference):

TextRecognitionModel(model[, config]) -> <dnn_TextRecognitionModel object>

Raising version of getDecodeType/1.

Get the decoding method

@return the decoding method

Python prototype (for reference):

getDecodeType() -> retval

Raising version of getVocabulary/1.

Get the vocabulary for recognition.

@return vocabulary the associated vocabulary

Python prototype (for reference):

getVocabulary() -> retval

Raising version of recognize/2.

Link to this function

recognize!(self, frame, roiRects)

View Source

Raising version of recognize/3.

Given the @p input frame, create input blob, run net and return recognition result

Positional Arguments

@return The text recognition result

Python prototype (for reference):

recognize(frame) -> retval
Link to this function

recognize(self, frame, roiRects)

View Source

Given the @p input frame, create input blob, run net and return recognition result

Positional Arguments
  • frame: Evision.Mat.

    The input image

  • roiRects: [Evision.Mat].

    List of text detection regions of interest (cv::Rect, CV_32SC4). ROIs is be cropped as the network inputs

Return
  • results: [string].

    A set of text recognition results.

Python prototype (for reference):

recognize(frame, roiRects) -> results
Link to this function

setDecodeOptsCTCPrefixBeamSearch!(self, beamSize)

View Source

Raising version of setDecodeOptsCTCPrefixBeamSearch/2.

Link to this function

setDecodeOptsCTCPrefixBeamSearch!(self, beamSize, opts)

View Source

Raising version of setDecodeOptsCTCPrefixBeamSearch/3.

Link to this function

setDecodeOptsCTCPrefixBeamSearch(self, beamSize)

View Source

Set the decoding method options for "CTC-prefix-beam-search" decode usage

Positional Arguments
  • beamSize: int.

    Beam size for search

Keyword Arguments
  • vocPruneSize: int.

    Parameter to optimize big vocabulary search, only take top @p vocPruneSize tokens in each search step, @p vocPruneSize <= 0 stands for disable this prune.

Python prototype (for reference):

setDecodeOptsCTCPrefixBeamSearch(beamSize[, vocPruneSize]) -> retval
Link to this function

setDecodeOptsCTCPrefixBeamSearch(self, beamSize, opts)

View Source

Set the decoding method options for "CTC-prefix-beam-search" decode usage

Positional Arguments
  • beamSize: int.

    Beam size for search

Keyword Arguments
  • vocPruneSize: int.

    Parameter to optimize big vocabulary search, only take top @p vocPruneSize tokens in each search step, @p vocPruneSize <= 0 stands for disable this prune.

Python prototype (for reference):

setDecodeOptsCTCPrefixBeamSearch(beamSize[, vocPruneSize]) -> retval
Link to this function

setDecodeType!(self, decodeType)

View Source

Raising version of setDecodeType/2.

Link to this function

setDecodeType(self, decodeType)

View Source

Set the decoding method of translating the network output into string

Positional Arguments
  • decodeType: string.The decoding method of translating the network output into string, currently supported type:
    • "CTC-greedy" greedy decoding for the output of CTC-based methods
    • "CTC-prefix-beam-search" Prefix beam search decoding for the output of CTC-based methods

Python prototype (for reference):

setDecodeType(decodeType) -> retval
Link to this function

setVocabulary!(self, vocabulary)

View Source

Raising version of setVocabulary/2.

Link to this function

setVocabulary(self, vocabulary)

View Source

Set the vocabulary for recognition.

Positional Arguments
  • vocabulary: [string].

    the associated vocabulary of the network.

Python prototype (for reference):

setVocabulary(vocabulary) -> retval