mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-30 12:30:59 +08:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user