|
| TextRecognitionModel () |
|
| TextRecognitionModel (const Net &network) |
| Create Text Recognition model from deep learning network Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method. More...
|
|
| TextRecognitionModel (const std::string &model, const std::string &config="") |
| Create text recognition model from network represented in one of the supported formats Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method. More...
|
|
const std::string & | getDecodeType () const |
| Get the decoding method. More...
|
|
const std::vector< std::string > & | getVocabulary () const |
| Get the vocabulary for recognition. More...
|
|
std::string | recognize (InputArray frame) const |
| Given the input frame, create input blob, run net and return recognition result. More...
|
|
void | recognize (InputArray frame, InputArrayOfArrays roiRects, std::vector< std::string > &results) const |
| Given the input frame, create input blob, run net and return recognition result. More...
|
|
TextRecognitionModel & | setDecodeOptsCTCPrefixBeamSearch (int beamSize, int vocPruneSize=0) |
| Set the decoding method options for "CTC-prefix-beam-search" decode usage. More...
|
|
TextRecognitionModel & | setDecodeType (const std::string &decodeType) |
| Set the decoding method of translating the network output into string. More...
|
|
TextRecognitionModel & | setVocabulary (const std::vector< std::string > &vocabulary) |
| Set the vocabulary for recognition. More...
|
|
| Model () |
|
| Model (const Model &)=default |
|
| Model (const Net &network) |
| Create model from deep learning network. More...
|
|
| Model (const String &model, const String &config="") |
| Create model from deep learning network represented in one of the supported formats. An order of model and config arguments does not matter. More...
|
|
| Model (Model &&)=default |
|
Impl * | getImpl () const |
|
Impl & | getImplRef () const |
|
Net & | getNetwork_ () |
|
Net & | getNetwork_ () const |
|
| operator Net & () const |
|
Model & | operator= (const Model &)=default |
|
Model & | operator= (Model &&)=default |
|
void | predict (InputArray frame, OutputArrayOfArrays outs) const |
| Given the input frame, create input blob, run net and return the output blobs . More...
|
|
Model & | setInputCrop (bool crop) |
| Set flag crop for frame. More...
|
|
Model & | setInputMean (const Scalar &mean) |
| Set mean value for frame. More...
|
|
void | setInputParams (double scale=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false) |
| Set preprocessing parameters for frame. More...
|
|
Model & | setInputScale (double scale) |
| Set scalefactor value for frame. More...
|
|
Model & | setInputSize (const Size &size) |
| Set input size for frame. More...
|
|
Model & | setInputSize (int width, int height) |
|
Model & | setInputSwapRB (bool swapRB) |
| Set flag swapRB for frame. More...
|
|
Model & | setPreferableBackend (dnn::Backend backendId) |
|
Model & | setPreferableTarget (dnn::Target targetId) |
|
This class represents high-level API for text recognition networks.
TextRecognitionModel allows to set params for preprocessing input image. TextRecognitionModel creates net from file with trained weights and config, sets preprocessing input, runs forward pass and return recognition result. For TextRecognitionModel, CRNN-CTC is supported.
- Examples
- samples/dnn/text_detection.cpp.