# How to use 'Imagefolder' but with different jsonl file?

**URL:** <https://discuss.huggingface.co/t/how-to-use-imagefolder-but-with-different-jsonl-file/48232>\
**Category:** 🤗Datasets\
**Created:** [July 26, 2023, 12:01pm UTC](https://discuss.huggingface.co/t/how-to-use-imagefolder-but-with-different-jsonl-file/48232 "2023-07-26T12:01:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SiyaoDong](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@SiyaoDong](https://discuss.huggingface.co/u/SiyaoDong)\
**Post date:** [July 26, 2023, 12:01pm UTC](https://discuss.huggingface.co/t/how-to-use-imagefolder-but-with-different-jsonl-file/48232/1 "2023-07-26T12:01:12Z")

</div>

I know that we can use dataset = load\_dataset(‘imagefolder’,data\_dir=‘/home/’ ) to load images with captions in meta.jsonl. So how to use different jsonl files?

I mean, I want to use meta\_set1.json for one experiment and use meta\_set2.json for another experiment, but they all use the same data\_dir. In other words, how can I define the meta.json file in ‘imagefolder’ setup?

Thanks!

---

<div class="post-metadata">

**Author:** ![mariosasko](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mariosasko/32/31548_2.png) [@mariosasko](https://discuss.huggingface.co/u/mariosasko)\
**Post date:** [July 27, 2023, 7:14pm UTC](https://discuss.huggingface.co/t/how-to-use-imagefolder-but-with-different-jsonl-file/48232/2 "2023-07-27T19:14:11Z")

</div>

The `imagefolder`’s metadata file has to named `metadata.jsonl` (or `metadata.csv`), so renaming them between runs is currently the only option.
