Giter Site home page Giter Site logo

giqa's Introduction

GIQA: Generated Image Quality Assessment

This is the official pytorch implementation of ECCV2020 "GIQA: Generated Image Quality Assessment" (https://arxiv.org/abs/2003.08932). The major contributors of this repository include Shuyang Gu, Jianmin Bao, Dong Chen, Fang Wen at Microsoft Research Asia.

Introduction

GIQA aims to solve the problem of quality evaluation of a single generated image. In this source, we release the code of our GMM-GIQA and KNN-GIQA which are convenient to use.

Citation

If you find our code helpful for your research, please consider citing:

@article{gu2020giqa,
  title={GIQA: Generated Image Quality Assessment},
  author={Gu, Shuyang and Bao, Jianmin and Chen, Dong and Wen, Fang},
  journal={arXiv preprint arXiv:2003.08932},
  year={2020}
} 

Getting Started

Prerequisite

  • Linux.
  • Pytorch 1.0.0.
  • CUDA9.2 or 10.

Running code

  • Download pretrained models here. We provide the LSUN-cat GMM model with PCA95 in this link, if you need more models, please contact me.

  • Extract features:

    python write_act.py path/to/dataset --act_path path/to/activation --pca_rate pca_rate --pca_path path/to/pca --gpu gpu_id
    
  • Get KNN-GIQA score:

    python knn_score.py path/to/test-folder --act_path path/to/activation --pca_path path/to/pca --K number/of/nearest-neighbor --output_file output/file/path --gpu gpu_id
    
  • Get GMM-GIQA score:

    first build the GMM model:

    python get_gmm.py --act_path path/to/activation --kernel_number number-of-Gaussian-components --gmm_path path/to/gmm
    

    then get the GMM-GIQA score:

    python gmm_score.py path/to/test-folder --gmm_path path/to/gmm --pca_path path/to/pca --ourput_file output/file/path --gpu gpu_id
    
  • For all these running bash, if we do not use PCA (such as FFHQ), just remove the pca_rate and pca_path options.

LGIQA dataset

  • The LGIQA dataset contains three sub-dataset, named LGIQA-FFHQ, LGIQA-cat, LGIQA-cityscapes. You can download the cat and cityscapes sub-dataset here. For security reason, if you need LGIQA-FFHQ dataset, please contact me.

Reference

pytorch-fid

giqa's People

Contributors

cientgu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.