Low-Light Denoising, Deblurring & 4x Super-Resolution
This repository contains the trained weights and architecture for MPR_SRNet (Multi-Stage Progressive Restoration and RCAB Super-Resolution Network).
Architecture Details
- Stage 1 (Restoration): 5 Non-linear Activation Free (NAF) / Gated blocks for low-light enhancement, denoising, and deblurring.
- Stage 2 (Super-Resolution): 8 Residual Channel Attention Blocks (RCAB) for feature extraction.
- Upscaling Head: 4x PixelShuffle upsampler.
How to Load the Model in PyTorch
import torch
from model import MPR_SRNet
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# 1. Initialize model architecture
model = MPR_SRNet(
in_channels=3,
out_channels=3,
feature_dim=64,
num_naf_blocks=5,
num_rcab_blocks=8,
scale_factor=4
)
# 2. Load trained weights
checkpoint = torch.load("best_model.pth", map_location=device)
state_dict = checkpoint.get("model_state_dict", checkpoint)
model.load_state_dict(state_dict)
model.to(device)
model.eval()
print("Model loaded successfully!")
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support