Answers.Body: <p>I have tried to make it learn the affine transformation by giving it this as the label, and it works just fine. I'm really impressed and excited by capsule networks, and can't figure out why anyone didn't think of this before, because it's so obvious and simple. Spiking neurons also tell us that information between neurons can't be one dimensional only. It should be represented by Vectors of some kind.</p>
  
  <p>UPDATE:</p>
  
  <p>In the above comment I claim that it works "fine" when I make a capsule network learn the affine transformation by giving it this as the label. This is not true.. It doesn't work! - I'm sorry, I was too quick there.</p>
  
  <p>I assume the reason is that the affine 4x4 matrix representation is redundant. Also it is impossible to make sensible linear interpolations between such transformations, which will affect the gradient (it will not point in the direction of the minimum).</p>
  
  <p>What I have succeeded doing is to make the capsule network learn a quaternion (rotation) and a 3d vector (position) - 7 parameters in all. These can be contained in a 3x3 matrix, when fixing 2 of the parameters. But training is slow and the network cannot encode skews etc. in this 3x3 setup.</p>
  
  <p>Affine transformations from images using capsule networks (matrix capsules), can also be achieved by just making the network learn its own 4x4 pose representation through the decoder part. Then a small network can be trained to transform these poses into a 7d vector (quaternion and 3d vector), from which the affine 4x4 transformation obviously can be calculated. This I have also succeeded doing. It seems like the rotation encoded in the pose has a more quaternion-like nature, which makes sense.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-16T17:58:31.657Z
Answers.LastActivityDate: 2018-08-22T11:37:00.323Z
Answers.LastEditDate: 2018-08-22T11:37:00.323Z
Answers.UserDisplayName: Jens Overby
Answers.Body: <p>Great question, and one that I think we could have done a better job of answering in the paper. </p>
  
  <p>Essentially, the <em>pose matrix</em> of each capsule is set up so that it could learn to represent the affine transformation between the object and the viewer, but we are not restricting it to necessarily do that. So we talk about the output of a capsule as though it is an affine transformation matrix, but we can't ensure that it will be. We do things explicitly that make it more like such a matrix — like adding in the coordinates to the right-hand column — but we can't be sure. This somewhat embodies a large part of the capsule network theory — we set up scaffolding so that the network can learn to be equivalent to transformations that we think it ought to be invariant to, but we don't ensure that it is.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-01T16:48:37.360Z
Answers.Text: Don't you think having standard transformation is wrong? Principally, your proposed network in 2017 and 2018 actually learns an inverse transformation and not a direct transformation. Consequently, in the inversed matrix, it is possible that all entries have values.
Answers.UserDisplayName: Green Falcon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-04T21:03:31.600Z
Answers.LastActivityDate: 2020-06-09T15:12:11.507Z
Answers.LastEditDate: 2020-06-09T15:12:11.507Z
Answers.UserDisplayName: Nicholas Frosst
Body: <p>In traditional computer vision and computer graphics, the pose matrix is a <span class="math-container">$4 \times 4$</span> matrix of the form </p>
  
  <p><span class="math-container">$$
  \begin{bmatrix}
  r_{11}  &amp; r_{12}  &amp;  r_{12}   &amp; t_{1} \\
  r_{21}  &amp;  r_{22}   &amp; r_{22} &amp;   t_{2} \\
  r_{31}   &amp; r_{32}  &amp;  r_{32}  &amp;  t_{3} \\ 
  0   &amp;   0    &amp;  0   &amp;   1
  \end{bmatrix}
  $$</span></p>
  
  <p>and is a transformation to change viewpoints from one frame to another.</p>
  
  <p>In the <a href="https://openreview.net/pdf?id=HJWLfGWRb" rel="nofollow noreferrer">Matrix Capsules with EM Routing</a> paper, they say that the "pose" of various sub-objects of an object are encoded by each capsule lower layer. But from the procedure described in the paper, I understand that the pose matrix they talk about doesn't conform to the definition of the pose matrix. There isn't any restriction on keeping the form of the pose matrix shown above. </p>
  
  <ol>
  <li><p>So, is it right to use the word "pose" to describe the <span class="math-container">$4 \times 4$</span> matrix of each capsule?</p></li>
  <li><p>Moreover, since the claim is that the capsules learn the pose matrices of the sub-objects of an object, does it mean they learn the viewpoint transformations of the sub-objects, since the pose matrix is actually a transformation?</p></li>
  </ol>
  
Tags: <neural-networks><deep-learning><computer-vision><terminology><capsule-neural-network>
Title: Is the word "pose" used correctly in the paper "Matrix Capsules with EM Routing"?
UserDisplayName: bossman
ThreadText: # Is the word "pose" used correctly in the paper "Matrix Capsules with EM Routing"?
  
  (Asked by: username_0 on 2018-06-28)
  
  In traditional computer vision and computer graphics, the pose matrix is a $4 \times 4$ matrix of the form
  
  $$
  \begin{bmatrix}
  r\_{11} & r\_{12} & r\_{12} & t\_{1} \\
  r\_{21} & r\_{22} & r\_{22} & t\_{2} \\
  r\_{31} & r\_{32} & r\_{32} & t\_{3} \\
  0 & 0 & 0 & 1
  \end{bmatrix}
  $$
  
  and is a transformation to change viewpoints from one frame to another.
  
  In the [Matrix Capsules with EM Routing](https://openreview.net/pdf?id=HJWLfGWRb) paper, they say that the "pose" of various sub-objects of an object are encoded by each capsule lower layer. But from the procedure described in the paper, I understand that the pose matrix they talk about doesn't conform to the definition of the pose matrix. There isn't any restriction on keeping the form of the pose matrix shown above.
  
  1. So, is it right to use the word "pose" to describe the $4 \times 4$ matrix of each capsule?
  2. Moreover, since the claim is that the capsules learn the pose matrices of the sub-objects of an object, does it mean they learn the viewpoint transformations of the sub-objects, since the pose matrix is actually a transformation?
  
  **Tags:** neural-networks, deep-learning, computer-vision, terminology, capsule-neural-network
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2018-07-04. Score: 4 | Accepted answer
  
  Great question, and one that I think we could have done a better job of answering in the paper.
  
  Essentially, the *pose matrix* of each capsule is set up so that it could learn to represent the affine transformation between the object and the viewer, but we are not restricting it to necessarily do that. So we talk about the output of a capsule as though it is an affine transformation matrix, but we can't ensure that it will be. We do things explicitly that make it more like such a matrix — like adding in the coordinates to the right-hand column — but we can't be sure. This somewhat embodies a large part of the capsule network theory — we set up scaffolding so that the network can learn to be equivalent to transformations that we think it ought to be invariant to, but we don't ensure that it is.
  
  > **Comments:**
  > **username_3**: Don't you think having standard transformation is wrong? Principally, your proposed network in 2017 and 2018 actually learns an inverse transformation and not a direct transformation. Consequently, in the inversed matrix, it is possible that all entries have values.  
  
  ---
  
  ### Answer by username_1 on 2018-07-16. Score: 1
  
  I have tried to make it learn the affine transformation by giving it this as the label, and it works just fine. I'm really impressed and excited by capsule networks, and can't figure out why anyone didn't think of this before, because it's so obvious and simple. Spiking neurons also tell us that information between neurons can't be one dimensional only. It should be represented by Vectors of some kind.
  
  UPDATE:
  
  In the above comment I claim that it works "fine" when I make a capsule network learn the affine transformation by giving it this as the label. This is not true.. It doesn't work! - I'm sorry, I was too quick there.
  
  I assume the reason is that the affine 4x4 matrix representation is redundant. Also it is impossible to make sensible linear interpolations between such transformations, which will affect the gradient (it will not point in the direction of the minimum).
  
  What I have succeeded doing is to make the capsule network learn a quaternion (rotation) and a 3d vector (position) - 7 parameters in all. These can be contained in a 3x3 matrix, when fixing 2 of the parameters. But training is slow and the network cannot encode skews etc. in this 3x3 setup.
  
  Affine transformations from images using capsule networks (matrix capsules), can also be achieved by just making the network learn its own 4x4 pose representation through the decoder part. Then a small network can be trained to transform these poses into a 7d vector (quaternion and 3d vector), from which the affine 4x4 transformation obviously can be calculated. This I have also succeeded doing. It seems like the rotation encoded in the pose has a more quaternion-like nature, which makes sense.
  
  
  ---
  
  