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>
Loading
Please sign in to comment