From cd96a26f67bfbb9b0efe6e0e2b229d0b46b4e3e6 Mon Sep 17 00:00:00 2001 From: giuros01 Date: Wed, 3 Oct 2018 12:44:35 +0100 Subject: COMPMID-1329: Add support for GenerateProposals operator in CL Change-Id: Ib0798cc17496b7817f5b5769b25d98913a33a69d --- utils/TypePrinter.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index df16cba9b5..58162000a6 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -261,6 +261,58 @@ inline std::string to_string(const BoundingBoxTransformInfo &bbox_info) return str.str(); } +/** Formatted output of the ComputeAnchorsInfo type. + * + * @param[out] os Output stream. + * @param[in] anchors_info Type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const ComputeAnchorsInfo &anchors_info) +{ + os << "(" << anchors_info.feat_width() << "x" << anchors_info.feat_height() << ")~" << anchors_info.spatial_scale(); + return os; +} + +/** Formatted output of the ComputeAnchorsInfo type. + * + * @param[in] anchors_info Type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const ComputeAnchorsInfo &anchors_info) +{ + std::stringstream str; + str << anchors_info; + return str.str(); +} + +/** Formatted output of the GenerateProposalsInfo type. + * + * @param[out] os Output stream. + * @param[in] proposals_info Type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const GenerateProposalsInfo &proposals_info) +{ + os << "(" << proposals_info.im_width() << "x" << proposals_info.im_height() << ")~" << proposals_info.im_scale(); + return os; +} + +/** Formatted output of the GenerateProposalsInfo type. + * + * @param[in] proposals_info Type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const GenerateProposalsInfo &proposals_info) +{ + std::stringstream str; + str << proposals_info; + return str.str(); +} + /** Formatted output of the QuantizationInfo type. * * @param[out] os Output stream. -- cgit v1.2.1