text_plain_output_1.png
import os

import os

import numpy as np
import pandas as pd
import os

path_validation = Path('/kaggle/input/food-validation/images/')
path_training = Path('/kaggle/input/food-training/images/')
image_files = os.listdir(path_training)
for i in range(2):
    image_path = os.path.join(path_training, image_files[i])
    image_pathv = os.path.join(path_validation, image_files[i])

path_annotations = Path('/kaggle/input/food-training/annotations.json')
label_func = lambda x: annotations[str(x.parent.name + '/' + x.name)]['name']

dls = ImageDataLoaders.from_folder(path_training, valid_path=path_validation, item_tfms=Resize(460), batch_tfms=aug_transforms(size=224, min_scale=0.75), label_func=label_func)