FastDeploy
FastDeploy copied to clipboard
deploying ppocr_v2 with only recognition model
Hi
Thanks for sharing this project.
I want to change ppocr_v2 to get only the recognition model (for conditions where we have another detection model such as Yolo and I would like to use only the recognition ppocr model). I am working on the 0.7.0 release. I use this instruction for this work.
According to this instruction, I modified ppocr_v2.h and ppocr_v2.cc to ppocr_v4.h and ppocr_v4.cc ( arbitary name)
I put these two file in .../FastDeploy/fastdeploy/vision/ocr address. then I add #include "fastdeploy/vision/ocr/ppocr/ppocr_v4.h" to vision.h. then I changed ppocr_pybind.cc file in .../FastDeploy/fastdeploy/vision/ocr/ppocr address and ocr_pybind.cc file in .../fastdeploy/vision/ocr.
My changed and modified files:
ppocr_v4.cc.txt ppocr_v4.h.txt ppocr_pybind.cc.txt ocr_pybind.cc.txt
My infer.cc and sample image are:

when I want to compile infer.cc I get the bellow error :

Refer to this line of code, add a declaration before PPOCRv4
https://github.com/PaddlePaddle/FastDeploy/blob/521ec87cf5f55190489059a07ad4c074563c1ace/fastdeploy/vision/ocr/ppocr/ppocr_v3.h#L26
@jiangjiajun Unfortunately, I did not understand what to do. Can you be more specific?
I think you are create a new class PPOCRv4 like this
class PPOCRv4 : PPOCRv2 {
...
...
};
But we need to add a declaration before the definition, like
class FASTDEPLOY_DECL PPOCRv4 : PPOCRv2 {
...
...
};
此ISSUE由于一年未更新,将会关闭处理,如有需要,可再次更新打开。