Затем я изменил эту строку в video_inference.cpp, поскольку буду использовать модель YOLOv11:
Код: Выделить всё
// Uncomment the version
//#define YOLO5 // Uncomment for YOLOv5
//#define YOLO7 // Uncomment for YOLOv7
//#define YOLO8 // Uncomment for YOLOv8
//#define YOLO9 // Uncomment for YOLOv9
//#define YOLO10 // Uncomment for YOLOv10
#define YOLO11 // Uncomment for YOLOv11 box.x, detection->box.y, detection->box.width, detection->box.height);
const cv::Scalar &color = classColors[detection->classId];
cv::rectangle(image, box, color, 2, cv::LINE_AA);
std::string label = classNames[detection->classId] + ": " + std::to_string(static_cast(detection->conf * 100)) + "%";
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79797897/yolo11-c-opencv-onnx-runtime-outputs-a-soup-of-detection-boxes[/url]
Мобильная версия