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

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-imagefolder-but-with-different-jsonl-file%2F48232%3E%5C
**Category:** 🤗Datasets\
**Created:** [July 26, 2023, 12:01pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-imagefolder-but-with-different-jsonl-file%2F48232 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FSiyaoDong)%5C
**Post date:** [July 26, 2023, 12:01pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-imagefolder-but-with-different-jsonl-file%2F48232%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmariosasko)%5C
**Post date:** [July 27, 2023, 7:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-imagefolder-but-with-different-jsonl-file%2F48232%2F2 "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.
