|
|
@ -106,6 +106,7 @@ bool YOLO_V8::InitParam(DL_INIT_PARAM& iParams)
|
|
|
|
cudaEnable = iParams.cudaEnable;
|
|
|
|
cudaEnable = iParams.cudaEnable;
|
|
|
|
intraOpNumThreads = iParams.intraOpNumThreads;
|
|
|
|
intraOpNumThreads = iParams.intraOpNumThreads;
|
|
|
|
logSeverityLevel = iParams.logSeverityLevel;
|
|
|
|
logSeverityLevel = iParams.logSeverityLevel;
|
|
|
|
|
|
|
|
classes = { "jd" };
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -224,7 +225,7 @@ char* YOLO_V8::RunSession(cv::Mat& in, cv::Mat& out, std::vector<std::pair<int,
|
|
|
|
|
|
|
|
|
|
|
|
float confidence = floor(100 * re.confidence) / 100;
|
|
|
|
float confidence = floor(100 * re.confidence) / 100;
|
|
|
|
std::cout << std::fixed << std::setprecision(2);
|
|
|
|
std::cout << std::fixed << std::setprecision(2);
|
|
|
|
std::string label = std::string("jd") + std::string(" ") +
|
|
|
|
std::string label = classes[re.classId] + std::string(" ") +
|
|
|
|
std::to_string(confidence).substr(0, std::to_string(confidence).size() - 4);
|
|
|
|
std::to_string(confidence).substr(0, std::to_string(confidence).size() - 4);
|
|
|
|
|
|
|
|
|
|
|
|
cv::rectangle(
|
|
|
|
cv::rectangle(
|
|
|
|