{"id":13932927,"url":"https://github.com/JiahuiYu/wdsr_ntire2018","last_synced_at":"2025-07-19T16:32:06.216Z","repository":{"id":52085507,"uuid":"127338735","full_name":"JiahuiYu/wdsr_ntire2018","owner":"JiahuiYu","description":"Code of our winning entry to NTIRE super-resolution challenge, CVPR 2018","archived":false,"fork":false,"pushed_at":"2020-04-27T01:21:12.000Z","size":20,"stargazers_count":600,"open_issues_count":1,"forks_count":123,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-11-23T13:02:59.015Z","etag":null,"topics":["deep-neural-networks","efficient-algorithm","pytorch","super-resolution","wdsr"],"latest_commit_sha":null,"homepage":"http://www.vision.ee.ethz.ch/ntire18/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JiahuiYu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-29T19:34:17.000Z","updated_at":"2024-10-24T02:05:55.000Z","dependencies_parsed_at":"2022-09-06T07:44:13.329Z","dependency_job_id":null,"html_url":"https://github.com/JiahuiYu/wdsr_ntire2018","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiahuiYu%2Fwdsr_ntire2018","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiahuiYu%2Fwdsr_ntire2018/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiahuiYu%2Fwdsr_ntire2018/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiahuiYu%2Fwdsr_ntire2018/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JiahuiYu","download_url":"https://codeload.github.com/JiahuiYu/wdsr_ntire2018/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226643828,"owners_count":17662967,"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":["deep-neural-networks","efficient-algorithm","pytorch","super-resolution","wdsr"],"created_at":"2024-08-07T21:01:22.432Z","updated_at":"2024-11-26T23:30:46.647Z","avatar_url":"https://github.com/JiahuiYu.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Wide Activation for Efficient and Accurate Image Super-Resolution\n\n[Tech Report](https://arxiv.org/abs/1808.08718) | [Approach](#wdsr-network-architecture) | [Results](#overall-performance) | [TensorFlow](https://github.com/ychfan/tf_estimator_barebone/blob/master/docs/super_resolution.md) | [Other Implementations](#other-implementations) | [Bibtex](#citing) \n\n**Update (Apr, 2020)**: We have released a [reloaded version](https://github.com/ychfan/wdsr) with full training scripts in PyTorch and pre-trained models.\n\n**Update (Oct, 2018)**: We have re-implemented [WDSR on TensorFlow](https://github.com/ychfan/tf_estimator_barebone/blob/master/docs/super_resolution.md) for end-to-end training and testing. Pre-trained models are released. The runtime speed of [weight normalization on tensorflow](https://github.com/ychfan/tf_estimator_barebone/blob/master/common/layers.py) is also optimized.\n\n## Run\n\n0. Requirements:\n    * Install [PyTorch](https://pytorch.org/) (tested on release 0.4.0 and 0.4.1).\n    * Clone [EDSR-Pytorch](https://github.com/thstkdgus35/EDSR-PyTorch/tree/95f0571aa74ddf9dd01ff093081916d6f17d53f9) as backbone training framework.\n1. Training and Validation:\n    * Copy [wdsr_a.py](/wdsr_a.py), [wdsr_b.py](/wdsr_b.py) into `EDSR-PyTorch/src/model/`.\n    * Modify `EDSR-PyTorch/src/option.py` and `EDSR-PyTorch/src/demo.sh` to support `--n_feats, --block_feats, --[r,g,b]_mean` option (please find reference in issue [#7](https://github.com/JiahuiYu/wdsr_ntire2018/issues/7), [#8](https://github.com/JiahuiYu/wdsr_ntire2018/issues/8)).\n    * Launch training with [EDSR-Pytorch](https://github.com/thstkdgus35/EDSR-PyTorch/tree/95f0571aa74ddf9dd01ff093081916d6f17d53f9) as backbone training framework.\n2. Still have questions?\n    * If you still have questions, please first search over closed issues. If the problem is not solved, please open a new issue.\n\n## Overall Performance\n\n| Network | Parameters | DIV2K (val) PSNR |\n| - | - | - |\n| EDSR Baseline | 1,372,318 | 34.61 |\n| WDSR Baseline | **1,190,100** | **34.77** |\n\nWe measured PSNR using DIV2K 0801 ~ 0900 (trained on 0000 ~ 0800) on RGB channels without self-ensemble. Both baseline models have 16 residual blocks.\n\nMore results:\n\n\u003ctable\u003e\u003ctr\u003e\u003cth\u003eNumber of Residual Blocks\u003c/th\u003e\u003cth colspan=\"3\"\u003e1\u003c/th\u003e\u003cth colspan=\"3\"\u003e3\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSR Network\u003c/td\u003e\u003ctd\u003eEDSR\u003c/td\u003e\u003ctd\u003eWDSR-A\u003c/td\u003e\u003ctd\u003eWDSR-B\u003c/td\u003e\u003ctd\u003eEDSR\u003c/td\u003e\u003ctd\u003eWDSR-A\u003c/td\u003e\u003ctd\u003eWDSR-B\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eParameters\u003c/td\u003e\u003ctd\u003e0.26M\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e0.08M\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e0.08M\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e0.41M\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e0.23M\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e0.23M\u003c/strong\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eDIV2K (val) PSNR\u003c/td\u003e\u003ctd\u003e33.210\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e33.323\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e33.434\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e34.043\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e34.163\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e34.205\u003c/strong\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\u003ctable\u003e\u003ctr\u003e\u003cth\u003eNumber of Residual Blocks\u003c/th\u003e\u003cth colspan=\"3\"\u003e5\u003c/th\u003e\u003cth colspan=\"3\"\u003e8\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSR Network\u003c/td\u003e\u003ctd\u003eEDSR\u003c/td\u003e\u003ctd\u003eWDSR-A\u003c/td\u003e\u003ctd\u003eWDSR-B\u003c/td\u003e\u003ctd\u003eEDSR\u003c/td\u003e\u003ctd\u003eWDSR-A\u003c/td\u003e\u003ctd\u003eWDSR-B\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eParameters\u003c/td\u003e\u003ctd\u003e0.56M\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e0.37M\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e0.37M\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e0.78M\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e0.60M\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e0.60M\u003c/strong\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eDIV2K (val) PSNR\u003c/td\u003e\u003ctd\u003e34.284\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e34.388\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e34.409\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e34.457\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e34.541\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\u003cstrong\u003e34.536\u003c/strong\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\nComparisons of \u003ca href=\"https://arxiv.org/abs/1707.02921\"\u003eEDSR\u003c/a\u003e and our proposed WDSR-A, WDSR-B using identical settings to [EDSR baseline model](https://github.com/thstkdgus35/EDSR-PyTorch) for image bicubic x2 super-resolution on DIV2K dataset.\n\n## WDSR Network Architecture\n\n\u003cimg src=\"https://user-images.githubusercontent.com/22609465/41505074-52078984-71b5-11e8-87af-15f19b43c450.png\"  width=100%/\u003e\n\nLeft: vanilla residual block in EDSR. Middle: **wide activation**. Right: **wider activation with linear low-rank convolution**. The proposed wide activation WDSR-A, WDSR-B have similar merits with [MobileNet V2](https://arxiv.org/abs/1801.04381) but different architectures and much better PSNR.\n\n## Weight Normalization vs. Batch Normalization and No Normalization\n\n\u003cimg src=\"https://user-images.githubusercontent.com/22609465/41505052-be6ac920-71b4-11e8-8433-e6736364a29e.png\"  width=48%/\u003e \u003cimg src=\"https://user-images.githubusercontent.com/22609465/41505053-be911a8a-71b4-11e8-9da4-b34a7ac598f4.png\"   width=48%/\u003e\n\nTraining loss and validation PSNR with weight normalization, batch normalization or no normalization. Training with weight normalization has faster convergence and better accuracy.\n\n## Other Implementations\n\n- [TensorFlow-WDSR](https://github.com/ychfan/tf_estimator_barebone/blob/master/docs/super_resolution.md) (official) \n- [Keras-WDSR](https://github.com/krasserm/wdsr) By [Martin Krasser](https://github.com/krasserm)\n\n\n## Citing\nPlease consider cite WDSR for image super-resolution and compression if you find it helpful.\n```\n@article{yu2018wide,\n  title={Wide Activation for Efficient and Accurate Image Super-Resolution},\n  author={Yu, Jiahui and Fan, Yuchen and Yang, Jianchao and Xu, Ning and Wang, Xinchao and Huang, Thomas S},\n  journal={arXiv preprint arXiv:1808.08718},\n  year={2018}\n}\n\n@inproceedings{fan2018wide,\n  title={Wide-activated Deep Residual Networks based Restoration for BPG-compressed Images},\n  author={Fan, Yuchen and Yu, Jiahui and Huang, Thomas S},\n  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops},\n  pages={2621--2624},\n  year={2018}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJiahuiYu%2Fwdsr_ntire2018","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJiahuiYu%2Fwdsr_ntire2018","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJiahuiYu%2Fwdsr_ntire2018/lists"}