diff --git a/cpp_demo.md b/cpp_demo.md index bfb34399980db35d5834cf8b9a8c89fce34e26b6..2dd07083fbd020edaf46af2493f4949cc9c5362f 100644 --- a/cpp_demo.md +++ b/cpp_demo.md @@ -181,6 +181,7 @@ Output[900]: 0.000586 - 也可以从[Paddle/model项目](https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/ocr_recognition)中训练出模型 2. 示例代码: + ```c++ #include #include @@ -257,15 +258,18 @@ int main(int argc, char** argv) { return 0; } ``` + 3. 运行方法: 参考以上代码编译出可执行文件`OCR_DEMO`,模型文件夹为`ocr_attention`。手机以USB调试、文件传输模式连接电脑 在终端中输入以下命令执行OCR model测试: + ``` #OCR_DEMO为编译出的可执行文件名称,ocr_attention为ocr_attention模型的文件夹名称 adb push OCR_DEMO data/local/tmp adb push ocr_attention data/local/tmp adb shell 'cd data/local/tmp && ./OCR_DEMO --model_dir=./OCR_DEMO' ``` + 4. 运行结果 - \ No newline at end of file +