DIGITS icon indicating copy to clipboard operation
DIGITS copied to clipboard

Add support for 16-bit image data and TIFF/OpenEXR files

Open lukeyeager opened this issue 11 years ago • 13 comments

Mentioned here - https://github.com/NVIDIA/DIGITS/issues/7#issuecomment-98853981

Continuation of #27

lukeyeager avatar May 05 '15 23:05 lukeyeager

+1 Yes please. I need this as well.

jms90h5 avatar Aug 12 '15 22:08 jms90h5

Could do with this as well, if someone could give me a few tips on how to start on this I'd be happy to work on it.

gilandose avatar Sep 24 '15 14:09 gilandose

It'll take a refactoring of tools/create_db.py and digits/utils/image.py mostly. We just need to keep the dtype of any images opened rather than converting them all to uint8.

For creating LMDB datasets, we'll need to make sure we save 16-bit or 32-bit images in a format that OpenCV can read (since Caffe uses OpenCV to read encoded image strings). For HDF5 it should be easy - just create the dataset with a different dtype.

lukeyeager avatar Sep 24 '15 16:09 lukeyeager

I really need this, my work is based of only on TIF files. Amateur in DL but would be happy to help.

nageshkuba avatar Oct 13 '15 10:10 nageshkuba

Any idea what release this feature will be added in?

cicero19 avatar Jan 04 '16 00:01 cicero19

Sorry, I don't have an ETA for this feature at the moment.

lukeyeager avatar Jan 04 '16 17:01 lukeyeager

Any updates? I think that 16bit grayscale png support would also be useful (and not much harder than adding 16 bit TIFF)

enoonIT avatar Mar 19 '16 18:03 enoonIT

Hi @enoonIT I think support for 16-bit grayscale png may be offered at two levels:

First, there is the support for loading 16-bit images and storing them as 8-bit images in the database. This should be rather straightforward to do.

Second, if you are willing to retain the full range of your 16-bit image data in your neural network, this requires adequate support from the underlying Deep Learning framework. Caffe does not support loading encoded 16-bit images. We should be able to use either un-encoded LMDB or HDF5. Caveat: un-encoded LMDB files will take a huge amount of disk space and Caffe does not support mean subtraction on HDF5 data.

gheinrich avatar Mar 21 '16 09:03 gheinrich

Hi @gheinrich and thanks for the answer. I understand your answer but I'm a bit perplexed on how to proceed. I currently have a a big (2M) dataset of grayscale 16bit images, representing depth maps. I could create an unencoded LMBD dataset, but then I would lose the ability use DIGITS visualization tools, right?

enoonIT avatar Mar 21 '16 18:03 enoonIT

Sorry if my comment was unclear. I wanted to check whether you needed the full 16-bit resolution during training and whether using un-encoded LMDB or HDF5 was fine by you.

Assuming the answer to both questions is "yes" then I think this is what needs to happen in DIGITS to enable this (@lukeyeager feel free to correct me!):

  • update the image loading and resizing utility function to support 16-bit images
  • for classification datasets:
    • add a field in the dataset creation page to let users select the image depth
    • prevent the user from selecting png or jpg encoding when creating an LMDB dataset with depth > 8 bits
    • convert all images to the selected image depth when creating the dataset
  • for generic datasets: detect image depth from provided LMDB files
  • use the appropriate image depth during inference

gheinrich avatar Mar 21 '16 19:03 gheinrich

+1 please. This is a must-have for my application (microscopy). Any updates?

tfeo avatar Mar 09 '17 19:03 tfeo

Any news on this? +1 please (application on depth images).

ividal avatar Nov 21 '17 00:11 ividal

Hello, you can write a data ingestion plug-in for your 16-bit data. See https://github.com/NVIDIA/DIGITS/tree/digits-6.0/examples/writing-plugins

I am closing this issue now.

gheinrich avatar Nov 21 '17 08:11 gheinrich