AndreGuo / HDRTVDM

The official repo of "Learning a Practical SDR-to-HDRTV Up-conversion using New Dataset and Degradation Models" in CVPR2023.
Mozilla Public License 2.0
42 stars 3 forks source link

About the code of other 3 metrics #8

Closed jchhuang closed 1 week ago

jchhuang commented 3 months ago
          It's now released, plz check.

Originally posted by @AndreGuo in https://github.com/AndreGuo/HDRTVDM/issues/3#issuecomment-1590883296 Dear author, a total of 7 metrics are mentioned on your paper, however only 4 implementation of them are posted on this repo, may you share the code of other 3 metrics

AndreGuo commented 1 week ago
          It's now released, plz check.

Originally posted by @AndreGuo in #3 (comment) Dear author, a total of 7 metrics are mentioned on your paper, however only 4 implementation of them are posted on this repo, may you share the code of other 3 metrics

Other 3 metrics manifest the overall style of HDR/WCG image, they are easy to implement, see below:

ALL (Average Luminance Level):

  1. Compute luminance Y form PQ non-linear RGB value using: Y=0.2627*R+0.6780*G+0.0593*B;
  2. Normalize Y to [0,1];
  3. Apply PQ EOTF to convert non-linear Y to linear Y (luminance);
  4. Average over all pixels to get average luminance (ALL);

ASL (Average Saturation Level):

  1. Convert PQ non-linear RGB value to ICtCp (How to conver: see ITU-R BT.2100, Dolby ICtCp Whitepaper or Python package like colour);
  2. Take Ct and Cp as color components, Ct-Cp as chrominance plane, the saturation is defined as the distance between achromatic [0,0] and [Ct,Cp] of current pixel (Ct^2 + Cp^2)^0.5;
  3. Average over all pixels to get average saturation (ASL);
  4. NOTE THAT: Ct-Cp saturation is only for PQ HDR/WCG, and for SDR image we usually use Cb-Cr in YCbCr to calculate saturation.

HDRBQ:

The implementation of HDRBQ in our paper is not official, we are no longer using it. We recommend using key and contrast as new style metrics, like in our new paper.

You can find the definition of key and contrast in Tab.2 of this paper.