Skip to content

Implement support for AV1 / AVIF for image files #882

@yongtang

Description

@yongtang

This request is form tensorflow/tensorflow#37217 which falls into tensorflow/io's scope. The following is copied from the original issue:

/cc @Daniel451

In image processing there are scenarios, especially when you deal with higher resolution images, where compression artifacts actually deteriorates your model training sessions. This specifically applies to old image formats like GIF or JPEG. Storing data in, for example, BMP format however drastically increases disk space usage.

I propose the implementation of AV1 / AVIF for image files, i.e. adding AVIF format to tf.io.decode_image. AVIF is a free, open source format.

AV1 (see AV1 wikipedia page) is a next generation video (and image) codec. It is broadly supported by Google, Amazon, Apple, ARM, Cisco, Facebook, IBM, Intel Corporation, Microsoft, Mozilla, Netflix, Nvidia, Samsung Electronics, and others since AV1 is developed and supported by AOMedia, where these and other corporations are contributing to.

AOMedia's main goal is developing royalty-free video and image formats. Hence, long-term support can be expected.

AVIF (see AVIF wikipedia entry) is the image file format of the AV1 codec. It has major benefits compared to older formats like JPEG or PNG -> lower file size while still maintaining a significantly better quality.

This blog post by netflix demonstrates that AVIF covers little to zero compression artifacts and having a lower file size compared to JPEG.

See AVIF defintion: https://aomediacodec.github.io/av1-avif/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions