https://github.com/megvii-research/NAFNet Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Discussions + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} megvii-research / NAFNet Public * Notifications * Fork 50 * Star 582 The state-of-the-art image restoration model without nonlinear activation functions. License View license 582 stars 50 forks Star Notifications * Code * Issues 32 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights megvii-research/NAFNet This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 0 tags Code * Clone HTTPS GitHub CLI [https://github.com/m] Use Git or checkout with SVN using the web URL. [gh repo clone megvii] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @mayorx mayorx Update readme.md ... 50cb149 Aug 3, 2022 Update readme.md 50cb149 Git stats * 71 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time basicsr datasets demo docs experiments/pretrained_models figures options scripts .gitignore LICENSE VERSION cog.yaml predict.py readme.md requirements.txt setup.cfg setup.py View code [ ] NAFNet: Nonlinear Activation Free Network for Image Restoration Liangyu Chen*, Xiaojie Chu*, Xiangyu Zhang, Jian Sun News Installation Quick Start Results and Pre-trained Models Image Restoration Tasks Citations Contact readme.md PWC PWC PWC PWC PWC PWC PWC PWC PWC PWC NAFNet: Nonlinear Activation Free Network for Image Restoration The official pytorch implementation of the paper Simple Baselines for Image Restoration (ECCV2022) Liangyu Chen*, Xiaojie Chu*, Xiangyu Zhang, Jian Sun Although there have been significant advances in the field of image restoration recently, the system complexity of the state-of-the-art (SOTA) methods is increasing as well, which may hinder the convenient analysis and comparison of methods. In this paper, we propose a simple baseline that exceeds the SOTA methods and is computationally efficient. To further simplify the baseline, we reveal that the nonlinear activation functions, e.g. Sigmoid, ReLU, GELU, Softmax, etc. are not necessary: they could be replaced by multiplication or removed. Thus, we derive a Nonlinear Activation Free Network, namely NAFNet, from the baseline. SOTA results are achieved on various challenging benchmarks, e.g. 33.69 dB PSNR on GoPro (for image deblurring), exceeding the previous SOTA 0.38 dB with only 8.4% of its computational costs; 40.30 dB PSNR on SIDD (for image denoising), exceeding the previous SOTA 0.28 dB with less than half of its computational costs. NAFNet For Image NAFNet For Image NAFSSR For Stereo Image Super Denoise Deblur Resolution Denoise Deblur StereoSR(NAFSSR) PSNR_vs_MACs News 2022.08.02 The Baseline, including the pretrained models and train/ test configs, are available now. 2022.07.03 Related work, Improving Image Restoration by Revisiting Global Information Aggregation (TLC, a.k.a TLSC in our paper) is accepted by ECCV2022 . Code is available at https://github.com/ megvii-research/TLC. 2022.07.03 Our paper is accepted by ECCV2022 2022.06.19 NAFSSR (as a challenge winner) is selected for an ORAL presentation at CVPR 2022, NTIRE workshop Presentation video, slides and poster are available now. 2022.04.15 NAFNet based Stereo Image Super-Resolution solution ( NAFSSR) won the 1st place on the NTIRE 2022 Stereo Image Super-resolution Challenge! Training/Evaluation instructions see here . Installation This implementation based on BasicSR which is a open source toolbox for image/video restoration tasks and HINet python 3.9.5 pytorch 1.11.0 cuda 11.3 git clone https://github.com/megvii-research/NAFNet cd NAFNet pip install -r requirements.txt python setup.py develop --no_cuda_ext Quick Start * Image Denoise Colab Demo: google colab logo * Image Deblur Colab Demo: google colab logo * Stereo Image Super-Resolution Colab Demo: google colab logo * Single Image Inference Demo: + Image Denoise: python basicsr/demo.py -opt options/test/SIDD/NAFNet-width64.yml --input_path ./demo/noisy.png --output_path ./demo/denoise_img.png + Image Deblur: python basicsr/demo.py -opt options/test/REDS/NAFNet-width64.yml --input_path ./demo/blurry.jpg --output_path ./demo/deblur_img.png + --input_path: the path of the degraded image + --output_path: the path to save the predicted image + pretrained models should be downloaded. + Integrated into Huggingface Spaces using Gradio. Try out the Web Demo for single image restorationHugging Face Spaces * Stereo Image Inference Demo: + Stereo Image Super-resolution: python basicsr/demo_ssr.py -opt options/test/NAFSSR/NAFSSR-L_4x.yml \ --input_l_path ./demo/lr_img_l.png --input_r_path ./demo/lr_img_r.png \ --output_l_path ./demo/sr_img_l.png --output_r_path ./demo/sr_img_r.png + --input_l_path: the path of the degraded left image + --input_r_path: the path of the degraded right image + --output_l_path: the path to save the predicted left image + --output_r_path: the path to save the predicted right image + pretrained models should be downloaded. + Integrated into Huggingface Spaces using Gradio. Try out the Web Demo for stereo image super-resolutionHugging Face Spaces * Try the web demo with all three tasks here: Replicate Results and Pre-trained Models name Dataset PSNR SSIM pretrained configs models NAFNet-GoPro-width32 GoPro 32.8705 0.9606 gdrive | Bai train | Du Wang Pan test NAFNet-GoPro-width64 GoPro 33.7103 0.9668 gdrive | Bai train | Du Wang Pan test NAFNet-SIDD-width32 SIDD 39.9672 0.9599 gdrive | Bai train | Du Wang Pan test NAFNet-SIDD-width64 SIDD 40.3045 0.9614 gdrive | Bai train | Du Wang Pan test NAFNet-REDS-width64 REDS 29.0903 0.8671 gdrive | Bai train | Du Wang Pan test NAFSSR-L_4x Flickr1024 24.17 0.7589 gdrive | Bai train | Du Wang Pan test NAFSSR-L_2x Flickr1024 29.68 0.9221 gdrive | Bai train | Du Wang Pan test Baseline-GoPro-width32 GoPro 32.4799 0.9575 gdrive | Bai train | Du Wang Pan test Baseline-GoPro-width64 GoPro 33.3960 0.9649 gdrive | Bai train | Du Wang Pan test Baseline-SIDD-width32 SIDD 39.8857 0.9596 gdrive | Bai train | Du Wang Pan test Baseline-SIDD-width64 SIDD 40.2970 0.9617 gdrive | Bai train | Du Wang Pan test Image Restoration Tasks Task Dataset Train/Test Visualization Instructions Results Image Deblurring GoPro link gdrive | Bai Du Wang Pan Image Denoising SIDD link gdrive | Bai Du Wang Pan Image Deblurring REDS link gdrive | Bai Du with JPEG artifacts Wang Pan Stereo Image Flickr1024+Middlebury link gdrive | Bai Du Super-Resolution Wang Pan Citations If NAFNet helps your research or work, please consider citing NAFNet. @article{chen2022simple, title={Simple Baselines for Image Restoration}, author={Chen, Liangyu and Chu, Xiaojie and Zhang, Xiangyu and Sun, Jian}, journal={arXiv preprint arXiv:2204.04676}, year={2022} } If NAFSSR helps your research or work, please consider citing NAFSSR. @InProceedings{chu2022nafssr, author = {Chu, Xiaojie and Chen, Liangyu and Yu, Wenqing}, title = {NAFSSR: Stereo Image Super-Resolution Using NAFNet}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops}, month = {June}, year = {2022}, pages = {1239-1248} } Contact If you have any questions, please contact chenliangyu@megvii.com or chuxiaojie@megvii.com --------------------------------------------------------------------- statistics visitors About The state-of-the-art image restoration model without nonlinear activation functions. Topics pytorch image-denoising image-restoration image-deblurring denoise low-level-vision deblur eccv2022 stereo-super-resolution Resources Readme License View license Stars 582 stars Watchers 10 watching Forks 50 forks Releases No releases published Packages 0 No packages published Contributors 4 * @mayorx mayorx Chen Liangyu * @achusky achusky * @megvii-model megvii-model * @chenxwh chenxwh Chenxi Languages * Python 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.