Open syb0rg opened 4 years ago
Hi, I cannot open this file in any photo viewer so I guess it is just corrupted.
It is a large TIFF file, my default image viewers wouldn't open it as well. You should be able to view the file with GIMP.
What I see in the header is:
49 49 2B 00
So according to it is II 43 0. According to http://www.fileformat.info/format/tiff/corion.htm is should be II 42 0. That is why DALI considers this image as malformed. GIMP probably disregards this 43 value and loads the image anyway. Still, I'm not sure if we can allow this kind of lack of the proper header format.
I dug a bit into this, the header looks to be correct. It follows the BigTIFF file format:
➜ file 0005f7aaab2800f6170c399693a96917.tiff
0005f7aaab2800f6170c399693a96917.tiff: Big TIFF image data, little-endian
I confirmed GIMP was not disregarding it by editing the header value to be 42; it wouldn't load the image.
So it is a BigTIFF format which is a variant of TIFF. I don't know what we need to do to support it besides accepting different values in the header. We will check it and get back to you soon.
I see that the image you provided is tiled. Our custom TIFF handling doesn't support that and in such case, we fall back to OpenCV which seems to not support it either. I will add this feature to our ToDo list but it doesn't seem to be a trivial amount of work add it now. If you have any spear time you can try to hack it on your own, I would start from adding additional filters to ImageFactory, then remove this limitation for tiling and dive into decoding itself. The API seems to be not very complicated.
I am unable to load this TIFF file. Here is a minimal example (assuming imported libraries):
train.csv
is defined as such:Upon instantiating
TiffLoader
I get the following error message:Using the same classes and methods above with a TIFF from DALI_extra the data loader is constructed and usable as expected.