How to create a databunch from folder names?

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?

src = (ImageList.from_folder(path)
                .split_by_rand_pct()
                .label_from_folder())
1 Like