Another bugfix related to my CPU/GPU test changes: make NetTest a
MultiDeviceTest (Caffe:set_mode(Caffe::CPU/GPU) isn't run without this).
Cleanup pthread code for data layers

Get rid of the ugly "friend" thread function. Simplify the creation of the
thread by inheriting from a base class. Thus, defining the thread is as
simple as overriding a virtual function.
Build Doxygen documentation/Allow custom CXX

Use CXX := /usr/bin/g++-4.6 to define the compiler

Doxygen documentation can be created using

        make doxygen

It can be configured in Makefile.config using:
DOXYGEN_BIN := /usr/bin/doxygen
DOXYGEN_DIR := docs/doxygen
Tools for dataset/features manipulation

Imported from tum_veri branch.

The tools allow to put the following dataset to the Freiburg dataset
convention, with the addition of a dataset.txt file
- Convert the microsoft rgbd dataset
- Convert the Freiburg rgbd dataset
- Convert the washington scene dataset

Also, they convert the previous dataset to the leveldb dataset (embed
and resize images), and generate a loop closures dataset containing all
the loop-closures, the positives, the negatives.

It also contains tools to visualize the loop-closure dataset, and plot
the extracted features.
Create ShuffleDataLayer

[IMPORTANT] The working principle of the layer as described below
doesn't work! Refer to more recent commits for a working version!

The shuffle data layer is meant as an input layer for siamese networks.

The shuffle data layer reads a shuffle list containing pairings of
image keys (corresponding to keys in the leveldb dataset). The shuffle
list is then used to load the appropiate data from the dataset.

The data is loaded using two channels:

- On first forward pass, a batch is read from the first channel,
which reads the keys in first column of the shuffle list

- On the next forward pass, a batch is read from the second channel,
  which reads the keys in the second column of the shuffle list

The network definition should only contain one ShuffleDataLayer.
The SplitLayer will split it up between the two sides of the Siamese
network.

Also, this sets the labels for the image pairs in the following way:
label = 1 : image pair is a loop closure
label = 0 otherwise

Wrong LMDB backend code removed.
TODO: support the LMDB backend
Improve debug: display full batch
Begin Siamese network definition
LMDB Database creation for siamese networks
ShuffleDataLayer with LMDB

This allows the dataset to be read from two separate shuffle layers.

Thus, the new way of inputing images to the siamese network is:

layers {
  name: "data_l"
  type: SHUFFLE_DATA
  data_param {
    backend: LMDB
    source: "../../../data/siamese/small/train/db"
    #mean_file: "../../data/ilsvrc12/imagenet_mean.binaryproto"
    batch_size: 4
    #crop_size: 55
    #mirror: true
    #
    shuffle_param {
      source_list: "../../../data/siamese/small/train/loop_closures_shuffle_list.txt"
      channel: 0
    }
  }

  top: "data_l"
  top: "label_l"
}

layers {
  name: "data_r"
  type: SHUFFLE_DATA
  data_param {
    backend: LMDB
    source: "../../../data/siamese/small/train/db"
    #mean_file: "../../data/ilsvrc12/imagenet_mean.binaryproto"
    batch_size: 4
    #crop_size: 55
    #mirror: true
    #
    shuffle_param {
      source_list: "../../../data/siamese/small/train/loop_closures_shuffle_list.txt"
      channel: 1
    }
  }

  top: "data_r"
  top: "label_r"
}

ShuffleData: Do not store both channels anymore

Leveldb support is kept, but almost useless, since it can't be accessed
from 2 layers can't open the same database
Add Siamese network definition (without loss)

Create the prototxt network definition

TODO: Write the loss function
Empty siamese loss function
Siamese loss experimentSiamese loss experiment
Siamese Loss and accuracy... Not working
Siamese test