aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Types.h
diff options
context:
space:
mode:
authorgiuros01 <giuseppe.rossini@arm.com>2018-10-03 12:44:35 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:55:45 +0000
commitc04a0e8f93c620d05444251e1ae55dcf8c660a1b (patch)
treebdab0d171ea2d0439ea0c0405e8a1a3c9c27bf7c /arm_compute/core/Types.h
parent08346e9b9a7dadd2f0765aea64e656902d843e8a (diff)
downloadComputeLibrary-c04a0e8f93c620d05444251e1ae55dcf8c660a1b.tar.gz
COMPMID-1327: Add support for BBoxTransform operator in CL
Change-Id: I91865506166951b3bf7f06a0b2d4cde925cfefb6 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/153447 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'arm_compute/core/Types.h')
-rw-r--r--arm_compute/core/Types.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 8a8cd509fa..5e04bcd0f4 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -851,6 +851,64 @@ private:
unsigned int _sampling_ratio;
};
+/** Bounding Box Transform information class */
+class BoundingBoxTransformInfo
+{
+public:
+ /** Constructor
+ *
+ * @param[in] img_width Width of the original image
+ * @param[in] img_height Height, of the original image
+ * @param[in] scale Scale of the original image
+ * @param[in] apply_scale (Optional)Re-apply scaling after transforming the boxes. Defaults to false
+ * @param[in] weights (Optional)Weights [wx, wy, ww, wh] for the deltas. Defaults to all ones
+ * @param[in] bbox_xform_clip (Optional)Minimum bounding box width and height after bounding box transformation in log-space. Defaults to log(1000/16)
+ */
+ BoundingBoxTransformInfo(float img_width, float img_height, float scale, bool apply_scale = false, const std::array<float, 4> weights = { 1.0, 1.0, 1.0, 1.0 }, float bbox_xform_clip =
+ 4.135166556742356)
+ : _img_width(img_width), _img_height(img_height), _scale(scale), _apply_scale(apply_scale), _weights(weights), _bbox_xform_clip(bbox_xform_clip)
+ {
+ }
+
+ std::array<float, 4> weights() const
+ {
+ return _weights;
+ }
+
+ float bbox_xform_clip() const
+ {
+ return _bbox_xform_clip;
+ }
+
+ float img_height() const
+ {
+ return _img_height;
+ }
+
+ float img_width() const
+ {
+ return _img_width;
+ }
+
+ float scale() const
+ {
+ return _scale;
+ }
+
+ bool apply_scale() const
+ {
+ return _apply_scale;
+ }
+
+private:
+ float _img_width;
+ float _img_height;
+ float _scale;
+ bool _apply_scale;
+ std::array<float, 4> _weights;
+ float _bbox_xform_clip;
+};
+
/** Activation Layer Information class */
class ActivationLayerInfo
{