#pragma once #include "base_model.h" #include #include #include #include namespace trt_vehicle{ class DetectModel: public BaseModel{ public: DetectModel(const std::string& modelPath,float scoreThres,float iouThres); ~DetectModel(); //inferential prediction of the picture after pad int predictPadding(std::vector imgs,std::vector>& outBoxes, int paddingValue); private: int predict(std::vector imgs,std::vector>& outBoxes); int setSize(); int extractFeature(std::vector imgs); private: int m_outputNum; int m_classNum; int m_boxNum; float m_scoreThres; float m_iouThres; float m_ratioH; float m_ratioW; std::vector m_hStarts; std::vector m_wStarts; float* m_scoreCuda; float* m_boxCuda; float* m_score; float* m_box; float* m_imageDataCuda; CudaPredictor m_predictor; }; }