Commit 9cd7a576 authored by Yeqing Li's avatar Yeqing Li Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 410121249
parent 4151365b
...@@ -34,8 +34,8 @@ import PIL.ImageFont as ImageFont ...@@ -34,8 +34,8 @@ import PIL.ImageFont as ImageFont
import six import six
import tensorflow as tf import tensorflow as tf
from official.vision.detection.utils import box_utils from official.vision.beta.ops import box_ops
from official.vision.detection.utils.object_detection import shape_utils from official.vision.utils.object_detection import shape_utils
_TITLE_LEFT_MARGIN = 10 _TITLE_LEFT_MARGIN = 10
_TITLE_TOP_MARGIN = 10 _TITLE_TOP_MARGIN = 10
...@@ -107,8 +107,8 @@ def visualize_images_with_bounding_boxes(images, box_outputs, step, ...@@ -107,8 +107,8 @@ def visualize_images_with_bounding_boxes(images, box_outputs, step,
image_shape = tf.shape(images[0]) image_shape = tf.shape(images[0])
image_height = tf.cast(image_shape[0], tf.float32) image_height = tf.cast(image_shape[0], tf.float32)
image_width = tf.cast(image_shape[1], tf.float32) image_width = tf.cast(image_shape[1], tf.float32)
normalized_boxes = box_utils.normalize_boxes(box_outputs, normalized_boxes = box_ops.normalize_boxes(box_outputs,
[image_height, image_width]) [image_height, image_width])
bounding_box_color = tf.constant([[1.0, 1.0, 0.0, 1.0]]) bounding_box_color = tf.constant([[1.0, 1.0, 0.0, 1.0]])
image_summary = tf.image.draw_bounding_boxes( image_summary = tf.image.draw_bounding_boxes(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment