Answers.Body: <p>Single object tracking using a Siamese Network is a Detect and compare approach, where an object of interest is detected and the one to be tracked is passed through a siam network with next consecutive frame to get a correlation between them, if you look at the related <a href="https://arxiv.org/abs/1704.06036" rel="nofollow noreferrer">reference</a>, it is a correlation-based tracking, ie. correlation between objects detected in one frame and the ones detected in next frame, which you can imagine as samples considered across 2 timesteps or an RNN unrolled to 2 timesteps</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-04T07:55:22.150Z
Answers.LastActivityDate: 2020-05-04T07:55:22.150Z
Answers.UserDisplayName: SajanGohil
Answers.Body: <p><a href="https://i.sstatic.net/mlDSR.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mlDSR.png" alt="RNN structure"></a></p>
  
  <p>Well, here in the picture we have the unrolled or unfold RNN on the right side. Siamese network is formed when it is said to be "unrolled over two time-steps". So, take part where there is two first iterations of RNN and yes, you have kind of Siamese network.</p>
  
  <p>One take from the <a href="http://www.wildml.com/2015/09/recurrent-neural-networks-tutorial-part-1-introduction-to-rnns/" rel="nofollow noreferrer">source of the image</a>:</p>
  
  <blockquote>
    <p>Unlike a traditional deep neural network, which uses different parameters at each layer, a RNN shares the same parameters (U, V, W above) across all steps. This reflects the fact that we are performing the same task at each step, just with different inputs. This greatly reduces the total number of parameters we need to learn.</p>
  </blockquote>
  
  <p>Sounds familiar to siamese network used on single-object tracking: there we take two signals (image and the tracked object), drive it through <em>identical</em> paths and make some maths to get results. Just something the RNN makes to time separated values!</p>
  
  <p>For proof of similarity, a take from a <a href="https://medium.com/@reachraktim/object-tracking-with-siamese-networks-and-detectron2-572e04dac547" rel="nofollow noreferrer">site where siamese networks are nicely explained</a>:</p>
  
  <p><a href="https://i.sstatic.net/tEZBm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tEZBm.png" alt="enter image description here"></a></p>
  
  <p><strong>Side note:</strong> <em>I don't know then, how closely those relate in real world (could a Siamese network in anyway be a RNN or vice versa), but supposedly so, because the comparison is made by researcher to say so. At diagrammatic level at least there would be no problem on that.</em></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-03T16:18:50.443Z
Answers.LastActivityDate: 2020-05-03T16:18:50.443Z
Answers.UserDisplayName: mico
Body: <blockquote>
    <p>"Single-object tracking commonly uses <strong>Siamese networks, which can be seen as an RNN</strong> unrolled over two time-steps."</p>
  </blockquote>
  
  <p><a href="https://arxiv.org/abs/1806.01794" rel="nofollow noreferrer">(from the SQAIR paper)</a></p>
  
  <p>I'm wondering how Siamese networks can be viewed as RNNs, as mentioned above. A diagrammatic explanation, or anything that helps understand the same, would help! Thank you!</p>
  
Tags: <neural-networks><recurrent-neural-networks><papers>
Title: How can Siamese Networks be viewed as RNNs?
UserDisplayName: stoic-santiago
ThreadText: # How can Siamese Networks be viewed as RNNs?
  
  (Asked by: username_0 on 2020-04-30)
  
  > "Single-object tracking commonly uses **Siamese networks, which can be seen as an RNN** unrolled over two time-steps."
  
  [(from the SQAIR paper)](https://arxiv.org/abs/1806.01794)
  
  I'm wondering how Siamese networks can be viewed as RNNs, as mentioned above. A diagrammatic explanation, or anything that helps understand the same, would help! Thank you!
  
  **Tags:** neural-networks, recurrent-neural-networks, papers
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2020-05-03. Score: 2 | Accepted answer
  
  [![RNN structure](https://i.sstatic.net/mlDSR.png)](https://i.sstatic.net/mlDSR.png)
  
  Well, here in the picture we have the unrolled or unfold RNN on the right side. Siamese network is formed when it is said to be "unrolled over two time-steps". So, take part where there is two first iterations of RNN and yes, you have kind of Siamese network.
  
  One take from the [source of the image](http://www.wildml.com/2015/09/recurrent-neural-networks-tutorial-part-1-introduction-to-rnns/):
  
  > Unlike a traditional deep neural network, which uses different parameters at each layer, a RNN shares the same parameters (U, V, W above) across all steps. This reflects the fact that we are performing the same task at each step, just with different inputs. This greatly reduces the total number of parameters we need to learn.
  
  Sounds familiar to siamese network used on single-object tracking: there we take two signals (image and the tracked object), drive it through *identical* paths and make some maths to get results. Just something the RNN makes to time separated values!
  
  For proof of similarity, a take from a [site where siamese networks are nicely explained](https://medium.com/@reachraktim/object-tracking-with-siamese-networks-and-detectron2-572e04dac547):
  
  [![enter image description here](https://i.sstatic.net/tEZBm.png)](https://i.sstatic.net/tEZBm.png)
  
  **Side note:** *I don't know then, how closely those relate in real world (could a Siamese network in anyway be a RNN or vice versa), but supposedly so, because the comparison is made by researcher to say so. At diagrammatic level at least there would be no problem on that.*
  
  
  ---
  
  ### Answer by username_1 on 2020-05-04. Score: 0
  
  Single object tracking using a Siamese Network is a Detect and compare approach, where an object of interest is detected and the one to be tracked is passed through a siam network with next consecutive frame to get a correlation between them, if you look at the related [reference](https://arxiv.org/abs/1704.06036), it is a correlation-based tracking, ie. correlation between objects detected in one frame and the ones detected in next frame, which you can imagine as samples considered across 2 timesteps or an RNN unrolled to 2 timesteps
  
  
  ---
  
  