We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4364b49 commit d84c0e9Copy full SHA for d84c0e9
detector/YOLOv5/include/YOLOv5Detector.h
@@ -2,6 +2,8 @@
2
3
#include <opencv2/opencv.hpp>
4
#include <opencv2/imgproc.hpp>
5
+#include <fstream>
6
+#include <sstream>
7
class detect_result
8
{
9
public:
@@ -17,12 +19,14 @@ class YOLOv5Detector
17
19
18
20
void init(std::string onnxpath);
21
void detect(cv::Mat & frame, std::vector<detect_result> &result);
22
+ std::vector<std::string> classes_;
23
+ void draw_frame(cv::Mat & frame, std::vector<detect_result> &results);
24
private:
25
26
cv::dnn::Net net;
27
28
const float confidence_threshold_ =0.25f;
- const float nms_threshold_ = 0.45f;
29
+ const float nms_threshold_ = 0.4f;
30
31
const int model_input_width_ = 640;
32
const int model_input_height_ = 640;
0 commit comments