mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
* add SDK support for PANet * fix panet * fix panet * simplify panet * add PSENet support * fix-psenet * add CUDA post-processing for DBNet * fix dbnet * fix dbnet * add cpu support for PANet * fix panet * add CUDA support for PANet * fix panet * format * add cpu impls for PSENet * fix psenet * add cuda impl for PSENet * fix psenet * add param parsing * simplify impls * simplify impls * clean-up * fix lint * fix cuda-10 build * fix cuda-10 build
42 lines
996 B
C++
42 lines
996 B
C++
// Copyright (c) OpenMMLab. All rights reserved.
|
|
|
|
#ifndef MMDEPLOY_CSRC_CODEBASE_MMOCR_CUDA_UTILS_H_
|
|
#define MMDEPLOY_CSRC_CODEBASE_MMOCR_CUDA_UTILS_H_
|
|
|
|
#include <cstdint>
|
|
|
|
#include "cuda_runtime.h"
|
|
|
|
namespace mmdeploy {
|
|
|
|
namespace mmocr {
|
|
|
|
namespace panet {
|
|
|
|
void ProcessMasks(const float* d_text_pred, const float* d_kernel_pred, float text_thr,
|
|
float kernel_thr, int n, uint8_t* d_text_mask, uint8_t* d_kernel_mask,
|
|
float* d_text_score, cudaStream_t stream);
|
|
|
|
void Transpose(const float* d_input, int h, int w, float* d_output, cudaStream_t stream);
|
|
|
|
} // namespace panet
|
|
|
|
namespace dbnet {
|
|
|
|
void Threshold(const float* d_score, int n, float thr, uint8_t* d_mask, cudaStream_t stream);
|
|
|
|
}
|
|
|
|
namespace psenet {
|
|
|
|
void ProcessMasks(const float* d_preds, int c, int n, float thr, uint8_t* d_masks, float* d_score,
|
|
cudaStream_t stream);
|
|
|
|
}
|
|
|
|
} // namespace mmocr
|
|
|
|
} // namespace mmdeploy
|
|
|
|
#endif // MMDEPLOY_CSRC_CODEBASE_MMOCR_CUDA_UTILS_H_
|