Hey guys !
I’m working on a artistic movement recognition algorithm next to the first lesson and i collected some images for my database.
The folder structure is this one : database/images/train and database/images/validation_set, in those two folder, there is a folder for each artistic movement and images in it. When i run this code
/data/anaconda/lib/python3.7/site-packages/fastai/data_block.py:451: UserWarning: Your training set is empty. If this is by design, pass ignore_empty=True to remove this warning.
warn(“Your training set is empty. If this is by design, pass ignore_empty=True to remove this warning.”)
Any advice to solve my problem ? <3
Have a good day guys !
So, instead of passing path_train you should instead pass path (and you don’t need to make it a string with f'{path_train}', it will take a Path). Then you specify the names of the sub-folders for train and validation. So you likely want something like:
path= Path("/home/affect/my_50cts/whart?/images")
data = ImageDataBunch(path, 'train', 'validation_set') # With other arguments for transforms etc
Or as the default for the train parameter is ‘train’ like in your data you could just have:
data = ImageDataBunch(PATH, valid='validation_set')
As a general thing, is the question mark really in the folder name? If so, I would suggest that is not a good idea, the question mark is a special character in linux shells, so best not used in paths.