SiameseNet
A twin convolutional network that scores whether two 105x105 grayscale images show the same class.
Image classification · 32 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Image classification
- Parameters
- 39M
- Operations
- 32
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICML 2015 Deep Learning Workshop
- Authors
- Gregory Koch, Richard Zemel, Ruslan Salakhutdinov
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m2831
- Graph hash
- 6ac4e97e016315c1ec4e017cbc3c0eae534523ccd9a0d7dbb6bc89687708d755
- Skeleton hash
- 5c3bb1610332423dd1a216766755d24b4f0407c9bc7cf8e9d92ee919ebaf93ac
- Architecture hash
- a6a94f1658f661c76e512acbe12f09f42c89292dc63b29db8b5d8060bdd72bc7
- Diagram SHA-256
- 1490e63abed979442b74a05e0ba2ee8a7a33caa9fd344eb79ae4f47bb4212efe
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
This is the convolutional siamese network from the paper Siamese Neural Networks for One-shot Image Recognition, built for the one-shot setting in which a classifier must make predictions given only a single example of each new class. The network is trained to judge whether two images belong to the same class, and is then used on new classes by comparing a test image against one example of each.
A siamese network consists of twin networks that accept distinct inputs and are joined at the top, with parameters tied between the twins. Each twin here is a stack of convolutional layers ending in a 4096 unit fully-connected layer, after which the L1 component-wise distance between the two vectors is computed. That weighted distance passes through a sigmoid, giving a similarity score between 0 and 1.
Siamese networks did not originate with this paper, which credits Bromley and LeCun with introducing them in the early 1990s for signature verification. On its one-shot trials with the Omniglot dataset the paper reports 92 percent accuracy, stronger than every model it compared against except HBPL. Each Omniglot character is a 105x105 binary-valued image drawn by hand.
Key idea. The paper trains a convolutional siamese network to verify whether two images share a class, then uses it for one-shot classification of new classes.
- siamese network
- siamese neural network
- SiameseNet
- one-shot learning
- one-shot image recognition
- Omniglot
- image verification
- metric learning
- twin network
- few-shot learning
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{siamesenet2015,
title = {Siamese Neural Networks for One-shot Image Recognition},
author = {Gregory Koch and Richard Zemel and Ruslan Salakhutdinov},
year = {2015},
journal = {ICML 2015 Deep Learning Workshop}
}