Low-Light Denoising + 4× Super-Resolution (small EDSR)

A small EDSR-style convolutional network that takes a noisy, low-light, low-resolution RGB image and outputs a denoised image

Model

  • Architecture: EDSR-style — 3×3 conv head, 16 residual blocks (64 channels, conv–ReLU–conv, no batch norm), global skip, then a 4× PixelShuffle upsampler.
  • Parameters: ~1.5M
  • Input: RGB, values in [0, 1], any size
  • Output: RGB, values in [0, 1], 4× height and width

Usage

import torch, numpy as np
from PIL import Image
from huggingface_hub import hf_hub_download
from model import Net   # model.py is in this repo

REPO = "[USERNAME]/[REPO NAME]"
model = Net()
model.load_state_dict(torch.load(hf_hub_download(REPO, "best.pt"), map_location="cpu"))
model.eval()

img = Image.open("input.png").convert("RGB")
x = torch.from_numpy(np.array(img)).permute(2, 0, 1).float()[None] / 255
with torch.no_grad():
    y = model(x).clamp(0, 1)[0].permute(1, 2, 0).numpy()
Image.fromarray((y * 255).round().astype(np.uint8)).save("output.png")

Files

  • best.pt — PyTorch state_dict of the best validation checkpoint
  • model.py — model definition (Net), required to load the weights
  • train.py — full training / inference / submission script
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support