[Bug Fix] add ocr new feature and fix codestyle (#764)

* fix ocr bug and add new feature

* fix bug

* fix bug

* fix bug

* fix bug

* fix bug

* fix bug

* add property

* add test

* fix code style

* fix bug

* fix bug

* fix bug

* fix port

* fix ocr

* fix_ocr

* fix ocr

* fix ocr

* fix ocr

* fix ocr

* Update paddle2onnx.cmake

* Update paddle2onnx.cmake

* Update paddle2onnx.cmake

Co-authored-by: Jason <jiangjiajun@baidu.com>
Co-authored-by: Jason <928090362@qq.com>
This commit is contained in:
Thomas Young
2022-12-07 19:31:54 +08:00
committed by GitHub
parent e6af8f2334
commit 5df62485c3
33 changed files with 1222 additions and 376 deletions
@@ -21,10 +21,6 @@ namespace fastdeploy {
namespace vision {
namespace ocr {
DBDetectorPreprocessor::DBDetectorPreprocessor() {
initialized_ = true;
}
std::array<int, 4> OcrDetectorGetInfo(FDMat* img, int max_size_len) {
int w = img->Width();
int h = img->Height();
@@ -63,10 +59,6 @@ bool OcrDetectorResizeImage(FDMat* img,
bool DBDetectorPreprocessor::Run(std::vector<FDMat>* images,
std::vector<FDTensor>* outputs,
std::vector<std::array<int, 4>>* batch_det_img_info_ptr) {
if (!initialized_) {
FDERROR << "The preprocessor is not initialized." << std::endl;
return false;
}
if (images->size() == 0) {
FDERROR << "The size of input images should be greater than 0." << std::endl;
return false;