Skip to content

MalinaNeag/SharpifyAI_Image_Enhancement_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SharpifyAI — Modular AI Image Enhancement

Frontend Backend AI Stack Inference Storage Authentication

SharpifyAI Preview

💡 What is SharpifyAI?

SharpifyAI is a full-stack web application designed to enhance low-quality images by applying AI super-resolution techniques selectively across distinct image regions: faces, backgrounds, and text.

Unlike traditional tools that apply a uniform model to the whole image, SharpifyAI performs semantic segmentation to isolate and enhance each region using a dedicated model:

  • 🧑‍🦰 GFPGAN for facial restoration
  • 🌄 Real-ESRGAN for background enhancement
  • 🔤 TextBSR for improving text clarity

Built using React (frontend), Flask (backend), Firebase Authentication, AWS S3, and integrated with Gradio/Colab for GPU-powered AI inference.

✨ Key Features

  • 🖼️ Upload images and choose which regions to enhance (face / background / text)
  • 🔍 Compare original vs enhanced results directly in-browser
  • 📥 Download final high-resolution outputs
  • 📱 Full support for desktop and mobile interfaces
  • 📊 Evaluated with PSNR, SSIM, LPIPS, ΔE₀₀, OCR confidence, and more

⚙️ Step-by-Step Setup Guide

🧠 Step 1: Run the Colab Notebook

  1. Open SharpifyAI.ipynb in Google Colab
  2. Run all cells (GPU must be enabled)
  3. Copy the generated Gradio URL generated by the last cell (e.g., https://xxxx.gradio.live)
  4. Paste it into both .env files as GRADIO_URL

📂 Step 2: Clone the Repository

git clone https://github.com/MalinaNeag/SharpifyAI_Image_Enhancement_Project.git
cd SharpifyAI_Image_Enhancement_Project

🌍 Step 3: Set Up Environment Variables

Create two .env files: one in image-enhancement-frontend/ and one in image-enhancement-backend/.

Frontend .env

# Firebase
REACT_APP_FIREBASE_API_KEY=
REACT_APP_FIREBASE_AUTH_DOMAIN=
REACT_APP_FIREBASE_PROJECT_ID=

# Backend & Gradio
REACT_APP_BACKEND_URL=http://127.0.0.1:5000
REACT_APP_GRADIO_URL=https://your-gradio-link.gradio.live

# AWS
REACT_APP_AWS_ACCESS_KEY_ID=
REACT_APP_AWS_SECRET_ACCESS_KEY=
AWS_BUCKET_NAME=
AWS_REGION=

Backend .env

# Flask security key
FLASK_SECRET_KEY=

# Google OAuth2 credentials (from Google Cloud Console)
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=http://127.0.0.1:5000/login/callback

# Firebase API key (can match frontend key)
FIREBASE_API_KEY=

# AWS credentials (from AWS IAM)
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_BUCKET_NAME=
AWS_REGION=

# Gradio URL from Colab
GRADIO_URL=https://your-gradio-link.gradio.live

🔑 Where to Get These Credentials

  • Firebase: Go to https://console.firebase.google.com → create a project → Project Settings → add a Web App → copy config to frontend .env
  • Google OAuth: Visit https://console.cloud.google.com → Credentials → create OAuth 2.0 Client ID (Web) → add redirect URI http://127.0.0.1:5000/login/callback → copy credentials to backend .env
  • AWS: Use IAM to create a user with S3 access → generate access keys → create an S3 bucket → add credentials to both .env files
  • Gradio: Open the Colab notebook → run all cells → copy the final Gradio URL → paste in both .env files

🚀 Step 4: Run the Backend

cd image-enhancement-backend
pip install -r requirements.txt
python app.py

🚀 Step 5: Run the Frontend

In a separate terminal:

cd image-enhancement-frontend
npm install
npm run start

📱 Mobile Support

This application is fully responsive and supports both desktop and mobile interfaces.

📁 Project Structure

SharpifyAI_Image_Enhancement_Project/
├── image-enhancement-backend/   # Flask API
├── image-enhancement-frontend/  # React App
├── SharpifyAI.ipynb             # Colab Notebooks
└── README.md

📚 License & Academic Use

This project was developed as part of a Bachelor Thesis and is intended for academic and educational use only.
All AI model integrations are sourced from publicly available pretrained repositories.

About

Modular AI pipeline for region-specific image enhancement using GFPGAN, Real-ESRGAN, and TextBSR

Topics

Resources

Stars

Watchers

Forks