From 6a5e5e8b7e56f927d70ced3203d6e16df3fdd189 Mon Sep 17 00:00:00 2001 From: Derek Lamberti Date: Thu, 5 Dec 2019 14:41:20 +0000 Subject: IVGCVSW-4227 Add CpuAcc backend support for DetectionPostProcess Change-Id: I318bf92b8d1db593d9c30b9b4412bfecbe65bc12 Signed-off-by: Derek Lamberti --- src/backends/backendsCommon/WorkloadFactory.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/backends/backendsCommon/WorkloadFactory.cpp') diff --git a/src/backends/backendsCommon/WorkloadFactory.cpp b/src/backends/backendsCommon/WorkloadFactory.cpp index 1d4ed7e159..805ec7ba5f 100644 --- a/src/backends/backendsCommon/WorkloadFactory.cpp +++ b/src/backends/backendsCommon/WorkloadFactory.cpp @@ -272,12 +272,24 @@ bool IWorkloadFactory::IsLayerSupported(const BackendId& backendId, } case LayerType::DetectionPostProcess: { - const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo(); - const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo(); auto cLayer = boost::polymorphic_downcast(&layer); + const TensorInfo& boxEncodings = layer.GetInputSlot(0).GetConnection()->GetTensorInfo(); + const TensorInfo& scores = layer.GetInputSlot(1).GetConnection()->GetTensorInfo(); + const TensorInfo& anchors = cLayer->m_Anchors->GetTensorInfo(); + + const TensorInfo& detectionBoxes = layer.GetOutputSlot(0).GetTensorInfo(); + const TensorInfo& detectionClasses = layer.GetOutputSlot(1).GetTensorInfo(); + const TensorInfo& detectionScores = layer.GetOutputSlot(2).GetTensorInfo(); + const TensorInfo& numDetections = layer.GetOutputSlot(3).GetTensorInfo(); + const DetectionPostProcessDescriptor& descriptor = cLayer->GetParameters(); - result = layerSupportObject->IsDetectionPostProcessSupported(input0, - input1, + result = layerSupportObject->IsDetectionPostProcessSupported(boxEncodings, + scores, + anchors, + detectionBoxes, + detectionClasses, + detectionScores, + numDetections, descriptor, reason); break; -- cgit v1.2.1