leon 1 개월 전
부모
커밋
9d5f1ab135
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      src/infer/opencv/yolov5.cpp

+ 7 - 0
src/infer/opencv/yolov5.cpp

@@ -172,6 +172,13 @@ public:
     }
 };
 
+std::shared_ptr<Infer> load(const std::string &engine_file, YoloType yolo_type, int gpu_id, float confidence_threshold, float nms_threshold)
+{
+    // checkRuntime(cudaSetDevice(gpu_id));
+    return std::shared_ptr<Yolov5InferImpl>((Yolov5InferImpl *)(new Yolov5InferImpl(engine_file, yolo_type, confidence_threshold, nms_threshold)));
+}
+
+
 }
 
 #endif // YOLO_HPP__