Conscience Core
yolov8.h
Go to the documentation of this file.
1 #pragma once
2 #include<iostream>
3 #include<opencv2/opencv.hpp>
4 #include "yolov8_utils.h"
5 using std::string,std::vector;
7 class Yolov8 {
8 public:
9  Yolov8() {
10  }
11  ~Yolov8() {}
12 
13  bool ReadModel(cv::dnn::Net& net, std::string& netPath, bool isCuda);
14  bool Detect(const cv::Mat& srcImg, cv::dnn::Net& net, std::vector<OutputSeg>& output);
15 
16  int _netWidth = 640;
17  int _netHeight = 640;
18 
19 
20  std::vector<std::string> _className = { "person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light",
21  "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow",
22  "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee",
23  "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard",
24  "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple",
25  "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch",
26  "potted plant", "bed", "dining table", "toilet", "tv", "laptop", "mouse", "remote", "keyboard", "cell phone",
27  "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear",
28  "hair drier", "toothbrush" };
29 private:
30  float _classThreshold = 0.50;
31  float _nmsThreshold = 0.32;
32 };
33 }
conscience_core::detector_engine::yolov8::Yolov8::ReadModel
bool ReadModel(cv::dnn::Net &net, std::string &netPath, bool isCuda)
Definition: yolov8.cpp:8
conscience_core::detector_engine::yolov8::Yolov8::Detect
bool Detect(const cv::Mat &srcImg, cv::dnn::Net &net, std::vector< OutputSeg > &output)
Definition: yolov8.cpp:38
yolov8_utils.h
conscience_core::detector_engine::yolov8::Yolov8::_className
std::vector< std::string > _className
Definition: yolov8.h:20
conscience_core::detector_engine::yolov8::Yolov8::_netWidth
int _netWidth
Definition: yolov8.h:16
conscience_core::detector_engine::yolov8
Definition: yolov8.cpp:7
conscience_core::detector_engine::yolov8::Yolov8
Definition: yolov8.h:7
conscience_core::detector_engine::yolov8::Yolov8::_netHeight
int _netHeight
Definition: yolov8.h:17
conscience_core::detector_engine::yolov8::Yolov8::~Yolov8
~Yolov8()
Definition: yolov8.h:11
conscience_core::detector_engine::yolov8::Yolov8::Yolov8
Yolov8()
Definition: yolov8.h:9