code: def assign_width_height_targets(
      gt_box_batch, gt_num_boxes_batch, stride, image_size
  ):
      """Assign width height."""
      # Returns width, height
      height, width = image_size
  
      def _create_width_height(elems):
          gt_boxes = elems[0]
          gt_num_boxes = elems[1]
  
          num_boxes = tf.cast(gt_num_boxes, tf.int32)
          if tf.math.equal(num_boxes, 0):
              return tf.zeros(
                  (tf.shape(gt_boxes)[0], 2), dtype=tf.float32
              )
          boxes = box_list.BoxList(gt_boxes[:num_boxes, ...])
          boxes = box_list_ops.to_absolute_coordinates(
              boxes, height // stride, width // stride
          )
          (
              _,
              _,
              boxes_height,
              boxes_width,
          ) = boxes.get_center_coordinates_and_sizes()
          width_height = tf.stack([boxes_width, boxes_height], axis=1)
          num_padding_boxes = (
              tf.shape(gt_boxes)[0] - tf.shape(width_height)[0]
          )
          return tf.pad(width_height, ((0, num_padding_boxes), (0, 0)))
  
      return tf.map_fn(
          _create_width_height,
          (gt_box_batch, gt_num_boxes_batch),
          dtype=tf.float32,
      )
  
file_path: graphics/tensorflow_graphics/projects/points_to_3Dobjects/transforms/targets.py
imports: import tensorflow
  from google3.third_party.tensorflow_models.object_detection.core import box_list
  from google3.third_party.tensorflow_models.object_detection.core import box_list_ops
label_desc: Use image node_id 6 for calling a global function with example usage: assign_width_height_targets(gt_box_batch, gt_num_boxes_batch, stride, image_size) and returns: tf, tf, tf