{"id":15009186,"url":"https://github.com/hellloxiaotian/lesrcnn","last_synced_at":"2025-05-07T04:09:44.911Z","repository":{"id":48223558,"uuid":"267363267","full_name":"hellloxiaotian/LESRCNN","owner":"hellloxiaotian","description":"Lightweight Image Super-Resolution with Enhanced CNN (Knowledge-Based Systems,2020)","archived":false,"fork":false,"pushed_at":"2022-10-12T02:11:12.000Z","size":16457,"stargazers_count":223,"open_issues_count":11,"forks_count":32,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T04:09:30.387Z","etag":null,"topics":["cnn","cnn-pytorch","deep-learning","enhancement-and-compression","image-processing","image-super-resolution","information-refinement","lightweight-enhanced-network","low-level-vision","python27"],"latest_commit_sha":null,"homepage":"https://www.sciencedirect.com/science/article/abs/pii/S0950705120304391","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/hellloxiaotian.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":"2020-05-27T15:55:10.000Z","updated_at":"2025-01-16T08:09:22.000Z","dependencies_parsed_at":"2022-09-04T12:52:12.533Z","dependency_job_id":null,"html_url":"https://github.com/hellloxiaotian/LESRCNN","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/hellloxiaotian%2FLESRCNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellloxiaotian%2FLESRCNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellloxiaotian%2FLESRCNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellloxiaotian%2FLESRCNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellloxiaotian","download_url":"https://codeload.github.com/hellloxiaotian/LESRCNN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810273,"owners_count":21807759,"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":["cnn","cnn-pytorch","deep-learning","enhancement-and-compression","image-processing","image-super-resolution","information-refinement","lightweight-enhanced-network","low-level-vision","python27"],"created_at":"2024-09-24T19:23:29.974Z","updated_at":"2025-05-07T04:09:44.870Z","avatar_url":"https://github.com/hellloxiaotian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LESRCNN\n## Lightweight Image Super-Resolution with Enhanced CNN（LESRCNN）is conducted by Chunwei Tian, Ruibin Zhuge, Zhihao Wu, Yong Xu, Wangmeng Zuo, Chen Chen and Chia-Wen Lin, and accepted by Knowledge-Based Systems (IF:8.139) in 2020. It is implemented by Pytorch. And it is reported by Cver and 52CV. Its website is https://mp.weixin.qq.com/s/njlAEQXxjXKqFcxM7KYiqA. Its codes has been converted as CoreML format (for IOS) by the Japan engineer, where its link is https://github.com/john-rocky/CoreML-Models/blob/master/README.md#lesrcnn.\n\n\n## This paper uses a flexible sub-pixel convolutional technique for image blind super-resolution, which is useful for phones and cameras. Also, it has less parameters and faster super-resolution speed. \n\n\nhttps://user-images.githubusercontent.com/25679314/195232308-d6883b2c-d3e0-4c03-9f64-3969e67e3a98.mp4\n\n\n### Abstract\n#### Deep convolutional neural networks (CNNs) with strong expressive ability have achieved impressive performances on single image super-resolution (SISR). However, their excessive amounts ofconvolutions and parameters usually consume high computational cost and more memory storagefor training a SR model, which limits their applications to SR with resource-constrained devicesin real world. To resolve these problems, we propose a lightweight enhanced SR CNN (LESRCNN) with three successive sub-blocks, an information extraction and enhancement block (IEEB), a reconstruction block (RB) and an information refinement block (IRB). Specifically, the IEEB extracts hierarchical low-resolution (LR) features and aggregates the obtained features step-by-step to increase the memory ability of the shallow layers on deep layers for SISR. To remove redundant information obtained, a heterogeneous architecture is adopted in the IEEB. After that, the RB converts low-frequency features into high-frequency features by fusing global and local features, which is complementary with the IEEB in tackling the long-term dependency problem. Finally,the IRB uses coarse high-frequency features from the RB to learn more accurate SR features and construct a SR image. The proposed LESRCNN can obtain a high-quality image by a model fordifferent scales.  Extensive experiments demonstrate that the proposed LESRCNN outperforms state-of-the-arts on SISR in terms of qualitative and quantitative evaluation. \n\n## Requirements (Pytorch)  \n#### Pytorch 0.41\n#### Python 2.7\n#### torchvision \n#### openCv for Python\n#### HDF5 for Python\n#### Numpy, Scipy\n#### Pillow, Scikit-image\n#### importlib\n\n## Commands\n### Training datasets \n#### The  training dataset is downloaded at https://pan.baidu.com/s/1uqdUsVjnwM_6chh3n46CqQ （secret code：auh1）(baiduyun) or https://drive.google.com/file/d/1TNZeV0pkdPlYOJP1TdWvu5uEroH-EmP8/view (google drive)\n\n### Test datasets \n#### The  test dataset of Set5 is downloaded at 链接：https://pan.baidu.com/s/1YqoDHEb-03f-AhPIpEHDPQ (secret code：atwu) (baiduyun) or https://drive.google.com/file/d/1hlwSX0KSbj-V841eESlttoe9Ew7r-Iih/view?usp=sharing (google drive) \n#### The  test dataset of Set14 is downloaded at 链接：https://pan.baidu.com/s/1GnGD9elL0pxakS6XJmj4tA (secret code：vsks) (baiduyun) or https://drive.google.com/file/d/1us_0sLBFxFZe92wzIN-r79QZ9LINrxPf/view?usp=sharing (google drive) \n#### The  test dataset of B100 is downloaded at 链接：https://pan.baidu.com/s/1GV99jmj2wrEEAQFHSi8jWw （secret code：fhs2) (baiduyun) or https://drive.google.com/file/d/1G8FCPxPEVzaBcZ6B-w-7Mk8re2WwUZKl/view?usp=sharing (google drive) \n#### The  test dataset of Urban100 is downloaded at 链接：https://pan.baidu.com/s/15k55SkO6H6A7zHofgHk9fw (secret code：2hny) (baiduyun) or https://drive.google.com/file/d/1yArL2Wh79Hy2i7_YZ8y5mcdAkFTK5HOU/view?usp=sharing (google drive) \n\n### preprocessing\n### cd dataset\n### python div2h5.py\n\n### Training a model for single scale  \n### x2\n#### python x2/train.py --patch_size 64 --batch_size 64 --max_steps 600000 --decay 400000 --model lesrcnn --ckpt_name lesrcnn_x2 --ckpt_dir checkpoint/lesrcnn_x2 --scale 2 --num_gpu 1       \n\n### x3\n#### python x3/train.py --patch_size 64 --batch_size 64 --max_steps 600000 --decay 400000 --model lesrcnn --ckpt_name lesrcnn_x3 --ckpt_dir checkpoint/lesrcnn_x3 --scale 3 --num_gpu 1 \n\n### x4\n#### python x4/train.py --patch_size 64 --batch_size 64 --max_steps 600000 --decay 400000 --model lesrcnn --ckpt_name lesrcnn_x4 --ckpt_dir checkpoint/lesrcnn_x4 --scale 4 --num_gpu 1 \n\n### Training a model for different scales (also regarded as blind SR)\n#### python lesrcnn_b/train.py --patch_size 64 --batch_size 64 --max_steps 600000 --decay 400000 --model lesrcnn --ckpt_name lesrcnn --ckpt_dir checkpoint/lesrcnn --scale 0 --num_gpu 1 \n\n\n### Test \n### Single SR mode for x2\n#### python x2/tcw_sample.py --model lesrcnn --test_data_dir dataset/Urban100 --scale 2 --ckpt_path ./x2/lesrcnn_x2.pth --sample_dir samples_singlemodel_urban100_x2\n\n### Single SR model for x3\n#### python x3/tcw_sample.py --model lesrcnn --test_data_dir dataset/Urban100 --scale 3 --ckpt_path ./x3/lesrcnn_x3.pth --sample_dir samples_singlemodel_urban100_x3\n\n### Single SR model for x4\n#### python x4/tcw_sample.py --model lesrcnn --test_data_dir dataset/Urban100 --scale 4 --ckpt_path ./x4/lesrcnn_x4.pth --sample_dir samples_singlemodel_urban100_x4\n\n\n### Using a model to test different scales of 2,3 and 4 (also regarded as blind SR)\n#### python lesrcnn_b/tcw_sample_b.py --model lesrcnn --test_data_dir dataset/Urban100 --scale 2 --ckpt_path lesrcnn_b/lesrcnn.pth  --sample_dir samples_singlemodel_urban100_x2\n\n#### python lesrcnn_b/tcw_sample_b.py --model lesrcnn --test_data_dir dataset/Urban100 --scale 3 --ckpt_path lesrcnn_b/lesrcnn.pth  --sample_dir samples_singlemodel_urban100_x3\n\n#### python lesrcnn_b/tcw_sample_b.py --model lesrcnn --test_data_dir dataset/Urban100 --scale 4 --ckpt_path lesrcnn_b/lesrcnn.pth  --sample_dir samples_singlemodel_urban100_x4 \n\n\n### The Network architecture, principle and results of LESRCNN\n\n### 1. Network architecture of LESRCNN.\n![RUNOOB 图标](./results/fig1.jpg)\n\n### 2. Varying scales for upsampling operations.\n![RUNOOB 图标](./results/fig2.jpg)\n\n### 3. Effectivenss of key components of LESRCNN.\n![RUNOOB 图标](./results/Table1.jpg)\n\n### 4. Running time of key components of LESRCNN.\n![RUNOOB 图标](./results/Table2.jpg)\n\n### 5. Complexity of key components of LESRCNN.\n![RUNOOB 图标](./results/Table3.jpg)\n\n### 6. LESRCNN for x2, x3 and x4 on Set5.\n![RUNOOB 图标](./results/Table4.jpg)\n\n### 7. LESRCNN for x2, x3 and x4 on Set14.\n![RUNOOB 图标](./results/Table5.jpg)\n\n### 8. LESRCNN for x2, x3 and x4 on B100.\n![RUNOOB 图标](./results/Table6.jpg)\n\n### 9. LESRCNN for x2, x3 and x4 on U100.\n![RUNOOB 图标](./results/Table7.jpg)\n\n### 9. Running time of different methods on hr images of size 256x256, 512x512 and 1024x1024 for x2.\n![RUNOOB 图标](./results/Table8.jpg)\n\n### 10. Complexities of different methods for x2.\n![RUNOOB 图标](./results/Table9.jpg)\n\n### 11. Visual results of U100 for x2.\n![RUNOOB 图标](./results/Fig3.jpg)\n\n### 12. Visual results of Set14 for x3.\n![RUNOOB 图标](./results/Fig4.jpg)\n\n### 13. Visual results of B100 for x4.\n![RUNOOB 图标](./results/Fig5.jpg)\n\n\n### If you cite this paper, please the following format:  \n#### 1.Tian C, Zhuge R, Wu Z, et al. Lightweight image super-resolution with enhanced CNN[J]. Knowledge-Based Systems, 2020: 106235.\n#### 2.@article{tian2020lightweight,\n####  title={Lightweight Image Super-Resolution with Enhanced CNN},\n####  author={Tian, Chunwei and Zhuge, Ruibin and Wu, Zhihao and Xu, Yong and Zuo, Wangmeng and Chen, Chen and Lin, Chia-Wen},\n####  journal={Knowledge-Based Systems},\n####  pages={106235},\n####  year={2020},\n####  publisher={Elsevier}\n####  }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellloxiaotian%2Flesrcnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellloxiaotian%2Flesrcnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellloxiaotian%2Flesrcnn/lists"}