GithubHelp home page GithubHelp logo

archimickey / pl_srgan Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 2.81 MB

An implementation of srgan in pytorch with pytorch lightning

Python 1.12% Jupyter Notebook 98.88%
deep-learning pytorch srgan srgan-pytorch super-resolution

pl_srgan's Introduction

Introduction

This is an implementation of SRGAN with pytorch lightning. I code this for learning pytorch lightning and SRGAN.

How to use

Environment setup

You can install the conda environment with environment.yml provided. Command:

conda env create -f environment.yml

Dataset

Eventually I used Flickr2K and DIV2K dataset to train my model. Additionally, I used VOC2012 and DIV2K to debug my model. You can link your dataset directory inside dataset. After that, add dataset/{PATH} in the config yaml file.

Training

In my project, I followed the training methods from the original paper. I trained my model with learning rate 1e-4 for 1e5 update iterations followed by 1e-5 for 1e5 update iterations.

Results

result_img image: Set14_005
upscale factor: 4
ssim: 0.7730
psnr: 22.9948
You can access my model from my google drive.

Train your own model

In src/config, you can edit or create your own config yaml file. This project uses hydra to enable training configuration with yaml. The debug.yaml is for testing your environment.
After you have your own config yaml file, you can run my code with command:

python train.py --config-name {CONFIG_NAME}

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.