xindongzhang / ECBSR

Edge-oriented Convolution Block for Real-time Super Resolution on Mobile Devices, ACM Multimedia 2021

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About the ycbcr and quantization

JuZiSYJ opened this issue · comments

Hi, it is a good job to incorporate the Re-parameterization into SR model. I still have some questions about the code and paper.

  • In Section 2, Computation Reduction, the paper says

However, quantization of SR models often can hardly maintain the SR quality because of the precision requirement of pixel-wise prediction

The original RepVGG model does not perform well in quantization. How about the error of quantization in low-level Re-parameterization quantization? It seems that there is no further explanation or results for the quantization error in the paper.

  • Common SR models are trained on RGB channel and tested on Matlab version Y of YCbCr. However, in the provided code
    import skimage.color as sc

    lr_image, hr_image = sc.rgb2ycbcr(lr_image)[:, :, 0:1], sc.rgb2ycbcr(hr_image)[:, :, 0:1]

    How about the error between different versions of Ycbcr?
    Thanks!

Hi, it is a good job to incorporate the Re-parameterization into SR model. I still have some questions about the code and paper.

  • In Section 2, Computation Reduction, the paper says

However, quantization of SR models often can hardly maintain the SR quality because of the precision requirement of pixel-wise prediction

The original RepVGG model does not perform well in quantization. How about the error of quantization in low-level Re-parameterization quantization? It seems that there is no further explanation or results for the quantization error in the paper.

  • Common SR models are trained on RGB channel and tested on Matlab version Y of YCbCr. However, in the provided code

    import skimage.color as sc

    lr_image, hr_image = sc.rgb2ycbcr(lr_image)[:, :, 0:1], sc.rgb2ycbcr(hr_image)[:, :, 0:1]

    How about the error between different versions of Ycbcr?
    Thanks!

Hi, thanks for your interest to this work.
(1) The quantization for SR task is a big topic, as it is related to the topology of network, selection of operations and quantization methods(PTQ series, QAT series...), etc. If your want to performs int8-quantization of Re-parameterization for engineering purpose, it is highly suggested that you fold the rep-networks back into a plain-net before performing PTQ. It could introduce affordable errors from our experience, more details can be refered to "Real-Time Quantized Image Super-Resolution on Mobile NPUs, Mobile AI 2021 Challenge: Report". One more thing to be added, our quantization-tools (PTQ) for this work is coming soon.
(2) Common SR models are tested on Y channel out of YCbCr, and we follow this manner, more infos can be refer to the papers from FSRCNN/ESPCN etc. There are two implementation in this repo, one is on the legacy folder which is developed and tested based on the EDSR-Pytorch, the other is on the root folder of this project which is a more lighten one. Both of them behave almost the same.

Thanks a lot!