2025-04-07 16:46:52 EDT

M: I have old photos that were scanned in years ago and need to be cleaned up, focused, and basically improved using any now available filters or AI aid, I’m using Linux, I have gimp installed and would prefer not to use anything but freeware. Can you help me out?

G: TL;DR: Yes. Use GIMP with free plugins like G'MIC and external tools like Real-ESRGAN or Waifu2x (Linux-compatible) for upscaling and cleanup. It’s all free and works on Linux.


Here’s a streamlined path using free and Linux-friendly tools:

1. GIMP (You're Already Set)

Use this as your base editor. Add filters and plugins to enhance it.


2. Install G’MIC Plugin for GIMP

G’MIC (GREYC's Magic for Image Computing) is an all-in-one powerhouse for photo enhancement.

sudo apt install gmic gimp-gmic
  • Usage:


  • 3. Use Real-ESRGAN (for AI Upscaling & Cleanup)

    Great for AI enhancement, especially bringing back lost detail.


    4. Alternative: Waifu2x (for faster, simpler upscaling)

    Despite the name, it works well on old scans.


    5. Workflow Suggestion

    1. Run original through Real-ESRGAN or Waifu2x to upscale + denoise.
    2. Load result into GIMP.
    3. Use G'MIC filters to:
    4. Optionally use heal selection tool to remove blemishes.

    Want a one-command batch cleanup chain? I can help script that too.

    2025-04-07 16:48:21 EDT

    M: Please repeat for Fedora, not Ubuntu

    G: Sure — here’s the Fedora-specific setup for cleaning up old scanned photos using only free tools:


    1. GIMP

    You're good here — it’s already installed.


    2. Install G'MIC Plugin for GIMP (Fedora)

    sudo dnf install gmic-gimp

    If it's missing from your repos (some Fedora spins don't have it), build from source or use AppImage:

    AppImage method (easy):

    # Download latest AppImage from https://gmic.eu/download.html
    chmod +x G'MIC-QT_AppImage*.AppImage
    ./G'MIC-QT_AppImage*.AppImage

    This launches the standalone G'MIC interface. You can export filtered images and re-import into GIMP.


    3. Real-ESRGAN (AI Upscaling & Restoration)

    Dependencies:

    sudo dnf install python3-pip git
    pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu  # or use GPU if supported

    Clone and run:

    git clone https://github.com/xinntao/Real-ESRGAN
    cd Real-ESRGAN
    pip install -r requirements.txt
    python inference_realesrgan.py -n RealESRGAN_x4plus -i path/to/your/image.jpg

    This gives you a 4x upscaled, cleaned-up version using deep learning.


    4. Waifu2x (Simpler AI Denoiser/Upscaler)

    Install:

    sudo dnf install waifu2x-converter-cpp

    Use:

    waifu2x-converter-cpp -i input.jpg -o output.png --noise-level 2 --scale-ratio 2

    5. Suggested Workflow on Fedora

    1. Run through Real-ESRGAN or waifu2x to upscale and denoise.
    2. Open in GIMP, use G'MIC:
      • Filters > G'MIC-Qt
      • Use: Repair > Sharpen, Degradations > Remove noise, Details > Retinex, etc.
    3. Optionally, touch up with GIMP’s heal/clone tool for scan marks or dust.

    If you want a bash script to automate some of this for batches of images, just ask.

    2025-04-07 17:27:50 EDT

    M: The plug-in installation says it’s already installed; gimp isn’t loading it. Suggestions?

    G: Got it. If gmic-gimp is installed but GIMP isn't showing G'MIC in Filters > G'MIC-Qt, here's a focused Fedora-specific troubleshooting guide:


    1. Check GIMP and G'MIC Versions


    2. Confirm G'MIC Plugin is in the Correct GIMP Plug-ins Directory

    Check where it was installed:

    find / -name 'gmic_gimp_qt' 2>/dev/null

    Expected locations (examples):

    If it's not executable or misplaced, GIMP won’t load it.


    3. Ensure Executable Permission

    Make sure the plugin binary has execute permission:

    chmod +x /path/to/gmic_gimp_qt

    4. Manually Set Plug-in Folder in GIMP

    Inside GIMP:


    5. Test G'MIC AppImage Instead (Quickest Fix)

    If all else fails:

    1. Download AppImage from https://gmic.eu
    2. Make it executable:
      chmod +x GMIC-Qt*.AppImage
    3. Run it:
      ./GMIC-Qt*.AppImage
    4. Open your image directly in the AppImage or process/export it and reopen in GIMP.

    Want help linking the AppImage version directly into GIMP as a workaround? I can walk you through that too.