From 35e39cd3f102d663d198074e95ff77197d2e0a1d Mon Sep 17 00:00:00 2001 From: Pengchong Jin Date: Thu, 11 Apr 2019 11:13:09 -0700 Subject: [PATCH] Add an option to clip/not clip box outputs in CombinedNonMaxSuppression. PiperOrigin-RevId: 243104621 --- .../api_def_CombinedNonMaxSuppression.pbtxt | 8 ++++ .../api_def_CombinedNonMaxSuppression.pbtxt | 4 ++ .../core/kernels/non_max_suppression_op.cc | 38 ++++++++++--------- .../kernels/non_max_suppression_op_test.cc | 36 +++++++++++++++++- tensorflow/core/ops/image_ops.cc | 1 + tensorflow/python/ops/image_ops_impl.py | 6 ++- .../api/golden/v1/tensorflow.image.pbtxt | 2 +- .../tools/api/golden/v1/tensorflow.pbtxt | 4 -- .../api/golden/v1/tensorflow.raw_ops.pbtxt | 2 +- .../api/golden/v2/tensorflow.image.pbtxt | 2 +- .../tools/api/golden/v2/tensorflow.pbtxt | 4 -- .../api/golden/v2/tensorflow.raw_ops.pbtxt | 2 +- 12 files changed, 78 insertions(+), 31 deletions(-) create mode 100644 tensorflow/core/api_def/python_api/api_def_CombinedNonMaxSuppression.pbtxt diff --git a/tensorflow/core/api_def/base_api/api_def_CombinedNonMaxSuppression.pbtxt b/tensorflow/core/api_def/base_api/api_def_CombinedNonMaxSuppression.pbtxt index 50e72a2446a..475662e40b3 100644 --- a/tensorflow/core/api_def/base_api/api_def_CombinedNonMaxSuppression.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_CombinedNonMaxSuppression.pbtxt @@ -50,6 +50,14 @@ are padded/clipped to `max_total_size`. If true, the output nmsed boxes, scores and classes are padded to be of length `max_size_per_class`*`num_classes`, unless it exceeds `max_total_size` in which case it is clipped to `max_total_size`. Defaults to false. +END + } + attr { + name: "clip_boxes" + description: <