This repository has been archived on 2026-02-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tkDNN/include/tkDNN/Yolo3Detection.h
T
Micaela Verucchi 785a3d8dd5 Add GPU version for yolo3detection
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2020-03-23 21:29:29 +01:00

38 lines
753 B
C++

#ifndef Yolo3Detection_H
#define Yolo3Detection_H
#include <opencv2/videoio.hpp>
#include "opencv2/opencv.hpp"
#include "DetectionNN.h"
namespace tk { namespace dnn {
class Yolo3Detection : public DetectionNN
{
private:
int num = 0;
int nMasks = 0;
int nDets = 0;
tk::dnn::Yolo::detection *dets = nullptr;
tk::dnn::Yolo* yolo[3];
tk::dnn::Yolo* getYoloLayer(int n=0);
cv::Mat bgr_h;
public:
Yolo3Detection() {};
~Yolo3Detection() {};
bool init(const std::string& tensor_path, const int n_classes=80);
void preprocess(cv::Mat &frame);
void update(cv::Mat &frame);
void postprocess(dnnType **rt_out, const int n_out);
};
} // namespace dnn
} // namespace tk
#endif /* Yolo3Detection_H*/