To construct the metric space with UDEM, we propose a metric learning pipeline, as illustrated in Fig. REF .
Given the HR image \(\mathbf {I}_{HR}\) , we first corrupt it with complex and high-order degradations as [1]} to simulate the real-world degraded images.
To train the metric space, we generate two groups of samples – the contrast group \(\mathbf {g}_{c}\)  and anchor group \(\mathbf {g}_{a}\) .
\(\mathbf {g}_{c}\)  is used to model the distance in the metric space by comparing the sample distance among this group, and \(\mathbf {g}_{a}\)  is to normalize the distribution of the metric space.
Concretely, there are three samples in the contrast group \(\mathbf {g}_{c}=\lbrace  \mathbf {c}_1, \mathbf {c}_2, \mathbf {c}_3 \rbrace \) , in which \(\mathbf {c}_1\)  has larger Gblur degradation than \(\mathbf {c}_2\) , and \(\mathbf {c}_3\)  has larger Gnoise degradation than \(\mathbf {c}_2\) . There are two samples in the anchor group \(\mathbf {g}_{a}=\lbrace  \mathbf {a}_1, \mathbf {a}_2\rbrace \) . \(\mathbf {a}_1\)  has the maximal Gnoise degradation and Gblur degradation, and \(\mathbf {a}_2\)  does not have any Gnoise degradation and Gblur degradation. Correspondingly, there are two groups of degradation scores generated as:
\(\lbrace  [S_{cn}^{1}, S_{cb}^{1}], [S_{cn}^{2}, S_{cb}^{2}], [S_{cn}^{3}, S_{cb}^{3}] \rbrace  &= \mathcal {F}_{UDEM}(\lbrace  \mathbf {c}_1, \mathbf {c}_2, \mathbf {c}_3 \rbrace ) \\\lbrace [S_{an}^{1}, S_{ab}^{1}], [S_{an}^{2}, S_{ab}^{2}]\rbrace  &= \mathcal {F}_{UDEM}(\lbrace  \mathbf {a}_1, \mathbf {a}_2\rbrace ),\) 
