Improve shape function of `tf.image.draw_bounding_boxes` (#19237)
authorYong Tang <yong.tang.github@outlook.com>
Tue, 15 May 2018 00:57:23 +0000 (17:57 -0700)
committerRasmus Munk Larsen <rmlarsen@google.com>
Tue, 15 May 2018 00:57:23 +0000 (17:57 -0700)
commitb84bff476514c1a2ee80d9f1bc31a9cb5dcc2ee5
tree4399b9cc9332ba07fb9342f0b4ef5933f29ef187
parent69c74f1e74eb5da964638533d594475ee9e54a66
Improve shape function of `tf.image.draw_bounding_boxes` (#19237)

* Improve shape function of `tf.image.draw_bounding_boxes`

The `tf.image.draw_bounding_boxes` requires `boxes` to be
3-D shape though there was no check on shape function.
This fix improves the shape function by restricting the
boxes to 3-D.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add additional check to make sure boxes shape

ends with 4 ([batch, num_bounding_boxes, 4])

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Address review feedback with addtional shape checks.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add unit tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
tensorflow/core/ops/image_ops.cc
tensorflow/core/ops/image_ops_test.cc