输入由于色彩精度不够存在色带的图片,返回去除色带后的图片。模型使用RealESRAGN网络结构进行训练,能实现较好的去除色带效果。
在Debanding数据集的基础之上,采用RealESRGAN的网络结构进行训练。
模型结构
采用ESRGAN的基本结构,具体如下:
适用于因色彩精度不够导致色带的图像,能将色带去除。
在ModelScope框架上,提供存在色带的图片,即可以通过简单的Pipeline调用来使用图像去色带模型。
import cv2
from modelscope.outputs import OutputKeys
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
debanding = pipeline(Tasks.image_debanding, model='damo/cv_rrdb_image-debanding')
result = debanding('https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/image_debanding.png')
cv2.imwrite('result.png', result[OutputKeys.OUTPUT_IMG])
使用随机精度的量化降质方式虽然能模拟banding,但banding的成因有很多,例如压缩噪声等。该种降质方式并不能完全消除模拟数据与真实数据之间的domain gap,因此可能存在修复无效或产生瑕疵的情形。
数据集:HD Images Dataset with Banded and NonBanded region Information
https://github.com/akshay-kap/Meng-699-Image-Banding-detection
该数据集收集了一批高清数据,并使用随机精度对8bit图像进行量化,每一张图像都被手工标记出了 banded 区域和 nonbanded 区域:
Metric | Set5 |
---|---|
PSNR | 37.3941 |
SSIM | 0.9614 |
niqe | 5.0658 |
@inproceedings{DeepBandingIndex,
author = {A. Kapoor, J. Sapra and Z. Wang},
title = {Capturing banding in images: database construction and objective assessment},
booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
date = {2021}
}
@inproceedings{wang2021realesrgan,
author = {Xintao Wang and Liangbin Xie and Chao Dong and Ying Shan},
title = {Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data},
booktitle = {International Conference on Computer Vision Workshops (ICCVW)},
date = {2021}
}