Skip to content

Latest commit

 

History

History
133 lines (92 loc) · 3.98 KB

README.md

File metadata and controls

133 lines (92 loc) · 3.98 KB

MageAI - Image Upscaling with ESRGAN

License

MageAI is an advanced image upscaling web application powered by the Enhanced Super-Resolution Generative Adversarial Networks (ESRGAN). This application allows users to upload low-resolution images and receive high-resolution upscaled versions, leveraging state-of-the-art AI techniques.

Table of Contents


Overview

MageAI is designed for image upscaling and enhancement, specifically aimed at restoring details from low-resolution images. It uses ESRGAN (Enhanced Super-Resolution GAN) to improve image quality significantly by learning how to add high-frequency details lost in low-resolution images.

ESRGAN Example

ESRGAN has revolutionized image super-resolution by introducing Residual-in-Residual Dense Blocks (RRDB) and the Relativistic GAN framework. Read more about ESRGAN here.


Features

  • Upload: Upload an image (supports PNG, JPG, SVG, GIF).
  • Upscale: Uses ESRGAN for image upscaling.
  • Preview: View the upscaled image instantly.
  • Download: Download the upscaled image.

Technologies

This project is built with:

  • Frontend: React and Next.js
  • Styling: Tailwind CSS
  • Backend: FastAPI for handling image processing.
  • Machine Learning Model: ESRGAN for image upscaling.
  • Image Handling: Python's PIL library for image processing.
  • Deployment: Render for hosting both frontend and backend services.

Installation

To run this project locally, follow the steps below:

Prerequisites

Clone the repository

git clone https://github.com/PranavBhatP/Mage.ai.git
cd Mage.ai

Frontend Setup

  1. Navigate to the client/ folder:

    cd client
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

Backend Setup

  1. Navigate to the server/ folder:

    cd server
  2. Install dependencies (preferably in a virtual environment):

    pip install -r requirements.txt
  3. Run the FastAPI backend:

    uvicorn main:app --host 0.0.0.0 --port 8000

Usage

  1. Upload an Image: Upload your image (JPG, PNG, or GIF format).
  2. Upscale: Click the "Let's Go!" button to process the image using the backend ESRGAN model.
  3. Download the Image: Once processed, download your upscaled image.

image of website


Model Architecture

The backbone of this project is ESRGAN which improves upon the classic GAN by using:

  • RRDB (Residual-in-Residual Dense Block): Enables better learning and stability for high-res image generation.
  • Relativistic GAN: Helps the model better differentiate between real and generated high-resolution images.

Learn more about the architecture in the original ESRGAN paper.


References


License

This project is licensed under the MIT License - see the LICENSE file for details.