Skip to content

Commit 5b7c4df

Browse files
authored
Update README.md
1 parent cb52dff commit 5b7c4df

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# MSSIM.pytorch
22

3+
$$
4+
\begin{align}
5+
l(\mathbf{x}, \mathbf{y}) & = \frac{2\mu_x\mu_y+C_1}{\mu_x^2+\mu_y^2+C_1}, C_1=(K_1L)^2, K_1=0.01, \\
6+
c(\mathbf{x}, \mathbf{y}) & = \frac{2\sigma_{x}\sigma_{y}+C_2}{\sigma_x^2+\sigma_y^2+C_2}, C_2=(K_2L)^2, K_2=0.02, \\
7+
s(\mathbf{x}, \mathbf{y}) & = \frac{\sigma_{xy}+C_3}{\sigma_x\sigma_y+C_3}, C_3=C_2/2, \\
8+
\text{SSIM}(\mathbf{x}, \mathbf{y}) & = [l(\mathbf{x}, \mathbf{y})]^\alpha \cdot [c(\mathbf{x}, \mathbf{y})]^\beta \cdot [s(\mathbf{x}, \mathbf{y})]^\gamma \\
9+
& = \frac{(2\mu_x\mu_y+C_1)(2\sigma_{xy}+C_2)}{(\mu_x^2+\mu_y^2+C_1)(\sigma_x^2+\sigma_y^2+C_2)}, \\
10+
& \alpha=\beta=\gamma=1, \\
11+
\text{MS-SSIM}(\mathbf{x}, \mathbf{y}) & = [l(\mathbf{x}, \mathbf{y})]^{\alpha \cdot M} \cdot \prod^{M}_{j=1} [c_j(\mathbf{x}, \mathbf{y})]^{\beta_j} \cdot [s_j(\mathbf{x}, \mathbf{y})]^{\gamma_j}, (M=5) \\
12+
& \beta_1=\gamma_1=0.0448, \\
13+
& \beta_2=\gamma_2=0.2856, \\
14+
& \beta_3=\gamma_3=0.3001, \\
15+
& \beta_4=\gamma_4=0.2363, \\
16+
& \alpha_5=\beta_5=\gamma_5=0.1333.
17+
\end{align}
18+
$$
19+
320
A better pytorch-based implementation for the mean structural similarity (MSSIM).
421

522
Compared to this widely used implementation: <https://github.com/Po-Hsun-Su/pytorch-ssim>, I further optimized and refactored the code.

0 commit comments

Comments
 (0)