Skip to content

Commit d84c0e9

Browse files
Update YOLOv5Detector.h
1 parent 4364b49 commit d84c0e9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

detector/YOLOv5/include/YOLOv5Detector.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#include <opencv2/opencv.hpp>
44
#include <opencv2/imgproc.hpp>
5+
#include <fstream>
6+
#include <sstream>
57
class detect_result
68
{
79
public:
@@ -17,12 +19,14 @@ class YOLOv5Detector
1719
public:
1820
void init(std::string onnxpath);
1921
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);
2024
private:
2125

2226
cv::dnn::Net net;
2327

2428
const float confidence_threshold_ =0.25f;
25-
const float nms_threshold_ = 0.45f;
29+
const float nms_threshold_ = 0.4f;
2630

2731
const int model_input_width_ = 640;
2832
const int model_input_height_ = 640;

0 commit comments

Comments
 (0)