mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-13 12:23:55 +08:00
[CVCUDA] PP-OCR Cls & Rec preprocessor support CV-CUDA (#1470)
* ppocr cls preprocessor use manager * hwc2chw cvcuda * ppocr rec preproc use manager * ocr rec preproc cvcuda * fix rec preproc bug * ppocr cls&rec preproc set normalize * fix pybind * address comment
This commit is contained in:
@@ -55,11 +55,9 @@ DBDetectorPreprocessor::DBDetectorPreprocessor() {
|
||||
std::vector<float> value = {0, 0, 0};
|
||||
pad_op_ = std::make_shared<Pad>(0, 0, 0, 0, value);
|
||||
|
||||
std::vector<float> mean = {0.485f, 0.456f, 0.406f};
|
||||
std::vector<float> std = {0.229f, 0.224f, 0.225f};
|
||||
bool is_scale = true;
|
||||
normalize_permute_op_ =
|
||||
std::make_shared<NormalizeAndPermute>(mean, std, is_scale);
|
||||
normalize_permute_op_ = std::make_shared<NormalizeAndPermute>(
|
||||
std::vector<float>({0.485f, 0.456f, 0.406f}),
|
||||
std::vector<float>({0.229f, 0.224f, 0.225f}), true);
|
||||
}
|
||||
|
||||
bool DBDetectorPreprocessor::ResizeImage(FDMat* img, int resize_w, int resize_h,
|
||||
|
||||
Reference in New Issue
Block a user