def predict(self, preprocessed_inputs, _):
    "Predicts CenterNet prediction tensors given an input batch.\n\n    Feature extractors are free to produce predictions from multiple feature\n    maps and therefore we return a dictionary mapping strings to lists.\n    E.g. the hourglass backbone produces two feature maps.\n\n    Args:\n      preprocessed_inputs: a [batch, height, width, channels] float32 tensor\n        representing a batch of images.\n\n    Returns:\n      prediction_dict: a dictionary holding predicted tensors with\n        'preprocessed_inputs' - The input image after being resized and\n          preprocessed by the feature extractor.\n        'object_center' - A list of size num_feature_outputs containing\n          float tensors of size [batch_size, output_height, output_width,\n          num_classes] representing the predicted object center heatmap logits.\n        'box/scale' - [optional] A list of size num_feature_outputs holding\n          float tensors of size [batch_size, output_height, output_width, 2]\n          representing the predicted box height and width at each output\n          location. This field exists only when object detection task is\n          specified.\n        'box/offset' - [optional] A list of size num_feature_outputs holding\n          float tensors of size [batch_size, output_height, output_width, 2]\n          representing the predicted y and x offsets at each output location.\n        '$TASK_NAME/keypoint_heatmap' - [optional]  A list of size\n          num_feature_outputs holding float tensors of size [batch_size,\n          output_height, output_width, num_keypoints] representing the predicted\n          keypoint heatmap logits.\n        '$TASK_NAME/keypoint_offset' - [optional] A list of size\n          num_feature_outputs holding float tensors of size [batch_size,\n          output_height, output_width, 2] representing the predicted keypoint\n          offsets at each output location.\n        '$TASK_NAME/keypoint_regression' - [optional] A list of size\n          num_feature_outputs holding float tensors of size [batch_size,\n          output_height, output_width, 2 * num_keypoints] representing the\n          predicted keypoint regression at each output location.\n        'segmentation/heatmap' - [optional] A list of size num_feature_outputs\n          holding float tensors of size [batch_size, output_height,\n          output_width, num_classes] representing the mask logits.\n        'densepose/heatmap' - [optional] A list of size num_feature_outputs\n          holding float tensors of size [batch_size, output_height,\n          output_width, num_parts] representing the mask logits for each part.\n        'densepose/regression' - [optional] A list of size num_feature_outputs\n          holding float tensors of size [batch_size, output_height,\n          output_width, 2 * num_parts] representing the DensePose surface\n          coordinate predictions.\n        Note the $TASK_NAME is provided by the KeypointEstimation namedtuple\n        used to differentiate between different keypoint tasks.\n    "
    features_list = self._feature_extractor(preprocessed_inputs)
    predictions = {}
    for (head_name, heads) in self._prediction_head_dict.items():
        predictions[head_name] = [head(feature) for (feature, head) in zip(features_list, heads)]
    predictions['preprocessed_inputs'] = preprocessed_inputs
    self._batched_prediction_tensor_names = predictions.keys()
    return predictions
Predicts CenterNet prediction tensors given an input batch.

Feature extractors are free to produce predictions from multiple feature
maps and therefore we return a dictionary mapping strings to lists.
E.g. the hourglass backbone produces two feature maps.

Args:
  preprocessed_inputs: a [batch, height, width, channels] float32 tensor
    representing a batch of images.

Returns:
  prediction_dict: a dictionary holding predicted tensors with
    'preprocessed_inputs' - The input image after being resized and
      preprocessed by the feature extractor.
    'object_center' - A list of size num_feature_outputs containing
      float tensors of size [batch_size, output_height, output_width,
      num_classes] representing the predicted object center heatmap logits.
    'box/scale' - [optional] A list of size num_feature_outputs holding
      float tensors of size [batch_size, output_height, output_width, 2]
      representing the predicted box height and width at each output
      location. This field exists only when object detection task is
      specified.
    'box/offset' - [optional] A list of size num_feature_outputs holding
      float tensors of size [batch_size, output_height, output_width, 2]
      representing the predicted y and x offsets at each output location.
    '$TASK_NAME/keypoint_heatmap' - [optional]  A list of size
      num_feature_outputs holding float tensors of size [batch_size,
      output_height, output_width, num_keypoints] representing the predicted
      keypoint heatmap logits.
    '$TASK_NAME/keypoint_offset' - [optional] A list of size
      num_feature_outputs holding float tensors of size [batch_size,
      output_height, output_width, 2] representing the predicted keypoint
      offsets at each output location.
    '$TASK_NAME/keypoint_regression' - [optional] A list of size
      num_feature_outputs holding float tensors of size [batch_size,
      output_height, output_width, 2 * num_keypoints] representing the
      predicted keypoint regression at each output location.
    'segmentation/heatmap' - [optional] A list of size num_feature_outputs
      holding float tensors of size [batch_size, output_height,
      output_width, num_classes] representing the mask logits.
    'densepose/heatmap' - [optional] A list of size num_feature_outputs
      holding float tensors of size [batch_size, output_height,
      output_width, num_parts] representing the mask logits for each part.
    'densepose/regression' - [optional] A list of size num_feature_outputs
      holding float tensors of size [batch_size, output_height,
      output_width, 2 * num_parts] representing the DensePose surface
      coordinate predictions.
    Note the $TASK_NAME is provided by the KeypointEstimation namedtuple
    used to differentiate between different keypoint tasks.
def predict(self, preprocessed_inputs, _):
    "Predicts CenterNet prediction tensors given an input batch.\n\n    Feature extractors are free to produce predictions from multiple feature\n    maps and therefore we return a dictionary mapping strings to lists.\n    E.g. the hourglass backbone produces two feature maps.\n\n    Args:\n      preprocessed_inputs: a [batch, height, width, channels] float32 tensor\n        representing a batch of images.\n\n    Returns:\n      prediction_dict: a dictionary holding predicted tensors with\n        'preprocessed_inputs' - The input image after being resized and\n          preprocessed by the feature extractor.\n        'object_center' - A list of size num_feature_outputs containing\n          float tensors of size [batch_size, output_height, output_width,\n          num_classes] representing the predicted object center heatmap logits.\n        'box/scale' - [optional] A list of size num_feature_outputs holding\n          float tensors of size [batch_size, output_height, output_width, 2]\n          representing the predicted box height and width at each output\n          location. This field exists only when object detection task is\n          specified.\n        'box/offset' - [optional] A list of size num_feature_outputs holding\n          float tensors of size [batch_size, output_height, output_width, 2]\n          representing the predicted y and x offsets at each output location.\n        '$TASK_NAME/keypoint_heatmap' - [optional]  A list of size\n          num_feature_outputs holding float tensors of size [batch_size,\n          output_height, output_width, num_keypoints] representing the predicted\n          keypoint heatmap logits.\n        '$TASK_NAME/keypoint_offset' - [optional] A list of size\n          num_feature_outputs holding float tensors of size [batch_size,\n          output_height, output_width, 2] representing the predicted keypoint\n          offsets at each output location.\n        '$TASK_NAME/keypoint_regression' - [optional] A list of size\n          num_feature_outputs holding float tensors of size [batch_size,\n          output_height, output_width, 2 * num_keypoints] representing the\n          predicted keypoint regression at each output location.\n        'segmentation/heatmap' - [optional] A list of size num_feature_outputs\n          holding float tensors of size [batch_size, output_height,\n          output_width, num_classes] representing the mask logits.\n        'densepose/heatmap' - [optional] A list of size num_feature_outputs\n          holding float tensors of size [batch_size, output_height,\n          output_width, num_parts] representing the mask logits for each part.\n        'densepose/regression' - [optional] A list of size num_feature_outputs\n          holding float tensors of size [batch_size, output_height,\n          output_width, 2 * num_parts] representing the DensePose surface\n          coordinate predictions.\n        Note the $TASK_NAME is provided by the KeypointEstimation namedtuple\n        used to differentiate between different keypoint tasks.\n    "
    features_list = self._feature_extractor(preprocessed_inputs)
    predictions = {}
    for (head_name, heads) in self._prediction_head_dict.items():
        predictions[head_name] = [head(feature) for (feature, head) in zip(features_list, heads)]
    predictions['preprocessed_inputs'] = preprocessed_inputs
    self._batched_prediction_tensor_names = predictions.keys()
    return predictions