Bobholamovic / CNN-FRIQA

Convolutional Neural Network for Full-Reference color Image Quality Assessment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CNN-FRIQA

Convolutional Neural Network for Full-Reference color Image Quality Assessment

This is a lightweight version of deepIQA. The original project of deepIQA is here and the paper is here.

Environment and Dependencies

Ubuntu 16.04 64-bit, Visual Studio Code, Python 3.5.2, Pytorch 0.4.0

requirements.txt is not included yet.

Usage

Data Preparation

Now the data lists are stored in .json files. The relative paths of the distorted images and the reference images to data-dir and the quality scores (ground-truth values) are contained in three arrays of a json object, with the fields specified as img, ref, and score, respectively. For example, train_data.json may look like this:

{
  "img":
    [
      "distorted/img11_2_4.bmp", 
      "distorted/img6_3_3.bmp"
    ], 
  "ref":
    [
      "images/img11.bmp", 
      "distorted/img6.bmp"
    ], 
  "score":
    [
      0.5503, 
      0.4312
    ]
}

(this has been prettified as everthing actually on one line)

Also, there are val_data.json for validation subset and test_data.json for test subset. The lists are expected to be found at list-dir, which will be set to data-dir if not specified.

The scripts for data preparation on Waterloo and TID2013 are provided.

Running Code

Start from the root directory of this project,

cd src/

For training, try

python iqa.py train --resume pretrianed_model_path --data-dir DIR_OF_DATASET

If pretrained_model_path is not correctly specified, the model will learn from scratch.

Use

python iqa.py train --resume pretrianed_model_path | tee train.log

to dump logs.

For evaluation, try

python iqa.py train --evaluate --resume pretrained_model_path

For testing, try

python iqa.py test --resume pretrained_model_path

The code of testing the model on a single image is desired, yet to be provided.

As the patches are randomly extracted, there should be a random noise in the output of the model, which explains the slight difference of the performances upon different attempts.

Some pertrained models and the script to make filename lists are to be uploaded later.

Experiment and Performance

Roughly, the SROCC value reaches 0.95 or higher under the best condition.

The experiment results are to be added here.

Acknowledgement

With best thanks!

About

Convolutional Neural Network for Full-Reference color Image Quality Assessment

License:MIT License


Languages

Language:Python 93.7%Language:Shell 6.3%