NAFNet
lightweight image deblurring model
1 min readupdated
This model sharpens photos and removes motion blur (deblurring). Built on the NAFNet (Nonlinear Activation Free Network) architecture, it skips nonlinear activations to achieve high efficiency with minimal compute overhead. It is a solid fit for developers and researchers who need fast image deblurring in Python or C++ projects.
Key features
- Lightweight architecture without nonlinear activations to keep hardware load low.
- High performance with clean, reliable image deblurring.
- Ready-to-run demo examples in Python and C++.
- Released under the MIT License.
What you can do
- Run the Python demo script to deblur the default sample image or a custom file path.
- Build the C++ application with CMake and OpenCV to process images locally.
Example
# deblur the default input image
python demo.py
# deblur the user input image
python demo.py --input /path/to/image
# get help regarding various parameters
python demo.py --helpRead more
DetailsRequirements: OpenCV >=5.0.0 and CMake >= 3.22.2.
Source code and references: fork of the opencv/deblurring_nafnet repository, original research by megvii-research.
Available with .pth weights and an ONNX model.










Comments