Skip to content

Commit 694ea91

Browse files
committed
Fix build.
1 parent a33eb99 commit 694ea91

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

SerialPrograms/Source/ML/Models/ML_YOLOv5Model.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77

88

99
#include <string>
10-
#include <iostream>
10+
//#include <iostream>
1111
#include <opencv2/imgproc.hpp>
1212
#include <opencv2/dnn.hpp>
13+
#include "3rdParty/ONNX/OnnxToolsPA.h"
1314
#include "ML/Models/ML_ONNXRuntimeHelpers.h"
1415
#include "ML_YOLOv5Model.h"
1516

@@ -58,7 +59,7 @@ std::tuple<int, int, double, double> resize_image_with_border(
5859
YOLOv5Session::YOLOv5Session(const std::string& model_path, std::vector<std::string> label_names)
5960
: m_label_names(std::move(label_names))
6061
, m_session_options(create_session_option())
61-
, m_session{m_env, model_path.c_str(), m_session_options}
62+
, m_session{m_env, str_to_onnx_str(model_path).c_str(), m_session_options}
6263
, m_memory_info{Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeCPU)}
6364
, m_input_names{m_session.GetInputNames()}
6465
, m_output_names{m_session.GetOutputNames()}
@@ -178,4 +179,4 @@ void YOLOv5Session::run(const cv::Mat& input_image, std::vector<YOLOv5Session::D
178179

179180

180181
}
181-
}
182+
}

0 commit comments

Comments
 (0)