Appearance
Losses & Perceptual Metrics
Super-resolution exhibits a fundamental perception-distortion trade-off: minimizing pixel-wise error alone produces overly smooth textures, while aggressive adversarial training can hallucinate unrealistic high-frequency patterns. SoraSR exposes a composable loss framework to navigate this trade-off explicitly.
Composite Training Objective
The total generator loss combines spatial reconstruction, deep perceptual similarity, and frequency-domain fidelity:
1. Charbonnier Pixel Loss
A differentiable approximation to
Charbonnier loss is used exclusively during Stage 1 pretraining (
2. Multi-Scale Perceptual Loss
Extracts intermediate activations from a frozen VGG-19 network (conv2_2, conv3_4, conv4_4, conv5_4 before activation) and computes weighted
Using pre-activation features preserves texture contrast and reduces brightness drift compared to post-ReLU feature maps.
3. 2D Frequency (FFT) Loss
Supervises the log-amplitude spectrum of the 2D Fast Fourier Transform to discourage over-smoothing of fine diagonal structures:
In practice, a modest weight (
Recommended Two-Stage Schedule
| Stage | Steps | Active Weights | Primary Goal |
|---|---|---|---|
| Stage 1 (PSNR Pretrain) | 300k | char=1.0, fft=0.02 | Converge low-frequency geometry and color |
| Stage 2 (Perceptual Fine-Tune) | 150k | char=0.5, vgg=1.0, fft=0.05, gan=0.05 | Restore crisp micro-textures and natural grain |
Evaluation Metrics
SoraSR reports three complementary metrics during validation:
- PSNR (Y-Channel, dB) — Measures pixel-level distortion on the BT.601 luminance channel after shaving
scaleboundary pixels. Higher is better. - SSIM (Y-Channel) — Captures local luminance, contrast, and structural correlation over
Gaussian windows. Higher is better (range ). - LPIPS (AlexNet / VGG) — Learned perceptual patch similarity aligned with human visual preference. Lower is better.
yaml
# Example loss block in a SoraSR training config
losses:
charbonnier:
weight: 0.5
eps: 1.0e-3
perceptual:
weight: 1.0
backbone: vgg19
layers: { conv2_2: 0.1, conv3_4: 0.2, conv4_4: 0.4, conv5_4: 0.3 }
fft:
weight: 0.05