Hi,
From information gathered from different sites, I made my dataset using this python script (modified a bit from my actual).
It loads all image paths to a list and then randomly selects two which are concatenated and added to the database along with a label (0 or 1). To use this, though, your images have to include the label in their filename.
Furthermore, you should also create a workaround such that you don't get tons of negative samples and only a few positive samples (I used 4:1 negative samples). When you made the dataset you can follow the 'siamese network' tutorial and use the "slice" layer to split up the images (slice point: 3).
Otherwise, this thread also covers this subject:
https://groups.google.com/forum/#!topic/caffe-users/SOgOkPYps1gHope that it helps
Best,
Aske