NAFNet — Nonlinear Activation Free Network for Image Restoration 🖼️❓ → 🖼️

▶️ 1.5M runs 📅 Apr 2022 ⚙️ Cog 0.2.0 🔗 GitHub 📄 Paper ⚖️ License
image-restoration image-upscaling stereo-super-resolution image-denoising image-deblurring

NAFNet (Nonlinear Activation Free Network) is a fast, high-quality image restoration model from Megvii Research. It strips the architecture down to essentials, achieving competitive denoising and deblurring results with lower computational cost than more complex alternatives.

About

NAFNet by Megvii Research is an efficient image restoration model that achieves state-of-the-art denoising and deblurring without nonlinear activation functions. Its simplified architecture delivers fast inference while maintaining high restoration quality.

What NAFNet does

  • Image denoising — remove noise from photos taken in low light or high ISO
  • Image deblurring — sharpen motion-blurred or out-of-focus images
  • General restoration — clean up compressed, degraded, or noisy images

NAFNet's key insight is that removing traditional nonlinear activations (ReLU, GELU) from the network and replacing them with simple element-wise multiplication actually improves both speed and quality for restoration tasks.

Example Output

Output

Example output

Performance Metrics

1.91s Prediction Time
302.50s Total Time
All Input Parameters
{
  "image": "https://replicate.delivery/mgxm/e7a66188-34c6-483b-813f-be5c96a3952b/blurry-reds-0.jpg",
  "task_type": "Image Debluring (REDS)"
}
Input Parameters
image (required) Type: string
Input image. Stereo Image Super-Resolution, upload the left image here.
image_r Type: string
Right Input image for Stereo Image Super-Resolution. Optional, only valid for Stereo Image Super-Resolution task.
task_type Default: Image Debluring (REDS)
Choose task type.
Output Schema

Output

Type: stringFormat: uri

Version Details
Version ID
018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7
Version Created
April 27, 2022
Run on Replicate →