import tensorflow as tf


    predictions_dict = {
        BOX_ENCODINGS: box_encodings,
        CLASS_PREDICTIONS_WITH_BACKGROUND: class_predictions_with_background
    }

    if self._predict_instance_masks:
      with slim.arg_scope(self._conv_hyperparams):
        upsampled_features = tf.image.resize_bilinear(
            image_features,
            [self._mask_height, self._mask_width],
            align_corners=True)
        upsampled_features = slim.conv2d(
            upsampled_features,
            num_outputs=self._mask_prediction_conv_depth,
            kernel_size=[2, 2])
