Project for the Machine Learning for Computer Vision module in the Master in Computer Vision by Universitat Autònoma de Barcelona.
The goal of the project is to build an image classifier using widely used machine learning and deep learning techniques.
The first half of the course will use a "classic" machine learning approach, primarily focused on the Bag of Words framework, while the second half of the course will tackle the problem using one of the most famous techniques in deep learning: Convolutional Neural Networks (CNN).
The dataset consists of 1881 training images and 807 test images split into 8 classes:
- coast
- forest
- highway
- inside city
- mountain
- open country
- street
- tall building
The whole dataset can be downloaded here. Once extracted, the resulting
MIT_split
folder should be located inside the dataset
folder.
Folder | Purpose |
---|---|
mlcv | Store all the functions and classes used to run the experiments |
scripts | Store all the scripts that import certain functions and classes from mlcv and execute the desired experiments |
dataset | Store the .dat files containing the paths to the images and the corresponding labels, as well as the images themselves |
models | Store all the pickle files with the objects obtained during training (classifiers, standard scalers, PCAs, etc.) |
Most of the dependencies of the project are specified in the requirements.txt
file
in the root of the project, which means that you can easily install the required dependencies with the
following command:
$ pip install -r requirements.txt
NOTE: It is recommended to use a separate virtual environment for this project, so that you don't have conflicts
with the versions of the dependencies with your global installation. Here you will find instructions about the
usage of virtualenv
, and here for conda
virtual environments if you're
using the Anaconda distribution.
This project also relies on OpenCV 2.4.11. Here you will find OpenCV setup instructions for all major OSes:
On top of that this project uses the Yael library from INRIA.
The library was used on a Linux machine.
To install it, just download it, then gunzip
and untar it inside the libraries
folder, and after that execute the following command on the uncompressed yael
folder:
$ ./configure.sh --enable-numpy