Transform your images with AI-powered 4x super-resolution enhancement using ESRGAN (Enhanced Super-Resolution Generative Adversarial Network).
- Modern Minimalist UI - Elegant aesthetic design with clean typography
- 4x Super-Resolution - AI-powered upscaling using ESRGAN
- Auto-Resize - Automatically handles large images (up to 2000x2000px)
- Tile-Based Processing - Memory-efficient processing for any image size
- Fully Responsive - Works seamlessly on desktop, tablet, and mobile
- Real-Time Preview - See your image before enhancement
- Easy Download - One-click download of enhanced images
- Single Page Layout - No scrolling, everything visible at once
- Python 3.6 or higher
- PyTorch 1.9+
- OpenCV
- Flask 2.0+
- NumPy
git clone https://github.com/forex911/SuperX.git
cd SuperXpip install -r requirements.txtDownload the pre-trained ESRGAN model and place it in the models/ directory:
- Model:
RRDB_ESRGAN_x4.pth(~64MB) - Location:
models/RRDB_ESRGAN_x4.pth
python app.pyVisit http://127.0.0.1:5000 in your web browser.
SuperX/
├── app.py # Flask application (main backend)
├── RRDBNet_arch.py # ESRGAN model architecture
├── requirements.txt # Python dependencies
├── Procfile # Heroku deployment config
│
├── models/
│ ├── RRDB_ESRGAN_x4.pth # Pre-trained model (not in git)
│ └── README.md # Model information
│
├── static/
│ ├── landing.css # Landing page styles
│ ├── index.css # Upload page styles
│ ├── result.css # Results page styles
│ ├── uploads/ # Temporary uploaded images
│ └── results/ # Enhanced output images
│
└── templates/
├── landing.html # Landing page
├── index.html # Upload interface
└── result.html # Results display
- Visit Landing Page - Navigate to
http://127.0.0.1:5000 - Click "Start Enhancing" - Opens the upload interface
- Upload Image - Drag & drop or click to browse
- Automatic Processing - Image is enhanced automatically
- View Results - See before/after comparison
- Download - Click to download enhanced image
- Input: JPG, JPEG, PNG
- Output: PNG (lossless)
- Max File Size: 50MB
- Max Dimensions: Any size (auto-resized to 2000x2000 max)
| Input Size | Auto-Resized | Output Size | Processing Time |
|---|---|---|---|
| 500x500 | (no resize) | 2000x2000 | ~30 sec |
| 1000x1000 | (no resize) | 4000x4000 | ~1-2 min |
| 1500x1500 | (no resize) | 6000x6000 | ~3-4 min |
| 2000x2000 | (no resize) | 8000x8000 | ~5-7 min |
| 4000x6000 | 1333x2000 | 5332x8000 | ~3-4 min |
Note: Large images are automatically resized to fit within 2000x2000 while maintaining aspect ratio.
- Architecture: RRDB (Residual-in-Residual Dense Block)
- Framework: PyTorch
- Model: ESRGAN (Enhanced Super-Resolution GAN)
- Scale Factor: 4x upscaling
- Training: Pre-trained on DIV2K dataset
Tile-Based Algorithm:
- Images split into 256x256 pixel tiles
- 16-pixel overlap for seamless blending
- Each tile processed independently
- Memory-efficient for large images
- Tiles stitched together automatically
Device Support:
- GPU (CUDA): Automatic detection and usage
- CPU: Fallback mode (slower but functional)
- Processes one tile at a time
- Progressive memory release
- Row-by-row stitching
- Automatic garbage collection
- Typography: Cormorant Garamond (serif) + Inter (sans-serif)
- Colors: Cream, sage, charcoal - natural muted palette
- Layout: Generous white space, clean lines
- Animations: Smooth, slow transitions
- Inspiration: Editorial design, zen aesthetics
- Single-screen layout (no scrolling)
- Instant visual feedback
- Clear call-to-actions
- Progressive disclosure
- Mobile-first responsive design
FLASK_ENV=development # or production
FLASK_DEBUG=1 # Enable debug mode
SECRET_KEY=your-secret-key # Flask secret keyEdit app.py to customize:
# Maximum file size (default: 50MB)
app.config['MAX_CONTENT_LENGTH'] = 50 * 1024 * 1024
# Maximum input dimension (default: 2000px)
max_input_dimension = 2000
# Tile size for processing (default: 256px)
tile_size = 256
# Tile overlap (default: 16px)
overlap = 16- Create a Heroku app:
heroku create your-app-name- Push to Heroku:
git push heroku main- Open your app:
heroku openFROM python:3.10-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["python", "app.py"]"Out of memory" error:
- Solution: Use smaller images (under 1500x1500)
- Close other applications
- Images auto-resize, but very large images may still exceed memory
Slow processing:
- Normal on CPU (GPU is much faster)
- Processing time scales with image size
- Expected: 30 sec to 7 min depending on size
Image too large error:
- Should auto-resize now
- If still occurs, try images under 2000x2000
Model not found:
- Ensure
RRDB_ESRGAN_x4.pthis inmodels/directory - Download from official source
- Check file size (~64MB)
- Small images (500x500): 20-40 seconds
- Medium images (1000x1000): 1-2 minutes
- Large images (2000x2000): 5-7 minutes
- 10-20x faster than CPU
- Large images: 30-60 seconds
- Recommended for production
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- ESRGAN Model: Enhanced Super-Resolution Generative Adversarial Networks
- PyTorch: Deep learning framework
- Flask: Web framework
- OpenCV: Image processing library
- Fonts: Cormorant Garamond, Inter
For questions, issues, or suggestions:
- Open an issue on GitHub
- Contact: [forex911x@example.com]
- Batch image processing
- Multiple AI models (REAL-ESRGAN, SwinIR)
- Image comparison slider
- Progress bar during processing
- User accounts and history
- API endpoint for programmatic access
- Docker support
- GPU acceleration guides
- Quality vs. speed presets
- Image format conversion
Beautiful minimalist entrance with clear value proposition.
Drag & drop interface with instant preview.
Interactive slider comparison with instant high-res download.
Made with love using AI and Python
Transform your images with the power of deep learning.


