Skip to content

PJUllrich/Machine-Learning-Project

Repository files navigation

Machine Learning Project

Setting up

Data

  1. Copy the paintings.zip from Google Drive into the Project folder
  2. Extract the paintings.zip file.
  3. Delete the paintings.zip file.

Dev Environment

  1. Install Python 3.6.3
  2. Open a Terminal in your Project Folder
  3. Create a Virtual Environment with python3 -m venv ./venv
  4. Activate the Virtual Environment with source venv/bin/activate
  5. Install the requirements with pip install -r requirements.txt

Keras

  1. 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
  2. Open the file .keras/keras.json in your Home directory.
  3. Change the backend entry to 'theano'.
  4. Change the image_data_format entry to channels_first
  5. Save and exit the file.
  6. Now, you should be able to run training.py without errors!

Configuring the CNN

  • 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.

Running the CNN

  • Run the training.py script. This script trains and validates the CNN.

Resources

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages