Added detection on images from the txt list file by using SO/DLL.

This commit is contained in:
AlexeyAB
2017-08-05 01:47:58 +03:00
parent 57fa745be8
commit e34f0416f5
3 changed files with 32 additions and 11 deletions

View File

@ -47,8 +47,8 @@ public:
YOLODLL_API Detector(std::string cfg_filename, std::string weight_filename, int gpu_id = 0);
YOLODLL_API ~Detector();
YOLODLL_API std::vector<bbox_t> detect(std::string image_filename, float thresh = 0.2);
YOLODLL_API std::vector<bbox_t> detect(image_t img, float thresh = 0.2);
YOLODLL_API std::vector<bbox_t> detect(std::string image_filename, float thresh = 0.2, bool use_mean = false);
YOLODLL_API std::vector<bbox_t> detect(image_t img, float thresh = 0.2, bool use_mean = false);
static YOLODLL_API image_t load_image(std::string image_filename);
static YOLODLL_API void free_image(image_t m);
YOLODLL_API int get_net_width();
@ -57,7 +57,7 @@ public:
YOLODLL_API std::vector<bbox_t> tracking(std::vector<bbox_t> cur_bbox_vec, int const frames_story = 4);
#ifdef OPENCV
std::vector<bbox_t> detect(cv::Mat mat, float thresh = 0.2)
std::vector<bbox_t> detect(cv::Mat mat, float thresh = 0.2, bool use_mean = false)
{
if(mat.data == NULL)
throw std::runtime_error("file not found");