Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

label_from_folder can't handle different directories #528

Open
TJ-C opened this issue May 21, 2020 · 0 comments
Open

label_from_folder can't handle different directories #528

TJ-C opened this issue May 21, 2020 · 0 comments

Comments

@TJ-C
Copy link

TJ-C commented May 21, 2020

I was running Lesson 7 in a Kaggle notebook.
My Images were in: /kaggle/input/the-oxfordiiit-pet-dataset/images
My generated images were in: /kaggle/working/image_gen

When I came to run the following it only shows the images and not the generated images:

print(path)
/kaggle/input/the-oxfordiiit-pet-dataset

def get_crit_data(classes, bs, size):
    src = ImageList.from_folder(path, include=classes).split_by_rand_pct(0.1, seed=42)
    ll = src.label_from_folder(classes=classes)
    data = (ll.transform(get_transforms(max_zoom=2.), size=size)
           .databunch(bs=bs).normalize(imagenet_stats))
    data.c = 3
    return data

data_crit = get_crit_data([name_gen, 'images'], bs=bs, size=size)

So it appears the label function cannot traverse different directories, or is unable to except dir paths in the folder string, e.g. '/kaggle/output/working/image_gen'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant