Skip to content

About

Windows GUI for running RawForge

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

RawForgeUI - RAW Photo Denoising Application

A Windows WPF application that provides a user-friendly interface for batch processing Canon RAW CR3 photos using RawForge AI denoising models.

Prerequisites

Required Software

The application will search for rawforge.exe in:

  1. Your system PATH
  2. Common Python installation directories:
    • C:\Users\[username]\AppData\Roaming\Python\Python3xx\Scripts\
    • C:\Users\[username]\AppData\Local\Programs\Python\Python3xx\Scripts\

Configuration Requirements

Before running the application, you need to configure the following:

1. Photo Source Path ⚙️

File: MainWindow.xaml.cs - Line 16

private const string RootFolder = @"C:\Fotos Import";

Change C:\Fotos Import to the folder containing your photo folders. The app will scan subdirectories for Canon CR3 files.

Expected folder structure:

C:\Fotos Import\
├── Trip-2024-Summer\
│   ├── IMG_0001.CR3
│   ├── IMG_0001.jpg
│   ├── IMG_0002.CR3
│   ├── IMG_0002.jpg
│   └── Denoised\  (auto-created)
│       ├── IMG_0001.dng
│       └── IMG_0002.dng
├── Trip-2024-Winter\
│   └── ...

2. Output Folder Name (Optional)

File: MainWindow.xaml.cs - Line 17

private const string DenoiseFolder = "Denoised";

The app creates this subfolder within each directory to store denoised DNG files. Change if desired.

3. RawForge Installation ✓

Ensure RawForge is installed and rawforge.exe is accessible via:

  • System PATH, OR
  • One of the default Python Scripts locations (automatically checked)

Run rawforge --help in PowerShell/Command Prompt to verify installation.


How the Application Works

Core Components

1. MainWindow.xaml.cs - Main Application Logic

The heart of the application, containing:

  • Folder browser - Lists all subdirectories in the root folder
  • File list - Shows CR3 files with thumbnails from paired JPG files
  • Processing queue - Users select files to denoise
  • Batch processor - Executes RawForge with customizable parameters
  • GPU monitoring - Tracks NVIDIA GPU temperature and pauses processing if overheating

2. CrFile.cs - Data Model

Represents a single CR3 file with:

  • File name and full path
  • Thumbnail image (loaded from paired JPG)
  • "Already denoised" status (checks if DNG exists in output folder)

3. App.xaml / App.xaml.cs - Application Bootstrap

Standard WPF application entry point.


Features

Denoising Models

The application supports multiple RawForge denoising models:

  • TreeNetDenoiseHeavy - Best quality for Bayer-pattern sensors
  • TreeNetDenoise - Standard denoise for Bayer sensors
  • TreeNetDenoiseLight - Faster, lighter denoise for Bayer sensors
  • TreeNetDenoiseSuperLight - Fastest option for Bayer sensors
  • Deblur - Removes motion blur from Bayer images
  • DeepSharpen - Enhances sharpness
  • TreeNetDenoiseXTrans - Specialized for Fujifilm XTrans sensors
  • RestormerXTrans - Advanced XTrans denoising
  • JDD256 - Joint Demosaic & Denoise (256px tiles)
  • JDD - Joint Demosaic & Denoise (768px tiles)

Advanced Options

Processing Parameters

  • Tile Size (128–1024 px) - Larger tiles = better quality but higher memory usage
  • Tile Overlap (10%–50%) - Higher overlap reduces edge artifacts
  • Device - Auto / CUDA / CPU / MPS

Quality Options

  • CFA - Color filter array handling
  • Clip Highlights - Prevent blown-out highlights
  • Affine - Apply affine transformations
  • ONNX - Use ONNX Runtime for inference

Luminance & Chroma Control

  • Lumi Slider - Adjust luminance denoising strength
  • Chroma Slider - Adjust color denoising strength

Advanced Conditioning

  • Custom conditioning parameters can be passed to RawForge

GPU Temperature Management

  • Monitors NVIDIA GPU temperature via nvidia-smi
  • Pauses processing if GPU exceeds 85°C
  • Resumes when temperature drops below 80°C
  • Prevents thermal throttling and hardware damage

Real-time Logging

  • Displays RawForge output in real-time
  • Shows progress bar during batch processing
  • Handles terminal-style progress updates (carriage returns)

Thumbnail Preview

  • Automatically loads JPG thumbnails (same filename as CR3)
  • Displays visual preview of each image
  • Marks already-denoised files with a badge

Building from Source

# Clone or open the project in Visual Studio 2022
# The project uses .NET 8.0 with WPF

# Build
dotnet build RawForgeUI.csproj

# Run
dotnet run --project RawForgeUI.csproj

Or open RawForgeUI.csproj in Visual Studio 2022+ and press F5.


Usage Workflow

  1. Configure Paths - Edit MainWindow.xaml.cs to set your photo folder
  2. Launch App - Run RawForgeUI.exe
  3. Select Folder - Click a folder in the left panel to see CR3 files
  4. Select Files - Add files to queue using "Add Selected" or "Add All" buttons
  5. Configure Options - Choose denoise model, tile size, device, etc.
  6. Start Processing - Click "Start" button
  7. Monitor Progress - Watch log output and progress bar
  8. Review Output - Denoised DNG files appear in Denoised\ subfolder

Error Handling

  • "rawforge.exe not found" - Install RawForge or add it to PATH
  • "Root folder not found" - Check the RootFolder path in code
  • No thumbnails - Ensure JPG files have the same name as CR3 files (e.g., IMG_0001.CR3 and IMG_0001.jpg)
  • GPU overheating - Reduce tile size or use a device other than CUDA

Project Structure

RawForgeUI/
├── App.xaml                  # Application resources
├── App.xaml.cs              # Application bootstrap
├── MainWindow.xaml          # UI layout (WPF)
├── MainWindow.xaml.cs       # Main logic & event handlers
├── CrFile.cs               # Data model for CR3 files
├── RawForgeUI.csproj       # Project configuration
├── RawForgeUI.ico          # Application icon
├── RunRawforge.cmd         # Helper batch script
└── bin/Release/            # Compiled binaries

Configuration Checklist

  • RawForge installed and in PATH (or default Python directory)
  • Source photo path configured in MainWindow.xaml.cs (line 16)
  • CR3 files and matching JPG thumbnails in source folder
  • GPU drivers up to date (for NVIDIA denoising)
  • Windows .NET 8.0 Runtime installed
  • Sufficient disk space for DNG output files

Technical Details

WPF Architecture

  • Data binding for real-time UI updates
  • Observable collections for queue management
  • INotifyPropertyChanged for thumbnail updates

Async/Await Patterns

  • Non-blocking I/O for file operations
  • GPU temperature checks run on background threads
  • UI updates marshaled back to main thread via Dispatcher

Stream Processing

  • Character-by-character reading of RawForge output
  • Handles carriage returns (\r) for in-place terminal progress updates
  • Prevents UI thread blocking during long-running processes

License

See LICENSE file in the project root.


Related Projects

  • RawForge - AI-powered RAW image denoising engine
  • Built with .NET 8.0 and WPF

Support

For issues with RawForge itself, visit: https://github.com/rymuelle/RawForge

For issues with this UI application, review the error messages in the log window.

About

Windows GUI for running RawForge

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages