mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-11-03 02:53:26 +08:00
* [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [YOLOv8] add PaddleYOLOv8 pybind11 (#1144) (#31) * [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [benchmark] add PaddleYOLOv8 -> benchmark * [benchmark] add PaddleYOLOv8 -> benchmark * [Lite] Support PaddleYOLOv8 with Lite Backend * [Pick] Update from latest develop (#32) * [Model] Support Insightface model inferenceing on RKNPU (#1113) * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * Update issues.md * Update fastdeploy_init.sh * 更新交叉编译 * 更新insightface系列模型的rknpu2支持 * 更新insightface系列模型的rknpu2支持 * 更新说明文档 * 更新insightface * 尝试解决pybind问题 Co-authored-by: Jason <928090362@qq.com> Co-authored-by: Jason <jiangjiajun@baidu.com> * [Other] Add Function For Aligning Face With Five Points (#1124) * 更新5点人脸对齐的代码 * 更新代码格式 * 解决comment * update example * 更新注释 Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com> * [Lite] Support PaddleYOLOv8 with Lite Backend (#1145) * [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [YOLOv8] add PaddleYOLOv8 pybind11 (#1144) (#31) * [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [benchmark] add PaddleYOLOv8 -> benchmark * [benchmark] add PaddleYOLOv8 -> benchmark * [Lite] Support PaddleYOLOv8 with Lite Backend Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [Model] Add Silero VAD example (#1107) * add vad example * fix typo * fix typo * rename file * remove model and wav * delete Vad.cc * delete Vad.h * rename and format * fix max and min * update readme * rename var * format * add params * update readme * update readme * Update README.md * Update README_CN.md Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com> Co-authored-by: Zheng-Bicheng <58363586+Zheng-Bicheng@users.noreply.github.com> Co-authored-by: Jason <928090362@qq.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Qianhe Chen <54462604+chenqianhe@users.noreply.github.com> * [YOLOv8] Support PaddleYOLOv8 on Kunlunxin&Ascend * [YOLOv8] Add PaddleYOLOv8 model download links * [YOLOv8] Add PaddleYOLOv8 Box AP Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Zheng-Bicheng <58363586+Zheng-Bicheng@users.noreply.github.com> Co-authored-by: Jason <928090362@qq.com> Co-authored-by: Qianhe Chen <54462604+chenqianhe@users.noreply.github.com>
415 lines
17 KiB
C++
Executable File
415 lines
17 KiB
C++
Executable File
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#pragma once
|
|
#include "fastdeploy/vision/detection/ppdet/base.h"
|
|
|
|
namespace fastdeploy {
|
|
namespace vision {
|
|
namespace detection {
|
|
|
|
class FASTDEPLOY_DECL PicoDet : public PPDetBase {
|
|
public:
|
|
/** \brief Set path of model file and configuration file, and the configuration of runtime
|
|
*
|
|
* \param[in] model_file Path of model file, e.g picodet/model.pdmodel
|
|
* \param[in] params_file Path of parameter file, e.g picodet/model.pdiparams, if the model format is ONNX, this parameter will be ignored
|
|
* \param[in] config_file Path of configuration file for deployment, e.g picodet/infer_cfg.yml
|
|
* \param[in] custom_option RuntimeOption for inference, the default will use cpu, and choose the backend defined in `valid_cpu_backends`
|
|
* \param[in] model_format Model format of the loaded model, default is Paddle format
|
|
*/
|
|
PicoDet(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::OPENVINO, Backend::ORT,
|
|
Backend::PDINFER, Backend::LITE};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
valid_rknpu_backends = {Backend::RKNPU2};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
valid_ascend_backends = {Backend::LITE};
|
|
valid_sophgonpu_backends = {Backend::SOPHGOTPU};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PicoDet"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL PPYOLOE : public PPDetBase {
|
|
public:
|
|
/** \brief Set path of model file and configuration file, and the configuration of runtime
|
|
*
|
|
* \param[in] model_file Path of model file, e.g ppyoloe/model.pdmodel
|
|
* \param[in] params_file Path of parameter file, e.g picodet/model.pdiparams, if the model format is ONNX, this parameter will be ignored
|
|
* \param[in] config_file Path of configuration file for deployment, e.g picodet/infer_cfg.yml
|
|
* \param[in] custom_option RuntimeOption for inference, the default will use cpu, and choose the backend defined in `valid_cpu_backends`
|
|
* \param[in] model_format Model format of the loaded model, default is Paddle format
|
|
*/
|
|
PPYOLOE(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::OPENVINO, Backend::ORT,
|
|
Backend::PDINFER, Backend::LITE};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
valid_timvx_backends = {Backend::LITE};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
valid_rknpu_backends = {Backend::RKNPU2};
|
|
valid_ascend_backends = {Backend::LITE};
|
|
valid_sophgonpu_backends = {Backend::SOPHGOTPU};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PPYOLOE"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL PPYOLO : public PPDetBase {
|
|
public:
|
|
/** \brief Set path of model file and configuration file, and the configuration of runtime
|
|
*
|
|
* \param[in] model_file Path of model file, e.g ppyolo/model.pdmodel
|
|
* \param[in] params_file Path of parameter file, e.g ppyolo/model.pdiparams, if the model format is ONNX, this parameter will be ignored
|
|
* \param[in] config_file Path of configuration file for deployment, e.g picodet/infer_cfg.yml
|
|
* \param[in] custom_option RuntimeOption for inference, the default will use cpu, and choose the backend defined in `valid_cpu_backends`
|
|
* \param[in] model_format Model format of the loaded model, default is Paddle format
|
|
*/
|
|
PPYOLO(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER, Backend::LITE};
|
|
valid_gpu_backends = {Backend::PDINFER};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
valid_ascend_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/PP-YOLO"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL YOLOv3 : public PPDetBase {
|
|
public:
|
|
YOLOv3(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::OPENVINO, Backend::ORT, Backend::PDINFER,
|
|
Backend::LITE};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
valid_ascend_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/YOLOv3"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL PaddleYOLOX : public PPDetBase {
|
|
public:
|
|
PaddleYOLOX(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::OPENVINO, Backend::ORT, Backend::PDINFER,
|
|
Backend::LITE};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
valid_ascend_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/YOLOX"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL FasterRCNN : public PPDetBase {
|
|
public:
|
|
FasterRCNN(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER, Backend::LITE};
|
|
valid_gpu_backends = {Backend::PDINFER};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/FasterRCNN"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL MaskRCNN : public PPDetBase {
|
|
public:
|
|
MaskRCNN(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER, Backend::LITE};
|
|
valid_gpu_backends = {Backend::PDINFER};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/MaskRCNN"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL SSD : public PPDetBase {
|
|
public:
|
|
SSD(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER, Backend::LITE};
|
|
valid_gpu_backends = {Backend::PDINFER};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
valid_ascend_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/SSD"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL PaddleYOLOv5 : public PPDetBase {
|
|
public:
|
|
PaddleYOLOv5(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::ORT, Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/YOLOv5"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL PaddleYOLOv6 : public PPDetBase {
|
|
public:
|
|
PaddleYOLOv6(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::OPENVINO, Backend::ORT, Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/YOLOv6"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL PaddleYOLOv7 : public PPDetBase {
|
|
public:
|
|
PaddleYOLOv7(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::ORT, Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/YOLOv7"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL PaddleYOLOv8 : public PPDetBase {
|
|
public:
|
|
PaddleYOLOv8(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::OPENVINO, Backend::ORT, Backend::PDINFER, Backend::LITE};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
valid_ascend_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/YOLOv8"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL RTMDet : public PPDetBase {
|
|
public:
|
|
RTMDet(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::OPENVINO, Backend::ORT, Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
valid_kunlunxin_backends = {Backend::LITE};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/RTMDet"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL CascadeRCNN : public PPDetBase {
|
|
public:
|
|
CascadeRCNN(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::PDINFER};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const {
|
|
return "PaddleDetection/CascadeRCNN"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL PSSDet : public PPDetBase {
|
|
public:
|
|
PSSDet(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::PDINFER};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/PSSDet"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL RetinaNet : public PPDetBase {
|
|
public:
|
|
RetinaNet(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::PDINFER};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/RetinaNet"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL PPYOLOESOD : public PPDetBase {
|
|
public:
|
|
PPYOLOESOD(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::ORT, Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/PPYOLOESOD"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL FCOS : public PPDetBase {
|
|
public:
|
|
FCOS(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/FCOS"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL TTFNet : public PPDetBase {
|
|
public:
|
|
TTFNet(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::PDINFER};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/TTFNet"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL TOOD : public PPDetBase {
|
|
public:
|
|
TOOD(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::PDINFER};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/TOOD"; }
|
|
};
|
|
|
|
class FASTDEPLOY_DECL GFL : public PPDetBase {
|
|
public:
|
|
GFL(const std::string& model_file, const std::string& params_file,
|
|
const std::string& config_file,
|
|
const RuntimeOption& custom_option = RuntimeOption(),
|
|
const ModelFormat& model_format = ModelFormat::PADDLE)
|
|
: PPDetBase(model_file, params_file, config_file, custom_option,
|
|
model_format) {
|
|
valid_cpu_backends = {Backend::ORT, Backend::PDINFER};
|
|
valid_gpu_backends = {Backend::ORT, Backend::PDINFER};
|
|
initialized = Initialize();
|
|
}
|
|
|
|
virtual std::string ModelName() const { return "PaddleDetection/GFL"; }
|
|
};
|
|
|
|
} // namespace detection
|
|
} // namespace vision
|
|
} // namespace fastdeploy
|