Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
Sathya77 
posted an update 15 days ago
Post
568
Built a ViT for ×4 image super-resolution from scratch in PyTorch — sharing the model.

No pretrained weights. Every component implemented from scratch: strided Conv2d patch embedding, multi-head self-attention across 1,024 tokens, 6 pre-norm transformer blocks, and a PixelShuffle reconstruction head for learned upsampling.

Trained on real-images from LSDIR dataset with fp16 AMP on a laptop GPU. Tiled inference handles arbitrary input sizes.

Current architecture: patch size 2, embed dim 64, 4 attention heads, 6 transformer blocks, ~786K parameters — test PSNR 23.30 dB.

The model handles broad structure well — fine textures and sharp edges need more capacity. Working on a larger configuration next.

🤗 Space: Sathya77/ViT-ISR-Tiny-LSDIR

Feedback welcome — especially on the architecture choices.
In this post