aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2018-11-16 11:26:52 +0000
committerIsabella Gottardi <isabella.gottardi@arm.com>2018-12-06 11:28:56 +0000
commit05e5644715c678773abaf180222a33959ee0dadb (patch)
tree6e85d2808714acd6aa475af15fcbef136be5edeb /utils
parent77e6c558963abfd36a632f6fe3235921f71a7a77 (diff)
downloadComputeLibrary-05e5644715c678773abaf180222a33959ee0dadb.tar.gz
COMPMID-1463: SSD support: Create Detection layer
Change-Id: I8b59b9b94cbd132e1ff5157a4c59882719e12e3b Reviewed-on: https://review.mlplatform.org/327 Reviewed-by: Anthony Barbier <Anthony.barbier@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 6850ea018a..496e49beb1 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -1901,6 +1901,85 @@ inline ::std::ostream &operator<<(::std::ostream &os, const DetectionWindow &det
return os;
}
+/** Formatted output of the DetectionOutputLayerCodeType type.
+ *
+ * @param[out] os Output stream
+ * @param[in] detection_code Type to output
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const DetectionOutputLayerCodeType &detection_code)
+{
+ switch(detection_code)
+ {
+ case DetectionOutputLayerCodeType::CENTER_SIZE:
+ os << "CENTER_SIZE";
+ break;
+ case DetectionOutputLayerCodeType::CORNER:
+ os << "CORNER";
+ break;
+ case DetectionOutputLayerCodeType::CORNER_SIZE:
+ os << "CORNER_SIZE";
+ break;
+ case DetectionOutputLayerCodeType::TF_CENTER:
+ os << "TF_CENTER";
+ break;
+ default:
+ ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
+ }
+
+ return os;
+}
+/** Formatted output of the DetectionOutputLayerCodeType type.
+ *
+ * @param[in] detection_code Type to output
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const DetectionOutputLayerCodeType &detection_code)
+{
+ std::stringstream str;
+ str << detection_code;
+ return str.str();
+}
+
+/** Formatted output of the DetectionOutputLayerInfo 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 DetectionOutputLayerInfo &detection_info)
+{
+ os << "{Classes=" << detection_info.num_classes() << ","
+ << "ShareLocation=" << detection_info.share_location() << ","
+ << "CodeType=" << detection_info.code_type() << ","
+ << "VarianceEncodedInTarget=" << detection_info.variance_encoded_in_target() << ","
+ << "KeepTopK=" << detection_info.keep_top_k() << ","
+ << "NMSThreshold=" << detection_info.nms_threshold() << ","
+ << "Eta=" << detection_info.eta() << ","
+ << "BackgroundLabelId=" << detection_info.background_label_id() << ","
+ << "ConfidenceThreshold=" << detection_info.confidence_threshold() << ","
+ << "TopK=" << detection_info.top_k() << ","
+ << "NumLocClasses=" << detection_info.num_loc_classes()
+ << "}";
+
+ return os;
+}
+
+/** Formatted output of the DetectionOutputLayerInfo type.
+ *
+ * @param[in] detection_info Type to output
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const DetectionOutputLayerInfo &detection_info)
+{
+ std::stringstream str;
+ str << detection_info;
+ return str.str();
+}
/** Formatted output of the DetectionWindow type.
*
* @param[in] detection_window Type to output