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>
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 6850ea0..496e49b 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -1901,6 +1901,85 @@
     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