From a7acb3cbabeb66ce647684466a04c96b2963c9c9 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Tue, 8 Jan 2019 13:48:44 +0000 Subject: COMPMID-1849: Implement CPPDetectionPostProcessLayer * Add DetectionPostProcessLayer * Add DetectionPostProcessLayer at the graph Change-Id: I7e56f6cffc26f112d26dfe74853085bb8ec7d849 Signed-off-by: Isabella Gottardi Reviewed-on: https://review.mlplatform.org/c/1639 Reviewed-by: Giuseppe Rossini Tested-by: Arm Jenkins --- utils/TypePrinter.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'utils/TypePrinter.h') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 6ba6f45f8c..f51d2368e1 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -2059,6 +2059,43 @@ inline std::string to_string(const DetectionOutputLayerInfo &detection_info) str << detection_info; return str.str(); } +/** Formatted output of the DetectionPostProcessLayerInfo type. + * + * @param[out] os Output stream + * @param[in] detection_info Type to output + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const DetectionPostProcessLayerInfo &detection_info) +{ + os << "{MaxDetections=" << detection_info.max_detections() << "," + << "MaxClassesPerDetection=" << detection_info.max_classes_per_detection() << "," + << "NmsScoreThreshold=" << detection_info.nms_score_threshold() << "," + << "NmsIouThreshold=" << detection_info.iou_threshold() << "," + << "NumClasses=" << detection_info.num_classes() << "," + << "ScaleValue_y=" << detection_info.scale_value_y() << "," + << "ScaleValue_x=" << detection_info.scale_value_x() << "," + << "ScaleValue_h=" << detection_info.scale_value_h() << "," + << "ScaleValue_w=" << detection_info.scale_value_w() << "," + << "UseRegularNms=" << detection_info.use_regular_nms() << "," + << "DetectionPerClass=" << detection_info.detection_per_class() + << "}"; + + return os; +} + +/** Formatted output of the DetectionPostProcessLayerInfo type. + * + * @param[in] detection_info Type to output + * + * @return Formatted string. + */ +inline std::string to_string(const DetectionPostProcessLayerInfo &detection_info) +{ + std::stringstream str; + str << detection_info; + return str.str(); +} /** Formatted output of the DetectionWindow type. * * @param[in] detection_window Type to output -- cgit v1.2.1