def testScaleBoxesToPixelCoordinates(self):
    """Tests box scaling, checking scaled values."""
    def graph_fn():
      in_shape = [60, 40, 3]
      in_boxes = [[0.1, 0.2, 0.4, 0.6],
                  [0.5, 0.3, 0.9, 0.7]]
      in_image = tf.random_uniform(in_shape)
      in_boxes = tf.constant(in_boxes)
      _, out_boxes = preprocessor.scale_boxes_to_pixel_coordinates(
          in_image, boxes=in_boxes)
      return out_boxes
    expected_boxes = [[6., 8., 24., 24.],
                      [30., 12., 54., 28.]]
    out_boxes = self.execute_cpu(graph_fn, [])
    self.assertAllClose(out_boxes, expected_boxes)
Tests box scaling, checking scaled values.
inference_api/src/main/object_detection/core/preprocessor_test.py