#include #include #include #include #include #include int main() { // 创建YOLOV3检测器 migraphxSamples::DetectorYOLOV3 detector; migraphxSamples::InitializationParameterOfDetector initParamOfDetectorYOLOV3; initParamOfDetectorYOLOV3.configFilePath = CONFIG_FILE; migraphxSamples::ErrorCode errorCode=detector.Initialize(initParamOfDetectorYOLOV3); if(errorCode!=migraphxSamples::SUCCESS) { LOG_ERROR(stdout, "fail to initialize detector!\n"); exit(-1); } LOG_INFO(stdout, "succeed to initialize detector\n"); // 读取测试图片 cv::Mat srcImage=cv::imread("../Resource/Images/dog.jpg",1); // 推理 std::vector predictions; detector.Detect(srcImage,predictions); // 获取推理结果 LOG_INFO(stdout,"========== Detection Results ==========\n"); for(int i=0;i