mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
Add paddlelite backend support (#260)
* Add paddlelite backend support * Update CMakeLists.txt * Update __init__.py
This commit is contained in:
@@ -24,7 +24,7 @@ PicoDet::PicoDet(const std::string& model_file, const std::string& params_file,
|
||||
const RuntimeOption& custom_option,
|
||||
const Frontend& model_format) {
|
||||
config_file_ = config_file;
|
||||
valid_cpu_backends = {Backend::PDINFER, Backend::ORT};
|
||||
valid_cpu_backends = {Backend::PDINFER, Backend::ORT, Backend::LITE};
|
||||
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
||||
runtime_option = custom_option;
|
||||
runtime_option.model_format = model_format;
|
||||
|
@@ -24,6 +24,7 @@ PPYOLOE::PPYOLOE(const std::string& model_file, const std::string& params_file,
|
||||
}
|
||||
|
||||
void PPYOLOE::GetNmsInfo() {
|
||||
#ifdef ENABLE_PADDLE_FRONTEND
|
||||
if (runtime_option.model_format == Frontend::PADDLE) {
|
||||
std::string contents;
|
||||
if (!ReadBinaryFromFile(runtime_option.model_file, &contents)) {
|
||||
@@ -41,6 +42,7 @@ void PPYOLOE::GetNmsInfo() {
|
||||
normalized = reader.nms_params.normalized;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool PPYOLOE::Initialize() {
|
||||
|
@@ -56,13 +56,13 @@ class FASTDEPLOY_DECL PPYOLOE : public FastDeployModel {
|
||||
float score_threshold = 0.01;
|
||||
int64_t nms_top_k = 10000;
|
||||
bool normalized = true;
|
||||
bool has_nms_ = false;
|
||||
bool has_nms_ = true;
|
||||
|
||||
// This function will used to check if this model contains multiclass_nms
|
||||
// and get parameters from the operator
|
||||
void GetNmsInfo();
|
||||
};
|
||||
|
||||
} // namespace detection
|
||||
} // namespace detection
|
||||
} // namespace vision
|
||||
} // namespace fastdeploy
|
||||
|
Reference in New Issue
Block a user