A Django web application for advanced image processing using Real-ESRGAN AI super-resolution and computer vision techniques.
- AI Enhancer: Real-ESRGAN super-resolution with up to 4x upscaling
- Gamma CLAHE: Advanced gamma correction with CLAHE (Contrast Limited Adaptive Histogram Equalization)
- Shadow Fight: Shadow detection and brightness adjustment with adaptive enhancement
- Grayscale: Advanced grayscale conversion with multiple methods
- Python 3.11+
- macOS (Intel/Apple Silicon), Linux, or Windows
- 4GB+ RAM (8GB+ recommended for AI processing)
- 2GB+ free disk space
# Create virtual environment
python3.11 -m venv imgapp
source imgapp/bin/activate
# Install M1-optimized dependencies
pip install --upgrade pip setuptools wheel
pip install -r requirements-arm64.txt# Create virtual environment
python3.11 -m venv imgapp
# On Windows: imgapp\Scripts\activate
source imgapp/bin/activate
# Install standard dependencies
pip install --upgrade pip setuptools wheel
pip install -r requirements.txtFor automated setup, use the provided script:
chmod +x setup.sh
./setup.sh-
Clone the repository:
git clone <repository-url> cd image_editor
-
Create and activate virtual environment:
python3.11 -m venv imgapp source imgapp/bin/activate # On Windows: imgapp\Scripts\activate
-
Install dependencies:
# For Apple Silicon Macs pip install -r requirements-arm64.txt # For other systems pip install -r requirements.txt
-
Run Django migrations:
python manage.py makemigrations python manage.py migrate
-
Create media directories:
mkdir -p media/uploads media/processed
-
Download AI model (if not included):
# The RealESRGAN model will be downloaded automatically on first use # Or manually download to project root: wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth
-
Start the development server:
python manage.py runserver
-
Open in browser:
http://127.0.0.1:8000
- Upload Image: Drag & drop or click to browse and select an image
- Select Mode: Choose from AI Enhancer, Gamma CLAHE, Shadow Fight, or Grayscale
- Set Scale: For AI Enhancer, choose scale factor (1x-4x)
- Process: Click "Process Image" and wait for results
- Download: View the enhanced image and download when ready
POST /process/- Process uploaded imageGET /download/<uuid>/- Download processed image (expires in 2 hours)GET /modes/- Get available processing modes
- Django 5.2.1 - Web framework
- RealESRGAN - Real-world super-resolution
- Real-ESRGAN for the AI super-resolution model
- BasicSR for the super-resolution toolkit
- OpenCV for computer vision capabilities