Skip to content

This is the official repository for the Deep Banding Index paper Implementation. I worked on this project as a graduate researcher under Dr. Zhou Wang. The research project resulted is in ICASSP 2021 Conference paper on Banding, CNN, and Data Science for Image Processing.

Notifications You must be signed in to change notification settings

akshay-kap/Meng-699-Image-Banding-detection

Repository files navigation

DBI (Deep Banding Index)

This is the official Python Tensorflow implementations of our ICASSP 2021 paper "CAPTURING BANDING IN IMAGES: DATABASE CONSTRUCTION AND OBJECTIVE ASSESSMENT".

1. Brief Introduction

The Deep Banding Index Paper introduces first of its kind datasetDOI, DOI 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.

1.1 Backgrounds

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.

1.2 Contributions

This work is completed as a research project at University of Waterloo, Under guidance of Dr.Zhou Wang and Jatin Sapra MEng.

1.3 Results

The following results are obtained using the method described in Deep Banding Index Paper

1.4 Citation

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.

2. Dataset

  • 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: DOI.
  • 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 images for 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: DOI
  • 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:

3. Prerequisites

3.1 Environment

The code has been tested on Ubuntu 18.04 and on Windows 10 with Python 3.8 and tensorflow 2.1

3.2 Packages

tensorflow-gpu=2.1, statistics, pandas, numpy, python 3.8 and OpenCV

3.3 Pretrained Models

4. Relevant Source Codes

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_CSV for the code used to convert XML files region infomation to CSV files.
  • 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 Script for CNN_classifier Training for Banded vs NonBanded classification tasks.
  • Calculating Scores Using Deep Banding Index: Deep Banding Index is calculated using CNN_model Classifer and the methodology described in the DBI paper.
  • Generating Banding Visualizations: The script Deep Banding Map Generation explains the working of Deep Banding Index by generating Deep Banding Maps for HD images.

5. Codes for comparing models

refer MATLAB Scripts

6. Demo

Use this folder structure to calculate Deep Banding Index for your images, follow these steps to get Deep Banding Score for HD banded Images:

About

This is the official repository for the Deep Banding Index paper Implementation. I worked on this project as a graduate researcher under Dr. Zhou Wang. The research project resulted is in ICASSP 2021 Conference paper on Banding, CNN, and Data Science for Image Processing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published