Add support for 16-bit image data and TIFF/OpenEXR files
Mentioned here - https://github.com/NVIDIA/DIGITS/issues/7#issuecomment-98853981
Continuation of #27
+1 Yes please. I need this as well.
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.
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.
I really need this, my work is based of only on TIF files. Amateur in DL but would be happy to help.
Any idea what release this feature will be added in?
Sorry, I don't have an ETA for this feature at the moment.
Any updates? I think that 16bit grayscale png support would also be useful (and not much harder than adding 16 bit TIFF)
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.
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?
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
pngorjpgencoding when creating an LMDB dataset withdepth > 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
+1 please. This is a must-have for my application (microscopy). Any updates?
Any news on this? +1 please (application on depth images).
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.