# Text Column not working with Image Folder

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-column-not-working-with-image-folder%2F51855%3E%5C
**Category:** 🤗Datasets\
**Created:** [August 23, 2023, 4:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-column-not-working-with-image-folder%2F51855 "2023-08-23T16:26:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAFruin](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@JAFruin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJAFruin)%5C
**Post date:** [August 23, 2023, 4:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-column-not-working-with-image-folder%2F51855%2F1 "2023-08-23T16:26:54Z")

</div>

![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/a/d/ad604542f1ca4150abc6abe1a0268579b42811e6.png)  
I’m trying to load a local custom image captioning dataset that I have filtered from a much larger one but I’m having issues where it seems that the Image Folder doesn’t seem to be picking up the captions/labels for the images or the csv file that they are contained on

---

<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:** [August 24, 2023, 2:52pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-column-not-working-with-image-folder%2F51855%2F2 "2023-08-24T14:52:31Z")

</div>

Hi! What’s the structure of the `Train_Images` and `Test_Images` folders and the contents of the metadata file(s)? You can obtain the folder structure using the `tree` command.

---

<div class="post-metadata">

**Author:** ![JAFruin](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@JAFruin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJAFruin)%5C
**Post date:** [August 24, 2023, 3:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-column-not-working-with-image-folder%2F51855%2F3 "2023-08-24T15:05:22Z")

</div>

![Screenshot 2023-08-24 160426](https://us1.discourse-cdn.com/hellohellohello/original/3X/e/7/e72b3cdaa4723688ff928b676adb33a50307f36e.png)  
Thanks for responding. The structure is as shown in this image. Also how would I use the tree command? 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:** [August 24, 2023, 3:20pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-column-not-working-with-image-folder%2F51855%2F4 "2023-08-24T15:20:09Z")

</div>

The metadata files must be named `metadata.csv` as explained [here](https://huggingface.co/docs/datasets/image_dataset).

---

<div class="post-metadata">

**Author:** ![JAFruin](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@JAFruin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJAFruin)%5C
**Post date:** [August 25, 2023, 2:58pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-column-not-working-with-image-folder%2F51855%2F5 "2023-08-25T14:58:00Z")

</div>

![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/8/a/8a6fa16c31345e24ab1b77da4efa413f1f6a4813.png)  
The metadata file is still not picked up even when I renamed it?

---

<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:** [August 29, 2023, 4:32pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-column-not-working-with-image-folder%2F51855%2F6 "2023-08-29T16:32:57Z")

</div>

Can you replace `data_dir=` with `data_files=` in the last `load_dataset` call and try again?

---

<div class="post-metadata">

**Author:** ![JAFruin](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@JAFruin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJAFruin)%5C
**Post date:** [August 29, 2023, 4:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-column-not-working-with-image-folder%2F51855%2F7 "2023-08-29T16:45:53Z")

</div>

Hi, thanks for responding. I fixed the issue yesterday once I changed my metadata from a csv to a jsonl file it just worked
