Commit b84bff47 authored by Yong Tang's avatar Yong Tang Committed by Rasmus Munk Larsen
Browse files

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: default avatarYong 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: default avatarYong Tang <yong.tang.github@outlook.com>

* Address review feedback with addtional shape checks.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Add unit tests

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent 69c74f1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment