Giter Site home page Giter Site logo

b4go3s / swinir_wrapper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lin-sinorodin/swinir_wrapper

0.0 0.0 0.0 2.69 MB

Wrapper for "SwinIR: Image Restoration Using Swin Transformer", for easy usage as a package.

Python 3.19% Jupyter Notebook 96.81%

swinir_wrapper's Introduction

Wrapper for SwinIR

Based on this repository - the official PyTorch implementation of SwinIR: Image Restoration Using Swin Transformer.

About SwinIR and this repository:

  • SwinIR achieves state-of-the-art performance on six tasks: image super-resolution (including classical, lightweight and real-world image super-resolution), image denoising (including grayscale and color image denoising) and JPEG compression artifact reduction.
  • This repository only provides usage of the 3 image super-resolution tasks from SwinIR at the moment.
  • SwinIR.py is a minimal wrapper for the super resolution model, making it easy to use as a part from a bigger pipeline.
  • Only enables the usage of the pretrained weights from the model zoo. For training, see the official repo.
  • Uses the PyTorch model network_swinir.py from the official repo (unchanged).

How to Use

  • For easy usage on your own data, see Demo.ipynb. This notebook will be displayed best using Google Colab which supports more interactive usage:
Open In Colab
  • As a quick preview, this example demonstrates usage with only few lines:
    import cv2
    from SwinIR_wrapper import SwinIR_SR
    
    # initialize super resolution model
    sr = SwinIR_SR(model_type='real_sr', scale=4)
    
    # load low quality image
    img_lq = cv2.imread(path, cv2.IMREAD_COLOR)
    
    # feed the image to the SR model
    img_hq = sr.upscale(img_lq)

License and Acknowledgement

Please follow the license of the official repo of this paper. Thanks for their great work!

swinir_wrapper's People

Contributors

lin-sinorodin 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.