code: def decode_box_3d(output, indices, rotation_svd):
      """Return size, translation and rotation."""
      batch_size = output["centers"].shape[0]
      sizes_3d = get_heatmap_values(output["sizes_offset_3d"], indices)
      sizes_3d += 0.25
      translations_3d = get_heatmap_values(
          output["translations_offset_3d"], indices
      )
  
      rotations_3d = get_heatmap_values(
          output["rotations_offset_3d"], indices
      )
      rotations_3d += tf.constant(
          [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
      )
      rotations_3d = tf.reshape(rotations_3d, [batch_size, -1, 3, 3])
      if rotation_svd:
          s, u, v = tf.linalg.svd(rotations_3d)
          det = tf.linalg.det(
              tf.matmul(u, tf.linalg.matrix_transpose(v))
          )
          det = tf.expand_dims(det, axis=-1)
          a = tf.ones(det.shape)
          s = tf.linalg.diag(tf.concat([a, a, det], axis=-1))
          rotations_3d = tf.matmul(u, tf.matmul(s, v, adjoint_b=True))
  
      rotations_3d = tf.reshape(rotations_3d, [batch_size, -1, 9])
      return sizes_3d, translations_3d, rotations_3d
  
file_path: graphics/tensorflow_graphics/projects/points_to_3Dobjects/models/centernet_utils.py
imports: import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: decode_box_3d(output, indices, rotation_svd) and returns: sizes_3d,  translations_3d,  rotations_3d