Downloads · 30 days
0
inoculatemedia/seesharp
seesharp is a image-to-image model from inoculatemedia. Use it when you need one image transformed into another. It is set up for pytorch. The card lists the license as mit.
Real-time video super-resolution (x4) using a teacher model with multi-branch dilated convolutions and feature alignment. Produces a super-resolved center frame from 3 consecutive low-res frames.
Downloads · 30 days
0
Access
Public
Updated Sep 29, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md3.1 KB · 67%
From the Hugging Face model README
Real-time video super-resolution (x4) using a teacher model with multi-branch dilated convolutions and feature alignment. Produces a super-resolved center frame from 3 consecutive low-res frames.
MBDModule to aggregate multi-dilation contextClone this repo or ensure the model files ersvr/models/*.py are available locally.
import torch, sys
from huggingface_hub import hf_hub_download
# If you cloned the model repo contents locally:
# sys.path.append(".")
from ersvr.models.ersvr import ERSVR
import numpy as np
# Download weights
ckpt_path = hf_hub_download(
repo_id="inoculatemedia/seesharp",
filename="weights/ersvr_best.pth"
)
device = "cuda" if torch.cuda.is_available() else "cpu"
model = ERSVR(scale_factor=4).to(device)
state = torch.load(ckpt_path, map_location=device)
if isinstance(state, dict) and "model_state_dict" in state:
state = state["model_state_dict"]
model.load_state_dict(state)
model.eval()
# Prepare a triplet: (3, H, W, 3) with values in [0,1]
img = np.random.rand(128, 128, 3).astype("float32")
triplet = np.stack([img, img, img], axis=0) # demo: same frame
tensor = torch.from_numpy(triplet).permute(3,0,1,2).unsqueeze(0).to(device) # (1,3,3,H,W)
with torch.no_grad():
out = model(tensor).clamp(0,1) # (1,3,4H,4W)
img.astype(np.float32)/255.0weights/ersvr_best.pth (recommended)weights/ersvr_epoch_10.pth, weights/ersvr_epoch_20.pth, weights/ersvr_epoch_30.pth (training checkpoints)ersvr/train.py for metric computation helpers.