mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
44 lines
1.3 KiB
C
44 lines
1.3 KiB
C
|
// Copyright (c) OpenMMLab. All rights reserved.
|
||
|
|
||
|
#ifndef MMDEPLOY_CSRC_CODEBASE_MMOCR_PANET_H_
|
||
|
#define MMDEPLOY_CSRC_CODEBASE_MMOCR_PANET_H_
|
||
|
|
||
|
#include "codebase/mmocr/mmocr.h"
|
||
|
#include "core/device.h"
|
||
|
#include "core/registry.h"
|
||
|
#include "core/tensor.h"
|
||
|
#include "opencv2/core.hpp"
|
||
|
|
||
|
namespace mmdeploy {
|
||
|
namespace mmocr {
|
||
|
|
||
|
class PaHeadImpl {
|
||
|
public:
|
||
|
virtual ~PaHeadImpl() = default;
|
||
|
|
||
|
virtual void Init(const Stream& stream) { stream_ = stream; }
|
||
|
|
||
|
virtual Result<void> Process(Tensor text_pred, //
|
||
|
Tensor kernel_pred, //
|
||
|
Tensor embed_pred, //
|
||
|
float min_text_confidence, //
|
||
|
float min_kernel_confidence, //
|
||
|
cv::Mat_<float>& text_score, //
|
||
|
cv::Mat_<uint8_t>& text, //
|
||
|
cv::Mat_<uint8_t>& kernel, //
|
||
|
cv::Mat_<int>& label, //
|
||
|
cv::Mat_<float>& embed, //
|
||
|
int& region_num) = 0;
|
||
|
|
||
|
protected:
|
||
|
Stream stream_;
|
||
|
};
|
||
|
|
||
|
} // namespace mmocr
|
||
|
|
||
|
MMDEPLOY_DECLARE_REGISTRY(mmocr::PaHeadImpl);
|
||
|
|
||
|
} // namespace mmdeploy
|
||
|
|
||
|
#endif // MMDEPLOY_CSRC_CODEBASE_MMOCR_PANET_H_
|