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

get_image_files providing error message #4000

Open
Mike-Monash opened this issue Jan 9, 2024 · 0 comments
Open

get_image_files providing error message #4000

Mike-Monash opened this issue Jan 9, 2024 · 0 comments

Comments

@Mike-Monash
Copy link

I am working through the case study provided here" https://medium.com/appsilon-data-science/fastai-in-r-how-to-train-deep-learning-models-with-fastai-d86f1f8a9ba2". I couldn't get the URLs_PETS() code to work, but separately downloaded the image files as .jpg files.

But I can't get the function get_image_files(path_img) to work - it says Error in vision()$all : $ operator is invalid for atomic vectors

The command fnames <- list.files(path_img) works - the instruction fnames[1] will then return "Abyssinian_1.jpg".

This matters as the next command

dls = ImageDataLoaders_from_name_re(
path = path,
fnames = fnames,
pat = "(.+)_\d+.jpg$",
item_tfms = Resize(size = 460),
bs = 10,
batch_tfms = list(Normalize_from_stats(imagenet_stats()))
)

Will also produce the same error. What am I missing?

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