Training, validating and testing a CNN-based object classifier on new data
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This project was developed for the CNN workshop of the Robotic Vision Summer School 2017 (see This workshop taught how to train a CNN classifier for user-defined classes using keras and tensorflow (See the presentation).


  1. Python 3
  2. Tensorflow 0.12
  3. keras 1.2.2

Data directory

Create a data directory with train and validation folder. In each folder, add subfolders for each class and name it with the class label. Then, pass the data directory to the train and validation script. Note that you can always train with subsets of classes by passing -classes option.

Train and Valuation

Script to run train and validation. For instructions,

$ python ./src/ --help


Script to peform prediction on test data. For instructions,

$ python ./src/ --help