OcrSVTR.h 647 Bytes
Newer Older
Your Name's avatar
Your Name committed
1
2
3
4
5
6
7
// PaddleOCR车牌识别

#ifndef __OCR_SVTR_H__
#define __OCR_SVTR_H__

#include <migraphx/program.hpp>

liucong's avatar
liucong committed
8
#include <CommonDefinition.h>
Your Name's avatar
Your Name committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

namespace migraphxSamples
{

class SVTR
{
public:
    SVTR();

    ~SVTR();

    ErrorCode Initialize(InitializationParameterOfSVTR InitializationParameterOfSVTR);

    ErrorCode Infer(cv::Mat &img, std::string &resultsChar, float &resultsdScore, float &maxWHRatio);

private:
    cv::FileStorage configurationFile;

    migraphx::program net;
    cv::Size inputSize;
liucong's avatar
liucong committed
29
    std::string inputName;
Your Name's avatar
Your Name committed
30
    migraphx::shape inputShape;
liucong's avatar
liucong committed
31
    std::string dictPath;
Your Name's avatar
Your Name committed
32
33
34
35
36
37
    std::vector<std::string> charactorDict;

};
}

#endif