mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-24 22:54:21 +08:00
Update inference.cpp (bug) (#7279)
This commit is contained in:
parent
ef6342f64a
commit
e687c09423
@ -127,7 +127,7 @@ char* YOLO_V8::CreateSession(DL_INIT_PARAM& iParams) {
|
|||||||
wide_cstr[ModelPathSize] = L'\0';
|
wide_cstr[ModelPathSize] = L'\0';
|
||||||
const wchar_t* modelPath = wide_cstr;
|
const wchar_t* modelPath = wide_cstr;
|
||||||
#else
|
#else
|
||||||
const char* modelPath = iParams.ModelPath.c_str();
|
const char* modelPath = iParams.modelPath.c_str();
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
session = new Ort::Session(env, modelPath, sessionOption);
|
session = new Ort::Session(env, modelPath, sessionOption);
|
||||||
@ -215,7 +215,7 @@ char* YOLO_V8::TensorProcess(clock_t& starttime_1, cv::Mat& iImg, N& blob, std::
|
|||||||
auto tensor_info = typeInfo.GetTensorTypeAndShapeInfo();
|
auto tensor_info = typeInfo.GetTensorTypeAndShapeInfo();
|
||||||
std::vector<int64_t> outputNodeDims = tensor_info.GetShape();
|
std::vector<int64_t> outputNodeDims = tensor_info.GetShape();
|
||||||
auto output = outputTensor.front().GetTensorMutableData<typename std::remove_pointer<N>::type>();
|
auto output = outputTensor.front().GetTensorMutableData<typename std::remove_pointer<N>::type>();
|
||||||
delete blob;
|
delete[] blob;
|
||||||
switch (modelType)
|
switch (modelType)
|
||||||
{
|
{
|
||||||
case YOLO_DETECT_V8:
|
case YOLO_DETECT_V8:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user