|
@@ -8,6 +8,7 @@
|
|
#include <exception>
|
|
#include <exception>
|
|
#include <iostream>
|
|
#include <iostream>
|
|
|
|
|
|
|
|
+
|
|
PPYOLOE::PPYOLOE() : ctx(0), model_data(nullptr), model_data_size(0), resize_buf(nullptr) {}
|
|
PPYOLOE::PPYOLOE() : ctx(0), model_data(nullptr), model_data_size(0), resize_buf(nullptr) {}
|
|
|
|
|
|
PPYOLOE::~PPYOLOE()
|
|
PPYOLOE::~PPYOLOE()
|
|
@@ -94,7 +95,7 @@ bool PPYOLOE::initialize(const std::string &model_path)
|
|
/// @param input_image 输入图像的格式为BGR
|
|
/// @param input_image 输入图像的格式为BGR
|
|
/// @param output_image 直接将结果绘制到输出图像
|
|
/// @param output_image 直接将结果绘制到输出图像
|
|
/// @return
|
|
/// @return
|
|
-bool PPYOLOE::infer(int index, unsigned char *input_data, int input_width, int intput_height)
|
|
|
|
|
|
+bool PPYOLOE::infer(int index, unsigned char *input_data, int input_width, int intput_height,DataPackage* result)
|
|
{
|
|
{
|
|
rknn_input inputs[io_num.n_input];
|
|
rknn_input inputs[io_num.n_input];
|
|
rknn_output outputs[io_num.n_output];
|
|
rknn_output outputs[io_num.n_output];
|
|
@@ -133,10 +134,9 @@ bool PPYOLOE::infer(int index, unsigned char *input_data, int input_width, int i
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- object_detect_result_list od_results;
|
|
|
|
- post_process(this, outputs, box_conf_threshold, nms_threshold, &od_results, 1);
|
|
|
|
-
|
|
|
|
|
|
+ post_process(this, outputs, box_conf_threshold, nms_threshold, &result->Result, 1);
|
|
rknn_outputs_release(ctx, io_num.n_output, outputs);
|
|
rknn_outputs_release(ctx, io_num.n_output, outputs);
|
|
|
|
+
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|