Giter VIP home page Giter VIP logo

powerqe's Introduction

PowerQE

This repository supports some quality enhancement approaches for compressed image/video based on PyTorch and MMEditing.

Image approaches:

Video approaches:

Content:

Resources:

Install dependency

MMEditing is a submodule of PowerQE. One can easily upgrade the MMEditing, and add their models to PowerQE without modifying the MMEditing repository. One should clone PowerQE along with MMEditing like this:

git clone --depth 1 --recurse-submodules --shallow-submodules\
 https://github.com/ryanxingql/powerqe.git

Install dependency:

  • environment.yml
  • PyTorch v1 + MMCV v1 + MMEditing v0

Please refer to the document for detailed installation.

Prepare data

mkdir data

Place your data like this:

powerqe/data
`-- {div2k,div2k_lq/bpg/qp37}
    `-- train
    `   `-- 0{001,002,...,800}.png
    `-- valid
        `-- 0{801,802,...,900}.png

Please refer to the document for detailed preparation.

Training

#chmod +x tools/dist_train.sh  # for the first time

conda activate pqe &&\
 CUDA_VISIBLE_DEVICES=0\
 PORT=29500\
 tools/dist_train.sh\
 configs/<config>.py\
 1\
 <optional-options>
  • Activate environment.
  • Use GPU 0.
  • Use port 29500 for communication.
  • Training script.
  • Configuration.
  • Use one GPU.
  • Optional options.

Optional options:

  • --resume-from <ckp>.pth: To resume the training status (model weights, number of iterations, optimizer status, etc.) from a checkpoint file.

Testing

#chmod +x tools/dist_test.sh  # for the first time

conda activate pqe &&\
 CUDA_VISIBLE_DEVICES=0\
 PORT=29510\
 tools/dist_test.sh\
 configs/<config>.py\
 work_dirs/<ckp>.pth\
 1\
 <optional-options>
  • Activate environment.
  • Use GPU 0.
  • Use port 29510 for communication.
  • Test script.
  • Configuration.
  • Checkpoint.
  • Use one GPU.
  • Optional options.

Optional options:

  • --save-path <save-folder>: To save output images.

Changelog

Version PyTorch MMEditing Video approaches
V3 V1 V0 Supported
V2 V1 V0 N/A
V1 V1 V0 N/A

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.