Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 3bd282a

Browse files
authored
Merge pull request #5 from occ-ai/roy.resolve_crash_on_dml
Refactor code formatting in .clang-format, obs-config-utils.cpp, obs-…
2 parents 33b061f + fb29d97 commit 3bd282a

File tree

12 files changed

+347
-494
lines changed

12 files changed

+347
-494
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ BreakBeforeBraces: Custom
4444
BreakBeforeTernaryOperators: true
4545
BreakConstructorInitializers: BeforeColon
4646
BreakStringLiterals: false # apparently unpredictable
47-
ColumnLimit: 80
47+
ColumnLimit: 100
4848
CompactNamespaces: false
4949
ConstructorInitializerAllOnOneLineOrOnePerLine: true
5050
ConstructorInitializerIndentWidth: 8

src/detect-filter.cpp

Lines changed: 224 additions & 298 deletions
Large diffs are not rendered by default.

src/edgeyolo/coco_names.hpp

Lines changed: 26 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -31,45 +31,32 @@ static const std::vector<std::string> COCO_CLASSES = {
3131
"vase", "scissors", "teddy bear",
3232
"hair drier", "toothbrush"};
3333
const float color_list[80][3] = {
34-
{0.000f, 0.447f, 0.741f}, {0.850f, 0.325f, 0.098f},
35-
{0.929f, 0.694f, 0.125f}, {0.494f, 0.184f, 0.556f},
36-
{0.466f, 0.674f, 0.188f}, {0.301f, 0.745f, 0.933f},
37-
{0.635f, 0.078f, 0.184f}, {0.300f, 0.300f, 0.300f},
38-
{0.600f, 0.600f, 0.600f}, {1.000f, 0.000f, 0.000f},
39-
{1.000f, 0.500f, 0.000f}, {0.749f, 0.749f, 0.000f},
40-
{0.000f, 1.000f, 0.000f}, {0.000f, 0.000f, 1.000f},
41-
{0.667f, 0.000f, 1.000f}, {0.333f, 0.333f, 0.000f},
42-
{0.333f, 0.667f, 0.000f}, {0.333f, 1.000f, 0.000f},
43-
{0.667f, 0.333f, 0.000f}, {0.667f, 0.667f, 0.000f},
44-
{0.667f, 1.000f, 0.000f}, {1.000f, 0.333f, 0.000f},
45-
{1.000f, 0.667f, 0.000f}, {1.000f, 1.000f, 0.000f},
46-
{0.000f, 0.333f, 0.500f}, {0.000f, 0.667f, 0.500f},
47-
{0.000f, 1.000f, 0.500f}, {0.333f, 0.000f, 0.500f},
48-
{0.333f, 0.333f, 0.500f}, {0.333f, 0.667f, 0.500f},
49-
{0.333f, 1.000f, 0.500f}, {0.667f, 0.000f, 0.500f},
50-
{0.667f, 0.333f, 0.500f}, {0.667f, 0.667f, 0.500f},
51-
{0.667f, 1.000f, 0.500f}, {1.000f, 0.000f, 0.500f},
52-
{1.000f, 0.333f, 0.500f}, {1.000f, 0.667f, 0.500f},
53-
{1.000f, 1.000f, 0.500f}, {0.000f, 0.333f, 1.000f},
54-
{0.000f, 0.667f, 1.000f}, {0.000f, 1.000f, 1.000f},
55-
{0.333f, 0.000f, 1.000f}, {0.333f, 0.333f, 1.000f},
56-
{0.333f, 0.667f, 1.000f}, {0.333f, 1.000f, 1.000f},
57-
{0.667f, 0.000f, 1.000f}, {0.667f, 0.333f, 1.000f},
58-
{0.667f, 0.667f, 1.000f}, {0.667f, 1.000f, 1.000f},
59-
{1.000f, 0.000f, 1.000f}, {1.000f, 0.333f, 1.000f},
60-
{1.000f, 0.667f, 1.000f}, {0.333f, 0.000f, 0.000f},
61-
{0.500f, 0.000f, 0.000f}, {0.667f, 0.000f, 0.000f},
62-
{0.833f, 0.000f, 0.000f}, {1.000f, 0.000f, 0.000f},
63-
{0.000f, 0.167f, 0.000f}, {0.000f, 0.333f, 0.000f},
64-
{0.000f, 0.500f, 0.000f}, {0.000f, 0.667f, 0.000f},
65-
{0.000f, 0.833f, 0.000f}, {0.000f, 1.000f, 0.000f},
66-
{0.000f, 0.000f, 0.167f}, {0.000f, 0.000f, 0.333f},
67-
{0.000f, 0.000f, 0.500f}, {0.000f, 0.000f, 0.667f},
68-
{0.000f, 0.000f, 0.833f}, {0.000f, 0.000f, 1.000f},
69-
{0.000f, 0.000f, 0.000f}, {0.143f, 0.143f, 0.143f},
70-
{0.286f, 0.286f, 0.286f}, {0.429f, 0.429f, 0.429f},
71-
{0.571f, 0.571f, 0.571f}, {0.714f, 0.714f, 0.714f},
72-
{0.857f, 0.857f, 0.857f}, {0.000f, 0.447f, 0.741f},
34+
{0.000f, 0.447f, 0.741f}, {0.850f, 0.325f, 0.098f}, {0.929f, 0.694f, 0.125f},
35+
{0.494f, 0.184f, 0.556f}, {0.466f, 0.674f, 0.188f}, {0.301f, 0.745f, 0.933f},
36+
{0.635f, 0.078f, 0.184f}, {0.300f, 0.300f, 0.300f}, {0.600f, 0.600f, 0.600f},
37+
{1.000f, 0.000f, 0.000f}, {1.000f, 0.500f, 0.000f}, {0.749f, 0.749f, 0.000f},
38+
{0.000f, 1.000f, 0.000f}, {0.000f, 0.000f, 1.000f}, {0.667f, 0.000f, 1.000f},
39+
{0.333f, 0.333f, 0.000f}, {0.333f, 0.667f, 0.000f}, {0.333f, 1.000f, 0.000f},
40+
{0.667f, 0.333f, 0.000f}, {0.667f, 0.667f, 0.000f}, {0.667f, 1.000f, 0.000f},
41+
{1.000f, 0.333f, 0.000f}, {1.000f, 0.667f, 0.000f}, {1.000f, 1.000f, 0.000f},
42+
{0.000f, 0.333f, 0.500f}, {0.000f, 0.667f, 0.500f}, {0.000f, 1.000f, 0.500f},
43+
{0.333f, 0.000f, 0.500f}, {0.333f, 0.333f, 0.500f}, {0.333f, 0.667f, 0.500f},
44+
{0.333f, 1.000f, 0.500f}, {0.667f, 0.000f, 0.500f}, {0.667f, 0.333f, 0.500f},
45+
{0.667f, 0.667f, 0.500f}, {0.667f, 1.000f, 0.500f}, {1.000f, 0.000f, 0.500f},
46+
{1.000f, 0.333f, 0.500f}, {1.000f, 0.667f, 0.500f}, {1.000f, 1.000f, 0.500f},
47+
{0.000f, 0.333f, 1.000f}, {0.000f, 0.667f, 1.000f}, {0.000f, 1.000f, 1.000f},
48+
{0.333f, 0.000f, 1.000f}, {0.333f, 0.333f, 1.000f}, {0.333f, 0.667f, 1.000f},
49+
{0.333f, 1.000f, 1.000f}, {0.667f, 0.000f, 1.000f}, {0.667f, 0.333f, 1.000f},
50+
{0.667f, 0.667f, 1.000f}, {0.667f, 1.000f, 1.000f}, {1.000f, 0.000f, 1.000f},
51+
{1.000f, 0.333f, 1.000f}, {1.000f, 0.667f, 1.000f}, {0.333f, 0.000f, 0.000f},
52+
{0.500f, 0.000f, 0.000f}, {0.667f, 0.000f, 0.000f}, {0.833f, 0.000f, 0.000f},
53+
{1.000f, 0.000f, 0.000f}, {0.000f, 0.167f, 0.000f}, {0.000f, 0.333f, 0.000f},
54+
{0.000f, 0.500f, 0.000f}, {0.000f, 0.667f, 0.000f}, {0.000f, 0.833f, 0.000f},
55+
{0.000f, 1.000f, 0.000f}, {0.000f, 0.000f, 0.167f}, {0.000f, 0.000f, 0.333f},
56+
{0.000f, 0.000f, 0.500f}, {0.000f, 0.000f, 0.667f}, {0.000f, 0.000f, 0.833f},
57+
{0.000f, 0.000f, 1.000f}, {0.000f, 0.000f, 0.000f}, {0.143f, 0.143f, 0.143f},
58+
{0.286f, 0.286f, 0.286f}, {0.429f, 0.429f, 0.429f}, {0.571f, 0.571f, 0.571f},
59+
{0.714f, 0.714f, 0.714f}, {0.857f, 0.857f, 0.857f}, {0.000f, 0.447f, 0.741f},
7360
{0.314f, 0.717f, 0.741f}, {0.50f, 0.5f, 0.0f}};
7461
} // namespace edgeyolo_cpp
7562
#endif

src/edgeyolo/core.hpp

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,15 @@ struct GridAndStride {
3333
class AbcEdgeYOLO {
3434
public:
3535
AbcEdgeYOLO() {}
36-
AbcEdgeYOLO(float nms_th = 0.45f, float conf_th = 0.3f,
37-
int num_classes = 80)
36+
AbcEdgeYOLO(float nms_th = 0.45f, float conf_th = 0.3f, int num_classes = 80)
3837
: nms_thresh_(nms_th),
3938
bbox_conf_thresh_(conf_th),
4039
num_classes_(num_classes)
4140
{
4241
}
4342
virtual std::vector<Object> inference(const cv::Mat &frame) = 0;
4443

45-
void setBBoxConfThresh(float thresh)
46-
{
47-
this->bbox_conf_thresh_ = thresh;
48-
}
44+
void setBBoxConfThresh(float thresh) { this->bbox_conf_thresh_ = thresh; }
4945

5046
protected:
5147
int input_w_;
@@ -66,8 +62,7 @@ class AbcEdgeYOLO {
6662
int unpad_h = (int)(r * (float)img.rows);
6763
cv::Mat re(unpad_h, unpad_w, CV_8UC3);
6864
cv::resize(img, re, re.size());
69-
cv::Mat out(input_h_, input_w_, CV_8UC3,
70-
cv::Scalar(114, 114, 114));
65+
cv::Mat out(input_h_, input_w_, CV_8UC3, cv::Scalar(114, 114, 114));
7166
re.copyTo(out(cv::Rect(0, 0, re.cols, re.rows)));
7267
return out;
7368
}
@@ -81,10 +76,8 @@ class AbcEdgeYOLO {
8176
for (size_t c = 0; c < channels; ++c) {
8277
for (size_t h = 0; h < img_h; ++h) {
8378
for (size_t w = 0; w < img_w; ++w) {
84-
blob_data[(int)(c * img_w * img_h +
85-
h * img_w + w)] =
86-
(float)img.ptr<cv::Vec3b>(
87-
(int)h)[(int)w][(int)c];
79+
blob_data[(int)(c * img_w * img_h + h * img_w + w)] =
80+
(float)img.ptr<cv::Vec3b>((int)h)[(int)w][(int)c];
8881
}
8982
}
9083
}
@@ -98,16 +91,13 @@ class AbcEdgeYOLO {
9891
size_t img_w = img.cols;
9992
for (size_t i = 0; i < img_h * img_w; ++i) {
10093
for (size_t c = 0; c < channels; ++c) {
101-
blob_data[i * channels + c] =
102-
(float)img.data[i * channels + c];
94+
blob_data[i * channels + c] = (float)img.data[i * channels + c];
10395
}
10496
}
10597
}
10698

107-
void generate_edgeyolo_proposals(const int num_array,
108-
const float *feat_ptr,
109-
const float prob_threshold,
110-
std::vector<Object> &objects)
99+
void generate_edgeyolo_proposals(const int num_array, const float *feat_ptr,
100+
const float prob_threshold, std::vector<Object> &objects)
111101
{
112102

113103
for (int idx = 0; idx < num_array; ++idx) {
@@ -116,10 +106,8 @@ class AbcEdgeYOLO {
116106
float box_objectness = feat_ptr[basic_pos + 4];
117107
int class_id = 0;
118108
float max_class_score = 0.0;
119-
for (int class_idx = 0; class_idx < num_classes_;
120-
++class_idx) {
121-
float box_cls_score =
122-
feat_ptr[basic_pos + 5 + class_idx];
109+
for (int class_idx = 0; class_idx < num_classes_; ++class_idx) {
110+
float box_cls_score = feat_ptr[basic_pos + 5 + class_idx];
123111
float box_prob = box_objectness * box_cls_score;
124112
if (box_prob > max_class_score) {
125113
class_id = class_idx;
@@ -152,8 +140,7 @@ class AbcEdgeYOLO {
152140
return inter.area();
153141
}
154142

155-
void qsort_descent_inplace(std::vector<Object> &faceobjects, int left,
156-
int right)
143+
void qsort_descent_inplace(std::vector<Object> &faceobjects, int left, int right)
157144
{
158145
int i = left;
159146
int j = right;
@@ -187,8 +174,7 @@ class AbcEdgeYOLO {
187174
qsort_descent_inplace(objects, 0, (int)(objects.size() - 1));
188175
}
189176

190-
void nms_sorted_bboxes(const std::vector<Object> &faceobjects,
191-
std::vector<int> &picked,
177+
void nms_sorted_bboxes(const std::vector<Object> &faceobjects, std::vector<int> &picked,
192178
const float nms_threshold)
193179
{
194180
picked.clear();
@@ -210,8 +196,7 @@ class AbcEdgeYOLO {
210196

211197
// intersection over union
212198
float inter_area = intersection_area(a, b);
213-
float union_area = areas[i] + areas[picked[j]] -
214-
inter_area;
199+
float union_area = areas[i] + areas[picked[j]] - inter_area;
215200
// float IoU = inter_area / union_area
216201
if (inter_area / union_area > nms_threshold)
217202
keep = 0;
@@ -222,15 +207,13 @@ class AbcEdgeYOLO {
222207
}
223208
}
224209

225-
void decode_outputs(const float *prob, const int num_array,
226-
std::vector<Object> &objects,
227-
const float bbox_conf_thresh, const float scale,
228-
const int img_w, const int img_h)
210+
void decode_outputs(const float *prob, const int num_array, std::vector<Object> &objects,
211+
const float bbox_conf_thresh, const float scale, const int img_w,
212+
const int img_h)
229213
{
230214

231215
std::vector<Object> proposals;
232-
generate_edgeyolo_proposals(num_array, prob, bbox_conf_thresh,
233-
proposals);
216+
generate_edgeyolo_proposals(num_array, prob, bbox_conf_thresh, proposals);
234217

235218
qsort_descent_inplace(proposals);
236219

@@ -244,12 +227,11 @@ class AbcEdgeYOLO {
244227
// adjust offset to original unpadded
245228
float x0 = (proposals[picked[i]].rect.x) / scale;
246229
float y0 = (proposals[picked[i]].rect.y) / scale;
247-
float x1 = (proposals[picked[i]].rect.x +
248-
proposals[picked[i]].rect.width) /
249-
scale;
250-
float y1 = (proposals[picked[i]].rect.y +
251-
proposals[picked[i]].rect.height) /
230+
float x1 = (proposals[picked[i]].rect.x + proposals[picked[i]].rect.width) /
252231
scale;
232+
float y1 =
233+
(proposals[picked[i]].rect.y + proposals[picked[i]].rect.height) /
234+
scale;
253235

254236
// clip
255237
x0 = std::max(std::min(x0, (float)(img_w - 1)), 0.f);

src/edgeyolo/edgeyolo_onnxruntime.cpp

Lines changed: 34 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
namespace edgeyolo_cpp {
88

9-
EdgeYOLOONNXRuntime::EdgeYOLOONNXRuntime(
10-
file_name_t path_to_model, int intra_op_num_threads,
11-
int inter_op_num_threads, const std::string &use_gpu_, int device_id,
12-
bool use_parallel, float nms_th, float conf_th, int num_classes)
9+
EdgeYOLOONNXRuntime::EdgeYOLOONNXRuntime(file_name_t path_to_model, int intra_op_num_threads,
10+
int inter_op_num_threads, const std::string &use_gpu_,
11+
int device_id, bool use_parallel, float nms_th,
12+
float conf_th, int num_classes)
1313
: AbcEdgeYOLO(nms_th, conf_th, num_classes),
1414
intra_op_num_threads_(intra_op_num_threads),
1515
inter_op_num_threads_(inter_op_num_threads),
@@ -20,41 +20,32 @@ EdgeYOLOONNXRuntime::EdgeYOLOONNXRuntime(
2020
try {
2121
Ort::SessionOptions session_options;
2222

23-
session_options.SetGraphOptimizationLevel(
24-
GraphOptimizationLevel::ORT_ENABLE_ALL);
23+
session_options.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_ALL);
2524
if (this->use_parallel_) {
26-
session_options.SetExecutionMode(
27-
ExecutionMode::ORT_PARALLEL);
28-
session_options.SetInterOpNumThreads(
29-
this->inter_op_num_threads_);
25+
session_options.SetExecutionMode(ExecutionMode::ORT_PARALLEL);
26+
session_options.SetInterOpNumThreads(this->inter_op_num_threads_);
3027
} else {
31-
session_options.SetExecutionMode(
32-
ExecutionMode::ORT_SEQUENTIAL);
28+
session_options.SetExecutionMode(ExecutionMode::ORT_SEQUENTIAL);
3329
}
34-
session_options.SetIntraOpNumThreads(
35-
this->intra_op_num_threads_);
30+
session_options.SetIntraOpNumThreads(this->intra_op_num_threads_);
3631

3732
#ifdef _WIN32
3833
if (this->use_gpu == "cuda") {
3934
OrtCUDAProviderOptions cuda_option;
4035
cuda_option.device_id = this->device_id_;
41-
session_options.AppendExecutionProvider_CUDA(
42-
cuda_option);
36+
session_options.AppendExecutionProvider_CUDA(cuda_option);
4337
}
4438
if (this->use_gpu == "dml") {
4539
auto &api = Ort::GetApi();
4640
OrtDmlApi *dmlApi = nullptr;
47-
Ort::ThrowOnError(api.GetExecutionProviderApi(
48-
"DML", ORT_API_VERSION,
49-
(const void **)&dmlApi));
50-
Ort::ThrowOnError(
51-
dmlApi->SessionOptionsAppendExecutionProvider_DML(
52-
session_options, 0));
41+
Ort::ThrowOnError(api.GetExecutionProviderApi("DML", ORT_API_VERSION,
42+
(const void **)&dmlApi));
43+
Ort::ThrowOnError(dmlApi->SessionOptionsAppendExecutionProvider_DML(
44+
session_options, 0));
5345
}
5446
#endif
5547

56-
this->session_ = Ort::Session(this->env_, path_to_model.c_str(),
57-
session_options);
48+
this->session_ = Ort::Session(this->env_, path_to_model.c_str(), session_options);
5849
} catch (std::exception &e) {
5950
std::cerr << e.what() << std::endl;
6051
throw e;
@@ -63,31 +54,25 @@ EdgeYOLOONNXRuntime::EdgeYOLOONNXRuntime(
6354
Ort::AllocatorWithDefaultOptions ort_alloc;
6455

6556
// Allocate input memory buffer
66-
this->input_name_ = std::string(
67-
this->session_.GetInputNameAllocated(0, ort_alloc).get());
57+
this->input_name_ = std::string(this->session_.GetInputNameAllocated(0, ort_alloc).get());
6858
auto input_info = this->session_.GetInputTypeInfo(0);
6959
auto input_shape_info = input_info.GetTensorTypeAndShapeInfo();
7060
std::vector<int64_t> input_shape = input_shape_info.GetShape();
71-
ONNXTensorElementDataType input_tensor_type =
72-
input_shape_info.GetElementType();
61+
ONNXTensorElementDataType input_tensor_type = input_shape_info.GetElementType();
7362
this->input_h_ = (int)(input_shape[2]);
7463
this->input_w_ = (int)(input_shape[3]);
7564

76-
size_t input_byte_count =
77-
sizeof(float) * input_shape_info.GetElementCount();
78-
std::unique_ptr<uint8_t[]> input_buffer =
79-
std::make_unique<uint8_t[]>(input_byte_count);
80-
auto input_memory_info = Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator,
81-
OrtMemTypeDefault);
65+
size_t input_byte_count = sizeof(float) * input_shape_info.GetElementCount();
66+
std::unique_ptr<uint8_t[]> input_buffer = std::make_unique<uint8_t[]>(input_byte_count);
67+
auto input_memory_info = Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeDefault);
8268

83-
this->input_tensor_ = Ort::Value::CreateTensor(
84-
input_memory_info, input_buffer.get(), input_byte_count,
85-
input_shape.data(), input_shape.size(), input_tensor_type);
69+
this->input_tensor_ = Ort::Value::CreateTensor(input_memory_info, input_buffer.get(),
70+
input_byte_count, input_shape.data(),
71+
input_shape.size(), input_tensor_type);
8672
this->input_buffer_.emplace_back(std::move(input_buffer));
8773

8874
// Allocate output memory buffer
89-
this->output_name_ = std::string(
90-
this->session_.GetOutputNameAllocated(0, ort_alloc).get());
75+
this->output_name_ = std::string(this->session_.GetOutputNameAllocated(0, ort_alloc).get());
9176

9277
auto output_info = this->session_.GetOutputTypeInfo(0);
9378
auto output_shape_info = output_info.GetTensorTypeAndShapeInfo();
@@ -100,16 +85,13 @@ EdgeYOLOONNXRuntime::EdgeYOLOONNXRuntime(
10085
}
10186
this->num_array_ /= (5 + this->num_classes_);
10287

103-
size_t output_byte_count =
104-
sizeof(float) * output_shape_info.GetElementCount();
105-
std::unique_ptr<uint8_t[]> output_buffer =
106-
std::make_unique<uint8_t[]>(output_byte_count);
107-
auto output_memory_info = Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator,
108-
OrtMemTypeDefault);
88+
size_t output_byte_count = sizeof(float) * output_shape_info.GetElementCount();
89+
std::unique_ptr<uint8_t[]> output_buffer = std::make_unique<uint8_t[]>(output_byte_count);
90+
auto output_memory_info = Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeDefault);
10991

110-
this->output_tensor_ = Ort::Value::CreateTensor(
111-
output_memory_info, output_buffer.get(), output_byte_count,
112-
output_shape.data(), output_shape.size(), output_tensor_type);
92+
this->output_tensor_ = Ort::Value::CreateTensor(output_memory_info, output_buffer.get(),
93+
output_byte_count, output_shape.data(),
94+
output_shape.size(), output_tensor_type);
11395
this->output_buffer_.emplace_back(std::move(output_buffer));
11496
}
11597

@@ -126,17 +108,17 @@ std::vector<Object> EdgeYOLOONNXRuntime::inference(const cv::Mat &frame)
126108

127109
// Inference
128110
Ort::RunOptions run_options;
129-
this->session_.Run(run_options, input_names_, &this->input_tensor_, 1,
130-
output_names_, &this->output_tensor_, 1);
111+
this->session_.Run(run_options, input_names_, &this->input_tensor_, 1, output_names_,
112+
&this->output_tensor_, 1);
131113

132114
float *net_pred = (float *)this->output_buffer_[0].get();
133115

134116
// post process
135117
float scale = std::fminf((float)input_w_ / (float)frame.cols,
136118
(float)input_h_ / (float)frame.rows);
137119
std::vector<Object> objects;
138-
decode_outputs(net_pred, this->num_array_, objects,
139-
this->bbox_conf_thresh_, scale, frame.cols, frame.rows);
120+
decode_outputs(net_pred, this->num_array_, objects, this->bbox_conf_thresh_, scale,
121+
frame.cols, frame.rows);
140122
return objects;
141123
}
142124

src/edgeyolo/edgeyolo_onnxruntime.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ namespace edgeyolo_cpp {
1717
class EdgeYOLOONNXRuntime : public AbcEdgeYOLO {
1818
public:
1919
EdgeYOLOONNXRuntime(file_name_t path_to_model, int intra_op_num_threads,
20-
int inter_op_num_threads = 1,
21-
const std::string &use_gpu_ = "", int device_id = 0,
22-
bool use_parallel = false, float nms_th = 0.45f,
20+
int inter_op_num_threads = 1, const std::string &use_gpu_ = "",
21+
int device_id = 0, bool use_parallel = false, float nms_th = 0.45f,
2322
float conf_th = 0.3f, int num_classes = 80);
2423
std::vector<Object> inference(const cv::Mat &frame) override;
2524

0 commit comments

Comments
 (0)