[Imagefolder] Docs + Don't infer labels from file names when there are metadata + Error messages when metadata and images aren't linked correctly
NONE
_The documentation is not available anymore as the PR was closed or merged._
2022-05-10T16:03:55Z
https://github.com/huggingface/datasets/pull/4311#issuecomment-1122593650
https://api.github.com/repos/huggingface/datasets/issues/4311
IC_kwDODunzps5C6Wty
https://api.github.com/repos/huggingface/datasets/issues/comments/1122593650/reactions
2022-05-10T17:19:42Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1122593650
https://avatars.githubusercontent.com/u/99929124?v=4
https://api.github.com/users/HuggingFaceDocBuilderDev/events{/privacy}
https://api.github.com/users/HuggingFaceDocBuilderDev/followers
https://api.github.com/users/HuggingFaceDocBuilderDev/following{/other_user}
https://api.github.com/users/HuggingFaceDocBuilderDev/gists{/gist_id}
https://github.com/HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev
U_kgDOBfTMJA
https://api.github.com/users/HuggingFaceDocBuilderDev/orgs
https://api.github.com/users/HuggingFaceDocBuilderDev/received_events
https://api.github.com/users/HuggingFaceDocBuilderDev/repos
https://api.github.com/users/HuggingFaceDocBuilderDev/starred{/owner}{/repo}
https://api.github.com/users/HuggingFaceDocBuilderDev/subscriptions
User
https://api.github.com/users/HuggingFaceDocBuilderDev
public
MEMBER
Merging this one since mario is off, I took care of adding some tests to make sure everything is fine. Will do the release after it
2022-05-10T17:11:43Z
https://github.com/huggingface/datasets/pull/4311#issuecomment-1122659051
https://api.github.com/repos/huggingface/datasets/issues/4311
IC_kwDODunzps5C6mrr
https://api.github.com/repos/huggingface/datasets/issues/comments/1122659051/reactions
2022-05-10T17:11:43Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1122659051
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
I updated the `docs/source/image_process.mdx` documentation and added an example for image captioning and object detection using `ImageFolder`.

While doing so I also improved a few aspects:
- we don't need to infer labels from file names when there are metadata - they can just be in the metadata if necessary
- raise informative error messages when metadata and images aren't linked correctly:
  - when an image is missing a metadata file
  - when a metadata file is missing an image

I added some tests for these changes as well

cc @mariosasko 