NVIDIA / DALI

A GPU-accelerated library containing highly optimized building blocks and an execution engine for data processing to accelerate deep learning training and inference applications.
https://docs.nvidia.com/deeplearning/dali/user-guide/docs/index.html
Apache License 2.0
5.13k stars 619 forks source link

DALIImageType.ANY_DATA and 16-bit PNG #3880

Open jasonxzhou opened 2 years ago

jasonxzhou commented 2 years ago

Hi DALI Team,

What is the purpose of DALIImageType.ANY_DATA? We have large amounts of 16-bit .png data, which, from reading past discussions https://github.com/NVIDIA/DALI/issues/2827, https://github.com/NVIDIA/DALI/issues/3275, DALI does not seem to support - is there any way to load the data without having to modify the files on disk? (i.e. without needing to split them into 2 8-bit .png and dumping those to disk, for example).

jantonguirao commented 2 years ago

Hi @jasonxzhou. DALIImageType.ANY_DATA represents images with a custom layout of channels (not RGB, YCbCr, etc). For example, it is used when loading TIFFs with more than 3 channels. Unfortunately, at the moment we do not support bitdepths higher than 8. We know this is a major limitation for some applications. The good news is that we are planning to come to this topic in the near future. We will let you know via this issue when we start supporting larger bitdepths.

jasonxzhou commented 2 years ago

Sounds good - thanks!

jantonguirao commented 2 years ago

I will keep this issue open so that we remember to notify you back when higher bitdepth support is implemented. Thanks

jantonguirao commented 1 year ago

@jasonxzhou Higher bitdepth support is now available via fn.experimental.decoders.image:

        decoded = fn.experimental.decoders.image(
                encoded, device='mixed', dtype=types.UINT16)

I hope this helps

jasonxzhou commented 1 year ago

@jantonguirao thanks very much for the notification - in general, how long does it take for a new feature move out of experimental?

jantonguirao commented 1 year ago

We simply use the experimental namespace when we introduce something new, or when we know it's not yet feature complete. Other times, like this one, it's a replacement for an important operator like the image decoder, that we want to battle-test first before we do the switch. One rule we follow is that we are more tolerant with breaking changes with "experimental" operators, while we try to keep backwards compatibility with the other ones. That being said, we encourage you to use this operator. In case you find any issues, please do let us know.