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.09k stars 615 forks source link

j2k support #2837

Closed RaananHadar closed 3 years ago

RaananHadar commented 3 years ago

Hi, I am trying to use DALI to open a j2k image. DALI 1.0 reports that j2k is not a supported filetype. I've opened an issue in nvJPEG2000 and they said that j2k is now supported. As DALI uses the latest version on nvJPEG2000, I understand that there is some coding in DALI that prevents opening this file format.

Hope to see this supported!

JanuszL commented 3 years ago

Hi @RaananHadar,

Could you paste the exact error you get? Maybe it is just the reader which filters our j2p files? Can you try to provide files using files argument in the file reader? If it is about the failure in the decoder itself can you provide a sample image so we can reproduce the issue on our side?

RaananHadar commented 3 years ago

Hi, This is definitely note an issue with the decoder. Here is the error:

[Warning]: File foo.j2k has extension that is not supported by the decoder. Supported extensions: .flac, .ogg, .wav, .jpg, .jpeg, .png, .bmp, .tif, .tiff, .pnm, .ppm, .pgm, .pbm, .jp2, 
read 0 files from 1 directories

Changing the extension from j2k to jp2 and now the reader succeeds in finding the file and the decoder fails (as expected as it expects the wrong file type). So I am betting that there is some simple filter somewhere in the reader that filters out j2k files. As I said in the original issue, the nvJPEG2000 guys proclaim that the decoder should support this extension now.

JanuszL commented 3 years ago

Hi, The extension only matters for the reader. The decoder parses the header of the data provided, so you can even provide a png names as XYZ.jpeg and it should work.

As I said in the original issue, the nvJPEG2000 guys proclaim that the decoder should support this extension now.

Can you provide any sample data that fails in your case (it can be even artificially created)?

JanuszL commented 3 years ago

If it still doesn't work please reopen.