Siamese network prediction

990 views
Skip to first unread message

phtan...@gmail.com

unread,
Nov 25, 2014, 8:04:46 PM11/25/14
to caffe...@googlegroups.com
Does anyone know how to use the trained Siamese network for prediction?

I trained the Siamese network for mnist data according to the tutorial http://caffe.berkeleyvision.org/gathered/examples/siamese.html and generated the model.

How to use the trained model to do prediction when given a pair of testing images?

Also anyone knows in Caffe test, what is FLAGS_iterations? Does it run through the training data with multiple batches?

Thanks!

Prasanna Gyawali

unread,
Dec 16, 2014, 12:34:15 AM12/16/14
to caffe...@googlegroups.com


Hello,
Did you find out how to do the prediction??

Thanks!! 

Shun Zhang

unread,
Mar 20, 2015, 9:31:02 PM3/20/15
to caffe...@googlegroups.com
I also want to figure out the problem. Have you get any success?
Thanks!

Dll Z

unread,
Jun 15, 2015, 8:05:21 AM6/15/15
to caffe...@googlegroups.com
Same problem.Did you solve it?

Floris Gaisser

unread,
Jun 15, 2015, 9:34:40 PM6/15/15
to caffe...@googlegroups.com
A 'normal' NN with some fully connected layers at the top, generally gives labels (of the number in the image) as an output.
A siamese network is different in architecture and in a sense has a different goal.
For example 'Dimensionality Reduction by Learning an Invariant Mapping' tries to do dimension reduction similar to the result of a non-linear PCA. (Do you remember EigenFaces?)

I don't know what your goals is? With prediction I assume you want to get a prediction (classification) of what number is written in the image?
This still can be used for classical classification, by using the weights in a 'normal' NN and removing the contrastive loss layer and either:
- adding a fully connected layer on top and then do fine tuning (this is what I'm now trying to figure out)
- use a SVM, KNN or any other classifier with the output of the last layer as a feature vector.
Though I haven't compared the classification accuracy of such a construction as my interests lay elsewhere.

But if you want to use it in a different way like finding similar images this is the way to go.

P.S. I've created a PR that adds some code to make your own siamese datasets easily from images, it might be of use.
Reply all
Reply to author
Forward
0 new messages