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 --- tests/validation/reference/BoundingBoxTransform.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/validation/reference/BoundingBoxTransform.cpp') diff --git a/tests/validation/reference/BoundingBoxTransform.cpp b/tests/validation/reference/BoundingBoxTransform.cpp index 6ac512e749..9918ff68c5 100644 --- a/tests/validation/reference/BoundingBoxTransform.cpp +++ b/tests/validation/reference/BoundingBoxTransform.cpp @@ -84,10 +84,10 @@ SimpleTensor bounding_box_transform(const SimpleTensor &boxes, const Simpl const T pred_h = T(std::exp(dh)) * height; // Store the prediction into the output tensor - pred_boxes_ptr[start_delta] = scale * utility::clamp(pred_ctr_x - T(0.5) * pred_w, T(0), T(img_w)); - pred_boxes_ptr[start_delta + 1] = scale * utility::clamp(pred_ctr_y - T(0.5) * pred_h, T(0), T(img_h)); - pred_boxes_ptr[start_delta + 2] = scale * utility::clamp(pred_ctr_x + T(0.5) * pred_w, T(0), T(img_w)); - pred_boxes_ptr[start_delta + 3] = scale * utility::clamp(pred_ctr_y + T(0.5) * pred_h, T(0), T(img_h)); + pred_boxes_ptr[start_delta] = scale * utility::clamp(pred_ctr_x - T(0.5) * pred_w, T(0), T(img_w - 1)); + pred_boxes_ptr[start_delta + 1] = scale * utility::clamp(pred_ctr_y - T(0.5) * pred_h, T(0), T(img_h - 1)); + pred_boxes_ptr[start_delta + 2] = scale * utility::clamp(pred_ctr_x + T(0.5) * pred_w, T(0), T(img_w - 1)); + pred_boxes_ptr[start_delta + 3] = scale * utility::clamp(pred_ctr_y + T(0.5) * pred_h, T(0), T(img_h - 1)); } } return pred_boxes; -- cgit v1.2.1