Introduction of Equivariance

Background Introduction

Common Types of 2D Transformation

Translation

A translation moves an object to a different position on the screen. You can translate a point in 2D by adding translation coordinate \((t_x, t_y)\) to the original coordinate \(X\),\(Y\) to get the new coordinate \(X'\),\(Y'\).

Illustration of translation. [1]

From the above figure, we can write it as −

\[P’ = P + T\]

Rotation

In rotation, we rotate the object at particular angle \(\theta\) from its origin. From the following figure, we can see that the point \(P(X,Y)\) is located at angle \(φ\) from the horizontal \(X\) coordinate with distance \(r\) from the origin.

Let us suppose you want to rotate it at the angle \(θ\). After rotating it to a new location, you will get a new point \(P’(X',Y')\) .

Illustration of rotation. [1]

Using standard trigonometric the original coordinate of point \(P(X,Y)\) can be represented as −

\[X=rcosϕ\] \[Y=rsinϕ\]

Similarly, the \(P'(X', Y')\) can be represented as:

\[x′=xcosθ−ysinθ\] \[y′=xsinθ+ycosθ\]

Where R is the rotation matrix

\[R=\begin{bmatrix}cosθ & -sinθ \\ sinθ & cosθ\end{bmatrix}\]

Representing the above equation in matrix form,

\[P' = P \cdot R\]

Scaling

To change the size of an object, scaling transformation is used. In the scaling process, you either expand or compress the dimensions of the object. Scaling can be achieved by multiplying the original coordinates of the object with the scaling factor to get the desired result.

Let us assume that the original coordinates are \(X\),\(Y\), the scaling factors are \((S_X, S_Y)\), and the produced coordinates are \(X'\), \(Y'\). This can be mathematically represented as shown below −

\[X' = X \cdot S_X \text{ and } Y' = Y \cdot S_Y\]
Illustration of scaling. [1]

Reflection

Reflection is the mirror image of original object. In other words, we can say that it is a rotation operation with \(180°\). In reflection transformation, the size of the object does not change.

Illustration of (a) vertical reflection (b) horizontal reflection. [1]

Shear

A transformation that slants the shape of an object is called the shear transformation. There are two shear transformations X-Shear and Y-Shear. One shifts X coordinates values and other shifts Y coordinate values. However; in both the cases only one coordinate changes its coordinates and other preserves its values. Shearing is also termed as Skewing.

Illustration of shear transformation [1].

Pixel-wise(Image-level) 2D Transformation.

Some common type of 2D transformation for image.

Symmetric Group

\(𝑂(𝑛)\): General orthogonal group in dimension \(𝑛\).

\(S𝑂(𝑛)\): Special orthogonal group in dimension \(𝑛\).

\(𝐶_𝑛\): Cyclic group, a group generated by a single element.

\(𝐷_𝑛\): Dihedral group, including rotations and reflections.

An illustration of D_4 group.

Invariance

\[𝑓(𝑔(𝑥))=𝑓(𝑥)\]

Equivariance

\[𝑓(𝑔(x))=𝑔(𝑓(x))\]

Reference:

[1] https://www.tutorialspoint.com/computer_graphics/2d_transformation.htm




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Transformer Tutorial
  • Diffusion Model Tutorial
  • Displaying External Posts on Your al-folio Blog