LeafSR

PyTorch / Computer Vision / Super-Resolution

Recovering plant leaf detail from low-resolution imagery.

LeafSR packages a Kaggle-style notebook into a reproducible ML system: paired image loading, ESRGAN-lite training, validation metrics, inference scripts, and a visual project frontend.

Validation MAE 16.89 from 18.20 bicubic baseline
Scale 4x
Train pairs 1,642
Test images 495
TTA 8-way

Dataset Explorer

Real paired samples from the competition data.

The frontend commits only a few lightweight sample images. The full dataset, VGG weights, checkpoints, and submissions stay out of git.

Low-res input Low-resolution plant leaf input
Bicubic baseline Bicubic upscaled plant leaf baseline
High-res target High-resolution plant leaf target
Bicubic sample MAE 22.21
LeafSR sample MAE 21.37
Improvement 3.8%

System Design

Notebook logic converted into a reusable training pipeline.

01

Patch loader

Pairs LR/HR files by filename, samples aligned patches, and applies flips/rotations.

02

ESRGAN-lite generator

Uses RRDB blocks and pixel shuffle upsampling to predict a residual over bicubic HR.

03

Hybrid objective

Combines Charbonnier, residual, VGG perceptual, FFT, and low-weight adversarial losses.

04

Inference

Runs EMA checkpoints with 8-way test-time augmentation for submission generation.

Architecture

Residual super-resolution over a strong classical baseline.

Low-res leaf
Bicubic 4x
RRDB generator predicts residual
LeafSR output

Measured Result

Clear validation improvement over bicubic interpolation.

The trained checkpoint used a Tesla T4 with automatic mixed precision, cosine scheduling, early stopping, EMA-smoothed generator weights, and 8-way test-time augmentation.

Bicubic baseline 18.20 MAE
LeafSR ESRGAN-lite 16.89 MAE
Relative reduction 7.2%