I am using dali with tfrecords,
and I have the input images in .jpg format,
and segmentation maps in .png format.
I could not find a nvPNGDecoder,
but I found out that nvJPEGDecoder works for both formats (for some reason),
so I use it succesfulyl like so:
self.decode_jpg = ops.nvJPEGDecoder(device="mixed", output_type=types.RGB)
self.decode_png = ops.nvJPEGDecoder(device="mixed", output_type=types.GRAY)
Could you comment on this behaviour?
because I don't think its consistant with the documentation
@adrianstaniec We have internal fallback to other formats (e.g. PNG) in case nvJPEG operator fails to decode the image. Downside is that this PNG decoding will happen on CPU always. You're right, it's not reflected in documentation.
We did that because you can have mixed data types in one data set - like in the ImageNet you have one PNG (hidden under the jpeg extension file) and still want to use GPU acceleration whenever possible.
Currently, we don't have any other image formats accelerated on the GPU. If you have any format you want to have accelerated feel free to share that request on our forum dedicated to libraries https://devtalk.nvidia.com/default/board/55/.