Skip to content

NoximityCollective/TagMyStockUpscaler

Repository files navigation

TagMyStockUpscaler

A native macOS app that uses Real-ESRGAN to upscale images with AI-powered enhancement. Built specifically for ARM-based Macs (Apple Silicon) with SwiftUI.

App Screenshot

Features

  • 🖼️ Drag & Drop Interface: Simply drag images into the app or use the file picker
  • 🚀 4x Upscaling: Uses Real-ESRGAN_x4plus model for high-quality image enhancement
  • 🎯 ARM Native: Optimized for Apple Silicon Macs (M1, M2, M3, etc.)
  • 💾 Export Options: Save upscaled images in PNG or JPEG format
  • 📱 Modern UI: Clean SwiftUI interface with progress tracking
  • 🔧 Auto Setup: Automatically downloads Real-ESRGAN if not installed

What is Real-ESRGAN?

Real-ESRGAN is a state-of-the-art AI model developed by researchers at Tencent ARC Lab that specializes in:

  • Upscaling low-resolution images to higher resolutions
  • Enhancing image quality and reducing artifacts
  • Working exceptionally well with photos, artwork, and illustrations
  • Maintaining sharp details while increasing image size

Research Paper: Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data

Requirements

  • macOS 12.0 or later
  • Apple Silicon Mac (M1/M2/M3) - recommended
  • Intel Mac - supported but may have different performance
  • Xcode 14+ (for building from source)

Installation

Option 1: Build from Source

  1. Clone this repository:
git clone https://github.com/yourusername/TagMyStockUpscaler.git
cd TagMyStockUpscaler
  1. Open TagMyStockUpscaler.xcodeproj in Xcode

  2. Build and run the project (⌘+R)

  3. The app will automatically guide you through setting up Real-ESRGAN on first launch

Option 2: Manual Real-ESRGAN Setup

If you prefer to set up Real-ESRGAN manually before running the app:

# Run the included setup script
./setup_realesrgan.sh

Or install via Homebrew:

brew install xinntao/real-esrgan/realesrgan-ncnn-vulkan

Usage

  1. Launch the App: Open TagMyStockUpscaler from Applications or Xcode
  2. Setup (First Time): If Real-ESRGAN isn't installed, follow the setup guide
  3. Upload Image: Drag & drop an image or click "Select Image"
  4. Upscale: Click "Upscale Image" and wait for processing
  5. Save: Click "Save Upscaled Image" to export the result

Supported Image Formats

Input: JPEG, PNG, TIFF, HEIC, WebP, and most common image formats Output: PNG, JPEG

Tips for Best Results

  • Photos: Works great with portraits, landscapes, and general photography
  • Artwork: Excellent for digital art, illustrations, and drawings
  • Screenshots: Perfect for enhancing low-resolution screenshots
  • Avoid: Very high-resolution images (may be slow), heavily compressed images

Technical Details

  • Model: Real-ESRGAN_x4plus (optimized for general images)
  • Upscaling Factor: 4x (can output at custom scales)
  • Backend: NCNN with Vulkan acceleration
  • Processing: Local processing (no internet required after setup)
  • Memory: Processes images in tiles to handle large images efficiently

Architecture

┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
│   SwiftUI App   │ -> │  ImageUpscaler   │ -> │ Real-ESRGAN     │
│                 │    │     Class        │    │   Executable    │
└─────────────────┘    └──────────────────┘    └─────────────────┘
  • ContentView.swift: Main UI with drag/drop and image display
  • ImageUpscaler.swift: Handles Real-ESRGAN integration and processing
  • SetupView.swift: Guides users through Real-ESRGAN installation

Troubleshooting

Real-ESRGAN Not Found

If you see "Real-ESRGAN not found":

  1. Use the automatic download in the app
  2. Run ./setup_realesrgan.sh manually
  3. Install via Homebrew (see installation section)

Permission Errors

macOS may ask for permission to run Real-ESRGAN:

  1. Go to System Preferences → Security & Privacy
  2. Allow the Real-ESRGAN executable to run
  3. Or right-click the executable and select "Open"

Slow Processing

If processing is slow:

  • Ensure you're on an Apple Silicon Mac for best performance
  • Try with smaller images first
  • Close other intensive applications

Memory Issues

For very large images:

  • The app uses tiling to process large images
  • If you encounter issues, try with smaller source images
  • Ensure you have sufficient free disk space

Performance

Processing times on M1 MacBook Pro (8GB RAM):

  • 512x512 image: ~5-10 seconds
  • 1024x1024 image: ~15-30 seconds
  • 2048x2048 image: ~60-120 seconds

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly on Apple Silicon
  5. Submit a pull request

License

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

Real-ESRGAN is licensed under the BSD 3-Clause License by Tencent ARC Lab.

Acknowledgments

  • Real-ESRGAN: xinntao/Real-ESRGAN - The amazing AI upscaling technology
  • NCNN: Tencent/ncnn - High-performance neural network inference framework
  • Apple: For the excellent SwiftUI framework and Apple Silicon performance

Support

If you encounter any issues:

  1. Check the troubleshooting section above
  2. Look at existing GitHub Issues
  3. Create a new issue with:
    • macOS version
    • Mac model (Intel/Apple Silicon)
    • Steps to reproduce
    • Error messages or screenshots

Made with ❤️ for the macOS community

About

MacOS App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published