Changed example of DLL/SO usage to work faster

This commit is contained in:
AlexeyAB
2017-08-04 20:24:27 +03:00
parent fd671a7a4a
commit 52462f2ba6
3 changed files with 23 additions and 6 deletions

View File

@ -102,6 +102,15 @@ YOLODLL_API Detector::~Detector()
#endif
}
YOLODLL_API int Detector::get_net_width() {
detector_gpu_t &detector_gpu = *reinterpret_cast<detector_gpu_t *>(detector_gpu_ptr.get());
return detector_gpu.net.w;
}
YOLODLL_API int Detector::get_net_height() {
detector_gpu_t &detector_gpu = *reinterpret_cast<detector_gpu_t *>(detector_gpu_ptr.get());
return detector_gpu.net.h;
}
YOLODLL_API std::vector<bbox_t> Detector::detect(std::string image_filename, float thresh)
{