mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-30 03:22:05 +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:
@@ -24,12 +24,6 @@ namespace ocr {
|
||||
*/
|
||||
class FASTDEPLOY_DECL RecognizerPreprocessor {
|
||||
public:
|
||||
/** \brief Create a preprocessor instance for PaddleClas serials model
|
||||
*
|
||||
* \param[in] config_file Path of configuration file for deployment, e.g resnet/infer_cfg.yml
|
||||
*/
|
||||
RecognizerPreprocessor();
|
||||
|
||||
/** \brief Process the input image and prepare input tensors for runtime
|
||||
*
|
||||
* \param[in] images The input image data list, all the elements are returned by cv::imread()
|
||||
@@ -37,14 +31,14 @@ class FASTDEPLOY_DECL RecognizerPreprocessor {
|
||||
* \return true if the preprocess successed, otherwise false
|
||||
*/
|
||||
bool Run(std::vector<FDMat>* images, std::vector<FDTensor>* outputs);
|
||||
bool Run(std::vector<FDMat>* images, std::vector<FDTensor>* outputs,
|
||||
size_t start_index, size_t end_index,
|
||||
const std::vector<int>& indices);
|
||||
|
||||
std::vector<int> rec_image_shape_ = {3, 48, 320};
|
||||
std::vector<float> mean_ = {0.5f, 0.5f, 0.5f};
|
||||
std::vector<float> scale_ = {0.5f, 0.5f, 0.5f};
|
||||
bool is_scale_ = true;
|
||||
|
||||
private:
|
||||
bool initialized_ = false;
|
||||
};
|
||||
|
||||
} // namespace ocr
|
||||
|
||||
Reference in New Issue
Block a user