TIFF/TIF support 
COLLABORATOR
The issue with multichannel TIFF images has already been reported in Pillow (https://github.com/python-pillow/Pillow/issues/1888). We can't do much about it on our side.

Still, to avoid the error, you can bypass the default Pillow decoding and define a custom one as follows:
```python
import tifffile # pip install tifffile

dset = dset.cast_column("image", datasets.Image(decode=False))

def decode_mutlichannel_tiff(batch):
    batch["image"] = [tifffile.imread(image["path"]) for image in batch["image"]]
    return batch

dset.set_transform(decode_mutlichannel_tiff)
```

Regarding the annotations, in which format are they? In the COCO format? I think this is a bit too specific to have a built-in loader for it.
2023-05-05T16:22:50Z
https://github.com/huggingface/datasets/issues/5791#issuecomment-1536490525
https://api.github.com/repos/huggingface/datasets/issues/5791
IC_kwDODunzps5blPwd
https://api.github.com/repos/huggingface/datasets/issues/comments/1536490525/reactions
2023-05-05T16:22:50Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1536490525
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
NONE
This snippet is awesome! I know I probably should have gotten deeper in to the docs to find cast_column and set_transform, but perhaps a link ushering folks to that documentation or even this thread somewhere in https://huggingface.co/docs/datasets/image_load would be helpful? Thanks again for the snippet
2024-01-15T16:15:29Z
https://github.com/huggingface/datasets/issues/5791#issuecomment-1892456165
https://api.github.com/repos/huggingface/datasets/issues/5791
IC_kwDODunzps5wzJbl
https://api.github.com/repos/huggingface/datasets/issues/comments/1892456165/reactions
2024-01-15T16:15:29Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1892456165
https://avatars.githubusercontent.com/u/10255911?v=4
https://api.github.com/users/KeynesYouDigIt/events{/privacy}
https://api.github.com/users/KeynesYouDigIt/followers
https://api.github.com/users/KeynesYouDigIt/following{/other_user}
https://api.github.com/users/KeynesYouDigIt/gists{/gist_id}
https://github.com/KeynesYouDigIt
KeynesYouDigIt
MDQ6VXNlcjEwMjU1OTEx
https://api.github.com/users/KeynesYouDigIt/orgs
https://api.github.com/users/KeynesYouDigIt/received_events
https://api.github.com/users/KeynesYouDigIt/repos
https://api.github.com/users/KeynesYouDigIt/starred{/owner}{/repo}
https://api.github.com/users/KeynesYouDigIt/subscriptions
User
https://api.github.com/users/KeynesYouDigIt
public
COLLABORATOR
We have a section on custom decoding [here](https://huggingface.co/docs/datasets/process#format-transform) (for the audio case though)
2024-01-15T16:38:30Z
https://github.com/huggingface/datasets/issues/5791#issuecomment-1892490283
https://api.github.com/repos/huggingface/datasets/issues/5791
IC_kwDODunzps5wzRwr
https://api.github.com/repos/huggingface/datasets/issues/comments/1892490283/reactions
2024-01-15T16:38:30Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1892490283
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
COLLABORATOR
Btw, we can close this issue as it should be addressed in Pillow rather than here. 
2024-01-15T16:40:12Z
https://github.com/huggingface/datasets/issues/5791#issuecomment-1892492790
https://api.github.com/repos/huggingface/datasets/issues/5791
IC_kwDODunzps5wzSX2
https://api.github.com/repos/huggingface/datasets/issues/comments/1892492790/reactions
2024-01-15T16:40:12Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1892492790
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
NONE
For sure, if image based stuff becomes a priority I think guiding folks to an image decoder section would be really helpful, but im just one dev :) and I know priorities gotta be balanced so no worries. Thanks again for the snippet, agreed we can close
2024-01-15T16:40:32Z
https://github.com/huggingface/datasets/issues/5791#issuecomment-1892493260
https://api.github.com/repos/huggingface/datasets/issues/5791
IC_kwDODunzps5wzSfM
https://api.github.com/repos/huggingface/datasets/issues/comments/1892493260/reactions
2024-01-15T16:40:32Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1892493260
https://avatars.githubusercontent.com/u/10255911?v=4
https://api.github.com/users/KeynesYouDigIt/events{/privacy}
https://api.github.com/users/KeynesYouDigIt/followers
https://api.github.com/users/KeynesYouDigIt/following{/other_user}
https://api.github.com/users/KeynesYouDigIt/gists{/gist_id}
https://github.com/KeynesYouDigIt
KeynesYouDigIt
MDQ6VXNlcjEwMjU1OTEx
https://api.github.com/users/KeynesYouDigIt/orgs
https://api.github.com/users/KeynesYouDigIt/received_events
https://api.github.com/users/KeynesYouDigIt/repos
https://api.github.com/users/KeynesYouDigIt/starred{/owner}{/repo}
https://api.github.com/users/KeynesYouDigIt/subscriptions
User
https://api.github.com/users/KeynesYouDigIt
public
### Feature request

I currently have a dataset (with tiff and json files) where I have to do this:

`wget path_to_data/images.zip && unzip images.zip`

`wget path_to_data/annotations.zip && unzip annotations.zip`
 
 Would it make sense a contribution that supports these type of files? 

### Motivation

instead of using `load_dataset` have to use wget as these files are not supported for annotations with JSON and images with TIFF files. 


Additionally to this, the PIL formatting from datasets does not read correctly the image channels with TIFF format, besides multichannel adaptation might be necessary as well (as my data e.g has more than 3 channels)

### Your contribution

1. Support TIFF images over multi channel format
2. Support JSON annotations