Down-Sampling Based Video Coding with Degradation-aware Restoration-Reconstruction Deep Neural Network (TIP’2021 - MMM’2020)

Man M. Ho, Gang He, Zheng Wang, and Jinjia Zhou.


Date News
2021/01/10 Our extended work has been accepted to and published in TIP’2021 (Open Access)
2020/07/05 We have updated the evaluation code for RR-DnCNN and RR-DnCNN v2.0
2020/01/12 Our RR-DnCNN will be published together with its version 2.0 at once
2020/01/07 We won Best Paper Runner-up Award at MMM’2020
2019/09/24 Our work has been accepted to MMM’2020 (Oral)


Down-Sampling Based Video Coding with Degradation-aware Restoration-Reconstruction Deep Neural Network
Minh-Man Ho, Gang He, Zheng Wang, and Jinjia Zhou
In International Conference on Multimedia Modeling (MMM), 2020.

RR-DnCNN v2.0: Enhanced Restoration-Reconstruction Deep Neural Network for Down-Sampling Based Video Coding
(Open Access)
Man M. Ho, Jinjia Zhou, and Gang He
In IEEE Transactions on Image Processing (TIP), 2021.


Getting Started.

Let’s reproduce our result.

1. Clone this repo:

git clone
cd rrdncnn

2. Prepare data:

Since the files are large, URLs here need your confirmation; otherwise, just run the command lines with recursion ‘-r’.

+ Johnny 1280x720 in Class E (65 MB) compressed using Low Delay P (recommended).

wget --no-check-certificate -r '' -O ./data/
unzip -o ./data/ -d ./data/



+ BasketballDrill 832x480 in Class C (384 MB) compressed using All Intra (optional).

wget --no-check-certificate -r '' -O ./data/
unzip -o ./data/ -d ./data/



The expected data structure (for Johnny 1280x720 compressed by HEVC 16.20 with Low Delay P - LDP) is as:

│   DHR_LDP.csv (HEVC on HR as <video_name>,<bir-rate kbps>, <Y-PSNR>, <U-PSNR>, <V-PSNR>, <YUV-PSNR>)
│   DLR_LDP.csv (HEVC on LR as <video_name>,<bir-rate kbps>, <Y-PSNR>, <U-PSNR>, <V-PSNR>, <YUV-PSNR>)
│   DHR_LDP_QP[32-47].txt (HEVC running logs)
|   DLR_LDP_QP[32-47].txt (HEVC running logs)
└───DLR_LDP_QP[32-47] (Decoded Low-Resolution)
│   │   Johnny_1280x720_50.yuv
└───HR (Uncompressed High-Resolution)
│   │   Johnny_1280x720_50.yuv
└───LR (Uncompressed Low-Resolution down-sampled x2 by bicubic)
│   │   Johnny_1280x720_50.yuv

3. Run models:

CUDA_VISIBLE_DEVICES=0 python --vin <path/to/class/folder> --ckpt <path/to/model> --size <video_size HxW> --decoder_folder <folder/contains/videos> --log_dir ./logs/

For example:

+ Run with RR-DnCNN.

CUDA_VISIBLE_DEVICES=0 python --vin ./data/class_e/ --ckpt ./models/rrdncnn.pth.tar --size 360x640 --decoder_folder DLR_LDP_QP32

+ Run with RR-DnCNN v2.0.

CUDA_VISIBLE_DEVICES=0 python --vin ./data/class_e/ --ckpt ./models/rrdncnn_v2.pth.tar --size 360x640 --decoder_folder DLR_LDP_QP32

+ Run with our prepared script.



After running, you will get the results as follows:

+ <path/to/class/folder> or <args.out>/<model>_SDLR_<configuration>_<QP> (Folder contains reconstructed videos)
+ <args.log_dir>/<configuration>_<model>.csv (CSV file contains quantitative results)

Beside printing, we also export the results in CSV to log_dir for copying/pasting, where the columns (left-to-right) in the CSV file represent:




Finally, we calculate the BD-rates based on the results of HEVC (attached in the class package) and our methods. The expected output on Johnny (LDP) and BasketballDrill (AI) should be:

Sequence_QP HEVC 16.20 Low Bit-rate (kbps) RR-DnCNN RR-DnCNN v2.0
Bit-rate (kbps) PSNR (dB) PSNR BD-BR (%) PSNR (dB) BD-BR (%)
Johnny_1280x720_50.yuv_32 87.7059 38.9999 34.4353 35.0897 -12.9307 35.4468 -15.8121
Johnny_1280x720_50.yuv_37 46.9529 36.7226 18.9812 33.4981 33.6468
Johnny_1280x720_50.yuv_42 25.5059 34.1018 11.4706 31.2232 31.3090
Johnny_1280x720_50.yuv_47 14.9129 31.5612 7.0847 28.7739 28.8354
BasketballDrill_832x480_50.yuv_32 1833.6642 35.4191 685.0295 31.0428 -10.9197 31.0627 -12.4616
BasketballDrill_832x480_50.yuv_37 1018.0177 32.7758 392.1459 29.2932 29.365
BasketballDrill_832x480_50.yuv_42 559.657 30.1624 208.8544 26.9593 27.0212
BasketballDrill_832x480_50.yuv_47 277.0484 27.5161 97.052 24.7342 24.7411

Let’s check our pre-run version (26 KB) for more details.

wget '' -O ./logs/
unzip -o ./logs/ -d ./logs/




Please cite this work if you find it useful.

  title={RR-DnCNN v2.0: Enhanced Restoration-Reconstruction Deep Neural Network for Down-Sampling-Based Video Coding},
  author={Ho, Man M and Zhou, Jinjia and He, Gang},
  journal={IEEE Transactions on Image Processing},


This repository (as well as its materials) is for non-commercial uses and research purposes only.


Thank G. Bjontegaard and S. Pateux for ETRO’s Bjontegaard Metric Implementation.

G. Bjontegaard, Calculation of average PSNR differences between RD-curves (VCEG-M33)
S. Pateux, J. Jung, An excel add-in for computing Bjontegaard metric and its evolution

This work is supported by JST, PRESTO Grant Number JPMJPR1757 Japan.


If you have any questions, or the use of material violates your copyright / license, please contact me