From 96a501c08be2b4cbfacf79f374cb254a983f1e67 Mon Sep 17 00:00:00 2001 From: kadi soheib Date: Fri, 3 Jul 2020 21:40:01 +0300 Subject: [PATCH 1/3] Adding comment from source code to documentation. --- modules/dnn/include/opencv2/dnn/all_layers.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/dnn/include/opencv2/dnn/all_layers.hpp b/modules/dnn/include/opencv2/dnn/all_layers.hpp index e1df918037..9418a63ce6 100644 --- a/modules/dnn/include/opencv2/dnn/all_layers.hpp +++ b/modules/dnn/include/opencv2/dnn/all_layers.hpp @@ -598,6 +598,15 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN static Ptr create(const LayerParams& params); }; + /** + * @brief \f$ L_p \f$ - detection output layer. + * + * num() and channels() are 1. + * Since the number of bboxes to be kept is unknown before nms, we manually + * set it to maximal number of detections, [keep_top_k] parameter multiplied by batch size. + * Each row is a 7 dimension std::vector, which stores + * [image_id, label, confidence, xmin, ymin, xmax, ymax] + */ class CV_EXPORTS DetectionOutputLayer : public Layer { public: From 17c430da88f798ec6c6118760bed850d643a841c Mon Sep 17 00:00:00 2001 From: kadi soheib Date: Fri, 3 Jul 2020 22:05:50 +0300 Subject: [PATCH 2/3] Updated comment. --- modules/dnn/include/opencv2/dnn/all_layers.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/dnn/include/opencv2/dnn/all_layers.hpp b/modules/dnn/include/opencv2/dnn/all_layers.hpp index 9418a63ce6..fb211fe46b 100644 --- a/modules/dnn/include/opencv2/dnn/all_layers.hpp +++ b/modules/dnn/include/opencv2/dnn/all_layers.hpp @@ -599,13 +599,11 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN }; /** - * @brief \f$ L_p \f$ - detection output layer. + * @brief detection output layer. * - * num() and channels() are 1. - * Since the number of bboxes to be kept is unknown before nms, we manually - * set it to maximal number of detections, [keep_top_k] parameter multiplied by batch size. - * Each row is a 7 dimension std::vector, which stores - * [image_id, label, confidence, xmin, ymin, xmax, ymax] + * The layer size is: @f$ (1 \times 1 \times N \times 7) @f$ + * where N is the number of detections after nms, and each row is: + * [image_id, label, confidence, xmin, ymin, xmax, ymax] */ class CV_EXPORTS DetectionOutputLayer : public Layer { From 6bed5c181bb9c4b30603306e646b7ba49f6205a0 Mon Sep 17 00:00:00 2001 From: kadi soheib Date: Fri, 31 Jul 2020 23:43:38 +0300 Subject: [PATCH 3/3] Corrected Comment as requested by reviewer. --- modules/dnn/include/opencv2/dnn/all_layers.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/dnn/include/opencv2/dnn/all_layers.hpp b/modules/dnn/include/opencv2/dnn/all_layers.hpp index fb211fe46b..c9455ab528 100644 --- a/modules/dnn/include/opencv2/dnn/all_layers.hpp +++ b/modules/dnn/include/opencv2/dnn/all_layers.hpp @@ -599,11 +599,12 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN }; /** - * @brief detection output layer. + * @brief Detection output layer. * * The layer size is: @f$ (1 \times 1 \times N \times 7) @f$ - * where N is the number of detections after nms, and each row is: + * where N is [keep_top_k] parameter multiplied by batch size. Each row is: * [image_id, label, confidence, xmin, ymin, xmax, ymax] + * where image_id is the index of image input in the batch. */ class CV_EXPORTS DetectionOutputLayer : public Layer {