This is the official Python Tensorflow implementations of our ICASSP 2021 paper "CAPTURING BANDING IN IMAGES: DATABASE CONSTRUCTION AND OBJECTIVE ASSESSMENT".
- 1. Brief Introduction
- 2. Dataset
- 3. Prerequisite
- 4. Relevant Source Codes
- 5. Codes for comparing models
- 6. Demo
The Deep Banding Index Paper introduces first of its kind dataset,
and an Objective Assesment of Banding quantification in HD images with Deep Banding Index, which aims to capture the annoyance caused to end users (QoE) as they percieve media featuring Banding Artifacts.
Banding, colour banding, or false contours is a common visual artifact appearing in images and videos, often in large regions of low textures and slow gradients such as sky. When the granularity of bit-depth or display intensity levels mismatches with the visual system’s perception of the smooth transition of color and luminance presented in the image content,the discontinuity positions in smooth image gradients are transformed into perceivable, wide, discrete bands. Banding significantly deteriorates the perceptual quality-of-experience(QoE) of end users. A visual example is shown in the image below where banding artifacts are clearly visible in the sky.
This work is completed as a research project at University of Waterloo, Under guidance of Dr.Zhou Wang and Jatin Sapra MEng.
The following results are obtained using the method described in Deep Banding Index Paper
Please cite our paper if you find our model or the Banding Patches Dataset, HD Images Dataset with Banded and NonBanded region Information dataset useful.
A. Kapoor, J. Sapra and Z. Wang, "Capturing banding in images: database construction and objective assessment," IEEE International Conference on Acoustics, Speech and Signal Processing, Jun. 2021.
- The Dataset is generated by extracting frames from more than 600 pristine high-definition (HD) videos, resulting in approximately 1,250+ images of 1920 x 1080 resolution. Banding distortion is be introduced by bit-depth reduction (or dynamic range tone mapping) in luma and chroma channels of image/ video (where bit-depth reduction can also leads to other perceptually visible artifacts).
- Six levels of quantization are used to enhance the diversity of the dataset, The generation of quantized image frames is explained in
Data Generation From Pristine Videos
- Download: The dataset is available on Zenodo under a Creative Commons Attribution license:
.
- This dataset features 1250+ HD images with their quantized version along with XML files which give information about these regions.
- refer python script:
Patches Generation from HD imagesfor understanding semi automatic labelling procedure, Also the image below illustrates the patches generation from HD images.

- Download: The dataset is available on Zenodo under a Creative Commons Attribution license:
- The Dataset features 169,501 patches of size 235x235. These patches were used to train a CNN classier which can be further used to obtain Deep Banding Index for a Banded Image. The Dataset folder features training, validation, and testing dataset, each such folder further contains banded and nonbanded patches.
- The distribution of patches in the dataset is explained as below:
The code has been tested on Ubuntu 18.04 and on Windows 10 with Python 3.8 and tensorflow 2.1
tensorflow-gpu=2.1, statistics, pandas, numpy, python 3.8 and OpenCV
- The Pretrained CNN Classifier model could be found in folder
pretrained_model
The Source folder contains the source files used for generating semi-automatic labelled dataset, CNN_classifier training files and prediction file which can be used for generating Deep Banding index for any image.
- XML to CSV: the mask generated for HD images of size 1920x1080 were stored in XML files, these XML files contain information about the rectangular masking coordinates. These rectangular masking coordinates were generated using
LabelImg.- Refer
XML_to_CSVfor the code used to convert XML files region infomation to CSV files.
- Refer
- Patches Generation: The patches are generated using heuristic rules from HD images and the obatined csv file about banded, non banded region information.
- CNN Classifier Training: The CNN Classifier is trained using the
Bannding Patches Dataset.- Refer
Training Scriptfor CNN_classifier Training for Banded vs NonBanded classification tasks.
- Refer
- Calculating Scores Using Deep Banding Index: Deep Banding Index is calculated using CNN_model Classifer and the methodology described in the
DBI paper.- Refer
Deep Banding Index Prediction Scriptfor using DBI for out of sample image.
- Refer
- Generating Banding Visualizations: The script
Deep Banding Map Generationexplains the working of Deep Banding Index by generating Deep Banding Maps for HD images.
refer MATLAB Scripts
Use this folder structure to calculate Deep Banding Index for your images, follow these steps to get Deep Banding Score for HD banded Images:
- Download
Demofolder. - Put the HD images in
Image Path Folder - Run
DBI Predict File, make sure you have the following dependencies on your device- [
Tensorflow 2.1, numpy, pandas, Open-CV], and you haveCNN_Banded Patch classiferin the same path as presented in Demo folder.
- [
- open the
CSV Result Fileto see the results associated with the HD images present in theImage Path Folder.