From 5291935b70c21ddbbc7bbd592f87921cb1f8a2ff Mon Sep 17 00:00:00 2001 From: IlyaOvodov Date: Mon, 4 Jun 2018 18:07:39 +0300 Subject: [PATCH] Net color depth is exposed from Detector class --- src/yolo_v2_class.cpp | 4 ++++ src/yolo_v2_class.hpp | 1 + 2 files changed, 5 insertions(+) diff --git a/src/yolo_v2_class.cpp b/src/yolo_v2_class.cpp index 03d581ad..faaf8d11 100644 --- a/src/yolo_v2_class.cpp +++ b/src/yolo_v2_class.cpp @@ -119,6 +119,10 @@ YOLODLL_API int Detector::get_net_height() const { detector_gpu_t &detector_gpu = *static_cast(detector_gpu_ptr.get()); return detector_gpu.net.h; } +YOLODLL_API int Detector::get_net_color_depth() const { + detector_gpu_t &detector_gpu = *static_cast(detector_gpu_ptr.get()); + return detector_gpu.net.c; +} YOLODLL_API std::vector Detector::detect(std::string image_filename, float thresh, bool use_mean) diff --git a/src/yolo_v2_class.hpp b/src/yolo_v2_class.hpp index 00c2a5b7..fd00dc06 100644 --- a/src/yolo_v2_class.hpp +++ b/src/yolo_v2_class.hpp @@ -57,6 +57,7 @@ public: static YOLODLL_API void free_image(image_t m); YOLODLL_API int get_net_width() const; YOLODLL_API int get_net_height() const; + YOLODLL_API int get_net_color_depth() const; YOLODLL_API std::vector tracking_id(std::vector cur_bbox_vec, bool const change_history = true, int const frames_story = 10, int const max_dist = 150);