- Copy the
paintings.zip
fromGoogle Drive
into theProject folder
- Extract the
paintings.zip
file. - Delete the
paintings.zip
file.
- Install
Python 3.6.3
- Open a Terminal in your
Project Folder
- Create a Virtual Environment with
python3 -m venv ./venv
- Activate the Virtual Environment with
source venv/bin/activate
- Install the requirements with
pip install -r requirements.txt
- Run
training.py
once. At first it won't work since Keras is not yet configured, but this will create a.keras
folder in$HOME
- Open the file
.keras/keras.json
in your Home directory. - Change the
backend
entry to 'theano'. - Change the
image_data_format
entry tochannels_first
- Save and exit the file.
- Now, you should be able to run
training.py
without errors!
- All configurations can be made in
config.py
. I pushed the ones that are most interesting to the top of the file. - The layers of the CNN can be changed in
cnn.py
. Make sure that the Flatten() layer is always the last one.
- Run the
training.py
script. This script trains and validates the CNN.
https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html https://keras.io/ https://github.com/inejc/painters/blob/master/painters/train_cnn.py https://www.wga.hu/index1.html