tf.io.extract_jpeg_shape
Извлекает информацию о форме изображения, закодированного в формате JPEG.
tf.io.extract_jpeg_shape(
contents: Annotated[Any, _atypes.String],
output_type: TV_ExtractJpegShape_output_type = tf.dtypes.int32,
name=None
) -> Annotated[Any, TV_ExtractJpegShape_output_type]
Эта операция анализирует только заголовок изображения, поэтому она намного быстрее, чем DecodeJpeg.
| Аргументы | |
|---|---|
contents | Tensor типа string. Скаляр. Изображение, закодированное в формате JPEG. |
output_type | Необязательный тип tf.DType из списка: tf.int32, tf.int64. По умолчанию — tf.int32. (Необязательно.) Тип выходных данных операции (int32 или int64). По умолчанию — int32. |
name | Имя операции (необязательно). |
| Возвращаемое значение | |
|---|---|
Tensor типа output_type. |
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/io/extract_jpeg_shape