Paper: https://www.cs.cmu.edu/~rsalakhu/papers/oneshot1.pdf
Code: https://github.com/ywpkwon/siamese_tf_mnist (tensorflow)
https://github.com/delijati/pytorch-siamese (pytorch)
Problem Setup
Siamese networks are a class of networks that contain two or more identical (same configuration with same weights and parameters) sub-networks and the parameter updation is mirrored across all networks
Input: Data (Images, Point clouds, text etc)
Output: Embedding and similarity measure
Architecture
Key Points
- Embedding Learning: The deeper feature maps of siamese networks place similar data points closer. Hence they learn better semantic similarity. Useful in application such as image search engines, face recognition etc.
- Robust to class imbalance: Few examples from a single class are enough for the network to learn (one shot learning).
- Training involves pairwise learning, that means it requires pairs of examples to learn from.
- The loss function can be any distance function (eg., euclidean distance etc )