16 #include "fastdeploy/vision/detection/contrib/rknpu2/rkyolo.h" 21 class FASTDEPLOY_DECL RKYOLOV5 :
public RKYOLO {
31 RKYOLOV5(
const std::string& model_file,
32 const RuntimeOption& custom_option = RuntimeOption(),
34 : RKYOLO(model_file, custom_option, model_format) {
35 valid_cpu_backends = {};
36 valid_gpu_backends = {};
38 std::vector<int> anchors = {10, 13, 16, 30, 33, 23, 30, 61, 62,
39 45, 59, 119, 116, 90, 156, 198, 373, 326};
40 int anchor_per_branch_ = 3;
41 GetPostprocessor().SetAnchor(anchors, anchor_per_branch_);
44 virtual std::string ModelName()
const {
return "RKYOLOV5"; }
47 class FASTDEPLOY_DECL RKYOLOV7 :
public RKYOLO {
57 RKYOLOV7(
const std::string& model_file,
58 const RuntimeOption& custom_option = RuntimeOption(),
60 : RKYOLO(model_file, custom_option, model_format) {
61 valid_cpu_backends = {};
62 valid_gpu_backends = {};
64 std::vector<int> anchors = {12, 16, 19, 36, 40, 28, 36, 75, 76,
65 55, 72, 146, 142, 110, 192, 243, 459, 401};
66 int anchor_per_branch_ = 3;
67 GetPostprocessor().SetAnchor(anchors, anchor_per_branch_);
70 virtual std::string ModelName()
const {
return "RKYOLOV7"; }
73 class FASTDEPLOY_DECL RKYOLOX :
public RKYOLO {
83 RKYOLOX(
const std::string& model_file,
84 const RuntimeOption& custom_option = RuntimeOption(),
86 : RKYOLO(model_file, custom_option, model_format) {
87 valid_cpu_backends = {};
88 valid_gpu_backends = {};
90 std::vector<int> anchors = {10, 13, 16, 30, 33, 23, 30, 61, 62,
91 45, 59, 119, 116, 90, 156, 198, 373, 326};
92 int anchor_per_branch_ = 1;
93 GetPostprocessor().SetAnchor(anchors, anchor_per_branch_);
96 virtual std::string ModelName()
const {
return "RKYOLOV7"; }
ModelFormat
Definition: enum_variables.h:67
RKNPU2, support RKNN format model, Rockchip NPU only.
Definition: enum_variables.h:39
Model with RKNN format.
Definition: enum_variables.h:71
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16