aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/frontend
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2018-11-27 08:51:10 +0000
committerIsabella Gottardi <isabella.gottardi@arm.com>2018-12-13 11:21:59 +0000
commit7234ed8c3d07c76963eb3bce9530994421ad7e67 (patch)
tree6834d5fc3cc23eb47bcfad3a4191d91c87c8f9e0 /arm_compute/graph/frontend
parent0e7210de821a7d1164017b8b9e11b53805185b25 (diff)
downloadComputeLibrary-7234ed8c3d07c76963eb3bce9530994421ad7e67.tar.gz
COMPMID-1808: Add Detection Output Layer to the GraphAPI
COMPMID-1710: Integrate Detection ouput in MobilenetSSD graph example Change-Id: I384d1eb492ef14ece58f2023ad7bbc16f834450b Reviewed-on: https://review.mlplatform.org/356 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Marquez <pablo.tello@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/graph/frontend')
-rw-r--r--arm_compute/graph/frontend/Layers.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/arm_compute/graph/frontend/Layers.h b/arm_compute/graph/frontend/Layers.h
index d0703317cd..72353a2bbd 100644
--- a/arm_compute/graph/frontend/Layers.h
+++ b/arm_compute/graph/frontend/Layers.h
@@ -458,7 +458,35 @@ private:
int _depth_multiplier;
const QuantizationInfo _quant_info;
};
+/** DetectionOutput Layer */
+class DetectionOutputLayer final : public ILayer
+{
+public:
+ /** Construct a detection output layer.
+ *
+ * @param[in] sub_stream_conf Confidence graph sub-stream.
+ * @param[in] sub_stream_prior PriorBox graph sub-stream.
+ * @param[in] detect_info DetectionOutput parameters.
+ */
+ DetectionOutputLayer(SubStream &&sub_stream_conf, SubStream &&sub_stream_prior, DetectionOutputLayerInfo detect_info)
+ : _ss_conf(std::move(sub_stream_conf)), _ss_prior(std::move(sub_stream_prior)), _detect_info(detect_info)
+ {
+ }
+ NodeID create_layer(IStream &s) override
+ {
+ NodeParams common_params = { name(), s.hints().target_hint };
+ NodeIdxPair input_loc = { s.tail_node(), 0 };
+ NodeIdxPair input_conf = { _ss_conf.tail_node(), 0 };
+ NodeIdxPair input_priorbox = { _ss_prior.tail_node(), 0 };
+ return GraphBuilder::add_detection_output_node(s.graph(), common_params, input_loc, input_conf, input_priorbox, _detect_info);
+ }
+
+private:
+ SubStream _ss_conf;
+ SubStream _ss_prior;
+ DetectionOutputLayerInfo _detect_info;
+};
/** Dummy Layer */
class DummyLayer final : public ILayer
{