{"id":21171208,"url":"https://github.com/swz30/mirnetv2","last_synced_at":"2025-04-05T09:05:39.249Z","repository":{"id":39925497,"uuid":"392662568","full_name":"swz30/MIRNetv2","owner":"swz30","description":"[TPAMI 2022] Learning Enriched Features for Fast Image Restoration and Enhancement. Results on Defocus Deblurring, Denoising, Super-resolution, and image enhancement","archived":false,"fork":false,"pushed_at":"2024-04-18T08:04:09.000Z","size":4584,"stargazers_count":440,"open_issues_count":18,"forks_count":59,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T08:06:23.624Z","etag":null,"topics":["contrast-enhancement","defocus-deblurring","denoising","high-resolution","image-denoising","image-enhancement","image-processing","image-restoration","low-level-vision","low-light-image-enhancement","pytorch","tpami"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swz30.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-04T11:28:07.000Z","updated_at":"2025-03-26T16:55:24.000Z","dependencies_parsed_at":"2024-04-18T08:45:18.263Z","dependency_job_id":"b73e3134-67d2-4bd5-9a87-24cee5f8535f","html_url":"https://github.com/swz30/MIRNetv2","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swz30%2FMIRNetv2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swz30%2FMIRNetv2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swz30%2FMIRNetv2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swz30%2FMIRNetv2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swz30","download_url":"https://codeload.github.com/swz30/MIRNetv2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312077,"owners_count":20918344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contrast-enhancement","defocus-deblurring","denoising","high-resolution","image-denoising","image-enhancement","image-processing","image-restoration","low-level-vision","low-light-image-enhancement","pytorch","tpami"],"created_at":"2024-11-20T16:03:25.864Z","updated_at":"2025-04-05T09:05:39.087Z","avatar_url":"https://github.com/swz30.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n\n# Learning Enriched Features for Fast Image Restoration and Enhancement (TPAMI 2022)\n\n\n[Syed Waqas Zamir](https://scholar.google.ae/citations?hl=en\u0026user=POoai-QAAAAJ), [Aditya Arora](https://adityac8.github.io/), [Salman Khan](https://salman-h-khan.github.io/), [Munawar Hayat](https://scholar.google.com/citations?user=Mx8MbWYAAAAJ\u0026hl=en), [Fahad Shahbaz Khan](https://scholar.google.es/citations?user=zvaeYnUAAAAJ\u0026hl=en), [Ming-Hsuan Yang](https://scholar.google.com/citations?user=p9-ohHsAAAAJ\u0026hl=en), and [Ling Shao](https://scholar.google.com/citations?user=z84rLjoAAAAJ\u0026hl=en)\n\n[![paper](https://img.shields.io/badge/arXiv-Paper-\u003cCOLOR\u003e.svg)](https://www.waqaszamir.com/publication/zamir-2022-mirnetv2/)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1HN9Sd8UEqB1k_O8RpdRLL8ZUKcxh5LP8?usp=sharing)\n\n#### News\n- **April 27, 2022:** Codes and pre-trained models are released!\n\n\u003chr /\u003e\n\n\u003e **Abstract:** * Given a degraded input image, image restoration aims to recover the missing high-quality image content. Numerous applications demand effective image restoration, e.g., computational photography, surveillance, autonomous vehicles, and remote sensing. Significant advances in image restoration have been made in recent years, dominated by convolutional neural networks (CNNs). The widely-used CNN-based methods typically operate either on full-resolution or on progressively low-resolution representations. In the former case, spatial details are preserved but the contextual information cannot be precisely encoded. In the latter case, generated outputs are semantically reliable but spatially less accurate. This paper presents a new architecture with a holistic goal of maintaining spatially-precise high-resolution representations through the entire network, and receiving complementary contextual information from the low-resolution representations. The core of our approach is a multi-scale residual block containing the following key elements: (a) parallel multi-resolution convolution streams for extracting multi-scale features, (b) information exchange across the multi-resolution streams, (c) non-local attention mechanism for capturing contextual information, and (d) attention based multi-scale feature aggregation. Our approach learns an enriched set of features that combines contextual information from multiple scales, while simultaneously preserving the high-resolution spatial details. Extensive experiments on six real image benchmark datasets demonstrate that our method, named as MIRNet-v2 , achieves state-of-the-art results for a variety of image processing tasks, including defocus deblurring, image denoising, super-resolution, and image enhancement.* \n\u003chr /\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e \u003cstrong\u003eNetwork Architecture\u003c/strong\u003e (click to expand) \u003c/summary\u003e\n \n\u003cp align=\"center\"\u003e\n  \u003cimg src = \"https://i.imgur.com/sX8Gubx.png\" width=\"700\"\u003e\n  \u003cbr/\u003e\n  \u003cb\u003e Overall Framework of MIRNet_v2 \u003c/b\u003e\n\u003c/p\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e \u003cimg src = \"https://i.imgur.com/npRdnUx.png\" width=\"600\"\u003e \u003c/td\u003e\n    \u003ctd\u003e \u003cimg src = \"https://i.imgur.com/UswooC4.png\" width=\"600\"\u003e \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cp align=\"center\"\u003e\u003cb\u003eSelective Kernel Feature Fusion (SKFF)\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cp align=\"center\"\u003e \u003cb\u003eResidual Contextual Block (RCB)\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n    \n\u003c/details\u003e\n\n## Installation\n\nSee [INSTALL.md](INSTALL.md) for the installation of dependencies required to run MIRNet_v2.\n\n## Demo\n\nTo test the pre-trained MIRNet_v2 models of Real Denoising, Dual-Pixel Defocus Deblurring, Super-Resolution,  and Image Enhancement on your own images,you can either use Google Colab [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1HN9Sd8UEqB1k_O8RpdRLL8ZUKcxh5LP8?usp=sharing), or command line as following\n```\npython demo.py --task Task_Name --input_dir path_to_images --result_dir save_images_here\n```\nExample usage to perform Image Denoising on a directory of images:\n```\npython demo.py --task real_denoising --input_dir './demo/degraded/' --result_dir './demo/restored/'\n```\nExample usage to perform Image Denoising on an image directly:\n```\npython demo.py --task real_denoising --input_dir './demo/degraded/noisy.png' --result_dir './demo/restored/'\n```\n\n## Training and Evaluation\n\nTraining and Testing instructions for Real Denoising, Defocus Deblurring, Super-Resolution, and Image Enhancement are provided in their respective directories. Here is a summary table containing hyperlinks for easy navigation:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth align=\"left\"\u003eTask\u003c/th\u003e\n    \u003cth align=\"center\"\u003eTraining Instructions\u003c/th\u003e\n    \u003cth align=\"center\"\u003eTesting Instructions\u003c/th\u003e\n    \u003cth align=\"center\"\u003eMIRNetv2's Visual Results\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003eReal Denoising\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"Real_Denoising/README.md#training\"\u003eLink\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"Real_Denoising/README.md#evaluation\"\u003eLink\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://drive.google.com/drive/folders/1h1_UxesAxVNqBLtOdZ_cLMCr3XRSqg91?usp=sharing\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDefocus Deblurring\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"Defocus_Deblurring/README.md#training\"\u003eLink\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"Defocus_Deblurring/README.md#evaluation\"\u003eLink\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://drive.google.com/drive/folders/1_3S4LK-BbMbqLhq3vbcn8V2PsctO_cqP?usp=sharing\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSuper-Resolution\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"Super_Resolution/README.md#training\"\u003eLink\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"Super_Resolution/README.md#evaluation\"\u003eLink\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://drive.google.com/drive/folders/1rvc8Bio0GmdIf-w4iIdEmqnli0HHM6nS?usp=sharing\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eImage Enhancement\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"Enhancement/README.md#training-1\"\u003eLink\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"Enhancement/README.md#evaluation-1\"\u003eLink\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://drive.google.com/drive/folders/18l7SSl-wT9-BMZL4j_dNzDeccUB0T0ci?usp=sharing\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Results\nExperiments are performed for different image processing tasks.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eReal Denoising\u003c/strong\u003e (click to expand) \u003c/summary\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src = \"https://imgur.com/jV5K8Ji.png\" width=\"450\"\u003e \n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eDefocus Deblurring\u003c/strong\u003e (click to expand) \u003c/summary\u003e\n\n\u003cimg src = \"https://imgur.com/y5itTxY.png\"\u003e \n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eSuper-Resolution\u003c/strong\u003e (click to expand) \u003c/summary\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src = \"https://imgur.com/u1H237x.png\" width=\"450\"\u003e \n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eImage Enhancement\u003c/strong\u003e (click to expand) \u003c/summary\u003e\n    \n\u003cimg src = \"https://imgur.com/2VOIXNP.png\"\u003e\n\u003c/details\u003e\n\n## Citation\nIf you use MIRNet_v2, please consider citing:\n\n    @article{Zamir2022MIRNetv2,\n    title={Learning Enriched Features for Fast Image Restoration and Enhancement}, \n    author={Syed Waqas Zamir and Aditya Arora and Salman Khan and Munawar Hayat \n            and Fahad Shahbaz Khan and Ming-Hsuan Yang and Ling Shao},\n    journal={IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI)},\n    year={2022}\n    }\n\n\n## Contact\nShould you have any question, please contact waqas.zamir@inceptioniai.org\n\n\n**Acknowledgment:** This code is based on the [BasicSR](https://github.com/xinntao/BasicSR) toolbox. \n\n## Our Related Works\n- Restormer: Efficient Transformer for High-Resolution Image Restoration, CVPR 2022. [Paper](https://arxiv.org/abs/2111.09881) | [Code](https://github.com/swz30/Restormer)\n- Multi-Stage Progressive Image Restoration, CVPR 2021. [Paper](https://arxiv.org/abs/2102.02808) | [Code](https://github.com/swz30/MPRNet)\n- Learning Enriched Features for Real Image Restoration and Enhancement, ECCV 2020. [Paper](https://arxiv.org/abs/2003.06792) | [Code](https://github.com/swz30/MIRNet)\n- CycleISP: Real Image Restoration via Improved Data Synthesis, CVPR 2020. [Paper](https://arxiv.org/abs/2003.07761) | [Code](https://github.com/swz30/CycleISP)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswz30%2Fmirnetv2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswz30%2Fmirnetv2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswz30%2Fmirnetv2/lists"}