tensorflow/models · error · NotImplementedError

Video classification do not support image bytes input.

Error message

Video classification do not support image bytes input.

What it means

Error "Video classification do not support image bytes input." thrown in tensorflow/models.

Source

Thrown at official/vision/serving/video_classification.py:112

            fn_output_signature={
                video_input.IMAGE_KEY: tf.string,
            })
        return self.serve(inputs[video_input.IMAGE_KEY], tf.zeros([1, 1]))

  @tf.function
  def inference_from_image_tensors(
      self, input_frames: tf.Tensor) -> Mapping[str, tf.Tensor]:
    return self.serve(input_frames, tf.zeros([1, 1]))

  @tf.function
  def inference_from_image_audio_tensors(
      self, input_frames: tf.Tensor,
      input_audio: tf.Tensor) -> Mapping[str, tf.Tensor]:
    return self.serve(input_frames, input_audio)

  @tf.function
  def inference_from_image_bytes(self, inputs: tf.Tensor):
    raise NotImplementedError(
        'Video classification do not support image bytes input.')

  def serve(self, input_frames: tf.Tensor, input_audio: tf.Tensor):
    """Cast image to float and run inference.

    Args:
      input_frames: uint8 Tensor of shape [batch_size, None, None, 3]
      input_audio: float32

    Returns:
      Tensor holding classification output logits.
    """
    with tf.device('cpu:0'):
      inputs = tf.map_fn(
          self._preprocess_image, (input_frames),
          fn_output_signature={
              'image': tf.float32,
          })

View on GitHub (pinned to e006f5f0d5)

Solutions

  1. Use input_type 'image_tensor' (decoded frames) for video classification serving.
  2. Decode video/image bytes to tensors on the client side before sending.

When it happens

Trigger: Thrown at official/vision/serving/video_classification.py:112 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/dd61a9d60ff451bb. Report an issue: GitHub.