---
title: cv_rrdb_image-debanding
canonical_url: "https://www.modelscope.cn/models/iic/cv_rrdb_image-debanding"
md_url: "https://www.modelscope.cn/models/iic/cv_rrdb_image-debanding.md"
repository: iic/cv_rrdb_image-debanding
chinese_name: "RealESRGAN图像去色带"
last_updated: 2023-02-17
license: "Apache License 2.0"
pipeline_tag: image-debanding
tasks:
  - image-debanding
model_type:
  - RealESRGAN
library_name:
  - pytorch
frameworks:
  - pytorch
domain:
  - cv
downloads: 1001
stars: 7
tags:
  - image-debanding
  - "image debanding"
  - RealESRGAN
---

# cv_rrdb_image-debanding

> cv_rrdb_image-debanding - iic 在 ModelScope 开源的模型。输入由于色彩精度不够存在色带的图片，返回去除色带后的图片。模型使用RealESRAGN网络结构进行训练，能实现较好的去除色带效果。

iic/cv_rrdb_image-debanding 是 ModelScope 魔搭社区上的image-debanding模型，采用 Apache License 2.0 许可。

- **Repository**: iic/cv_rrdb_image-debanding
- **License**: Apache License 2.0
- **Tasks**: image-debanding
- **Tags**: image-debanding, image debanding, RealESRGAN
- **Downloads**: 1001
- **Stars**: 7
- **Last updated**: 2023-02-17

Source: https://www.modelscope.cn/models/iic/cv_rrdb_image-debanding

---

# 图像去色带介绍

输入由于色彩精度不够存在色带的图片，返回去除色带后的图片。模型使用RealESRAGN网络结构进行训练，能实现较好的去除色带效果。

## 模型描述

在Debanding数据集的基础之上，采用RealESRGAN的网络结构进行训练。

**模型结构**

采用ESRGAN的基本结构，具体如下：

<img src="data/real-esrgan.png">

## 期望模型使用方式以及适用范围

适用于因色彩精度不够导致色带的图像，能将色带去除。

### 如何使用

在ModelScope框架上，提供存在色带的图片，即可以通过简单的Pipeline调用来使用图像去色带模型。

#### 代码范例

```python
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 区域：

<img src="data/dataset.png">

## 模型训练流程

### 预处理

### 训练

## 数据评估及结果

| Metric |  Set5  | 
|:------:|:------:|
| PSNR   | 37.3941 | 
| SSIM   | 0.9614 | 
| niqe   | 5.0658 | 

### 相关论文以及引用信息

```BibTeX
@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}
}
```

```BibTeX
@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}
}
```
