How to arrange the image dataset in CNN?
Directory structure like in dogscats/.(atleast I kept it this way)

dogscats

    |-- train

          |-- cats

                |-- catpic0, catpic1, …

          |-- dogs/

                |-- dogpic0, dogpic1, …

    |-- valid

          |-- cats

                |-- catpic0+x, catpic1+x, …

          |-- dogs

                |-- dogpic0+x, dogpic1+x, …

    |-- test

           |-- catpic0+x+y, catpic1+x+y, dogpic0+x+y, dogpic1+x+y


Becareful With the naming of the files also..

Also note that you will need a mapping of image names and classes as well like in a CSV or something...

Also there is no globally accepted directory structure, it completely depends on the API you will use...

What is a good train/validation/test split?(depends on your dataset size)


can do $80/20$ (train/validation)


if you have or are creating a 'test' split, use for (train/validation/test):


can do $80/15/5$
can do $70/20/10$
can do $60/20/20$


Remembering that sole aim is to generalize eventually on test sets...