Giter Site home page Giter Site logo

kvignesh122 / image-enhancement Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 20 KB

Use AI to enhance and upscale your low-quality images: A Google Colab notebook to inference Real-ESRGAN model

License: BSD 3-Clause "New" or "Revised" License

Jupyter Notebook 100.00%
esrgan face-enhancement gfpgan image-enhancement image-processing image-restoration pytorch real-esrgan real-esrgan-gui super-resolution-image

image-enhancement's Introduction

Notebook for inferencing Real-ESRGAN and GFPGAN v1.4 to enhance images

Google Colab Model Zoo Face Enhancement

The State-of-the-Art (SOTA) models being used for this project:

1. Real-ESRGAN (Real Enhanced Super-Resolution Generative Adversarial Network)

  • As seen from the name, it is an enhanced version of the ordinary SRGAN model.
  • Can be used for both 2D and 360-degree images.
  • Adversarially-trained, so improves perceptual quality, and can generate more realistic/detailed textures.
  • Actual image enhancement is done with ESRGAN, and output image upscaling is done with LANCZOS4 resampling.
  • Preferable to run with GPU.

2. GFPGAN (Generative Facial Pre-trained Generative Adversarial Network) version 1.4

  • Used for face enhancement and restoration in 2d images.
  • Built on-top of StyleGAN2 model. More realistic facial expression reconstructions compared to previous models.
  • Can be appended into the Real-ESRGAN for general image restoration and run together.
  • Preferable to run with GPU.

Example

Original Real-ESRGANx2 Real-ESRGANx4 Real-ESRGANx4 +
GFPGAN Face Enhancement

One can choose between 2 options to enhance their image: a 2-layered NN version (RealESRGAN_x2plus.pth) or a 4-layered NN version (RealESRGAN_x4plus.pth). This means that the 4-layered model passes the original image through 4 layers of neural networks compared to the 2-layered model which only passes the original image through 2 layers of neural networks. A general rule will be that the more NN layers our image passes through means the enhancement is much more perfect. But at the same time, this means that running the x4layer model takes more time than the x2layer model.

*Note: If your image contains repeated textures or patters, using the 2-layers over the 4-layers may sometimes produce more satisfactory results.

View the Google Colab notebook for inferencing and enhancing your images here! Make a copy of it and get started! ๐Ÿ˜œ

image-enhancement's People

Contributors

kvignesh122 avatar

Stargazers

 avatar

Watchers

 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.