How to create a databunch from folder names?

(Kapil raj) #1

I have my dataset on google drive and I stored my images in a folder with my name and an other person’s images into another folder with his name.
The structure is like this:

mydrive/dataset/kapil/
img1
img2

mydrive/dataset/XYZ/
img1
img2

Now I want to create a databunch from this. How can I do that?

0 Likes

(Kushajveer Singh) #2
src = (ImageList.from_folder(path)
                .split_by_rand_pct()
                .label_from_folder())
0 Likes