Skip to content

BME-SmartLab-Education/vitmav45-2016-train-validate-test-repeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TRAIN_VALIDATE_TEST_REPEAT

GROUP PROJECT - VITMAV45 2016

Our task was to train a convolutional neural network (CNN) to recognize the style of selected painters, and later on to determine the origin of a painting received as input. As for the second part of the semester using the received results, we decided to recreate the learnt painter styles in a way, that the network is able to produce style from noise defined by the obtained features of given paintings.

Paper

Link to the paper

Train

Dependencies

Libraries

  • Python 3.5
  • Keras (1.1.1)
  • TensorFlow
  • Numpy
  • Sklearn
  • Scipy

Included files

  • preprocess2.py - Processing the csv input, scaling and transforming the input images into tensors
  • learn.py - Train the neural network using the input data
  • train_info_modified_fix.csv - Data containing painter details
  • /train_sample - Image set for painters

Usage

Parameters are modifiable from code only.

Run training

python learn.py

Input

  • csv_file_name - defined in preprocess2.py | cs_load function argument | path to the csv containing meta data
  • location - defined in preprocess2.py | load_images function argument | path to the directory containing the training set images

Output

The output is an array with the size equal to the input size, containing 10 floats for each element. These floats represent the probability that the painter on a given index is the creater of the painting.

Sample output:
[ 
 [0.9, ... , 0.01],
 [ ... ],
 ...
 [ ... ],
 [0.07, ... , 0.2]
]

Paint

Dependencies

Libraries

  • Python 3.5
  • Keras (1.1.1)
  • TensorFlow
  • Numpy
  • Sklearn
  • Scipy

Included files

  • hftest2.ipynb - Generate an image from the given style

Usage

Parameters are modifiable from code only.

Run

Run hftest2.ipynb

Input

  • train_sample - defined in hftest2.ipynb | load_images function argument | path to the train images
  • filename - defined in hftest2.ipynb | preprocess_image function argument | name of the base image for style transfer
  • iteration number - the number of style transfer iterations

Output

The output is an image whose base is the filename image and got some style features from the train images iteration number times.

About

Identifying painters by the stylistic features of their paintings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •