wheel-detector.h 610 B

12345678910111213141516171819202122232425
  1. #ifndef WHELL_DETECTOR__HH___
  2. #define WWHELL_DETECTOR__HH___
  3. #include "yolov8-seg.h"
  4. class TensorrtWheelDetector{
  5. public:
  6. TensorrtWheelDetector(const std::string &model_file, const std::string &class_file);
  7. ~TensorrtWheelDetector();
  8. bool detect(cv::Mat& img,std::vector<Object>& objs);
  9. bool detect(cv::Mat& img,std::vector<Object>& objs,cv::Mat& res);
  10. static std::vector<cv::Point> getPointsFromObj(Object obj);
  11. private:
  12. YOLOv8_seg* yolov8_;
  13. cv::Size imgsz_;
  14. int seg_h_ = 120;
  15. int seg_w_ = 160;
  16. int seg_channels_ = 32;
  17. };
  18. #endif