{"id":13443314,"url":"https://github.com/Algolzw/NCNet","last_synced_at":"2025-03-20T16:30:57.447Z","repository":{"id":105090625,"uuid":"526824445","full_name":"Algolzw/NCNet","owner":"Algolzw","description":"[AIM \u0026 ECCVW 2022] Fast Nearest Convolution for Real-Time Image Super-Resolution","archived":false,"fork":false,"pushed_at":"2023-03-23T13:38:37.000Z","size":3130,"stargazers_count":71,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-28T06:57:55.559Z","etag":null,"topics":["aim2022","eccv2022","nearest-convolution","real-time","super-resolution","tensorflow2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Algolzw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-08-20T04:27:48.000Z","updated_at":"2024-08-12T01:30:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"87186f76-af74-43c1-9475-460ae110f49e","html_url":"https://github.com/Algolzw/NCNet","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/Algolzw%2FNCNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Algolzw%2FNCNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Algolzw%2FNCNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Algolzw%2FNCNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Algolzw","download_url":"https://codeload.github.com/Algolzw/NCNet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244649778,"owners_count":20487489,"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":["aim2022","eccv2022","nearest-convolution","real-time","super-resolution","tensorflow2"],"created_at":"2024-07-31T03:01:59.055Z","updated_at":"2025-03-20T16:30:56.944Z","avatar_url":"https://github.com/Algolzw.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## Fast Nearest Convolution for Real-Time Image Super-Resolution, AIM \u0026 ECCV Workshops 2022, [[Paper]](https://arxiv.org/abs/2208.11609)\n\n![ts](figs/ts.png)\n\n### Update\n[**2022.11.14**] A more flexible implementation of the nearest convolution initialization is provided in [this issue](https://github.com/Algolzw/NCNet/issues/5).\n\n[**2022.11.12**] We provide a simple implementation of [NCNet model](https://github.com/Algolzw/NCNet/blob/main/torch_code/ncnet.py) using PyTorch in this [torch_code](https://github.com/Algolzw/NCNet/tree/main/torch_code) directory.\n\n[**2022.08.25**] We have uploaded the pretrained model in Releases as [V1.0](https://github.com/Algolzw/NCNet/releases/tag/V1.0)\n\n### Dependencies\n- OS: Ubuntu 18.04\n- Python: Python 3.7\n- Tensorflow 2.9.1\n- nvidia :\n   - cuda: 11.2\n   - cudnn: 8.1.0\n- Other reference requirements\n\n### Performance of our Nearest Convolution\n\n![speed](figs/speed.png)\n\n|  Upsample methods   | CPU  | GPU | NPU | PSNR |\n|  ----  | ----  | ----  | ----  | ----  |\n| nearest  | 23.1ms | **19.0ms** | 55.0ms | 26.67 |\n| bilinear  | 77.7ms | 21.0ms | 128.2ms | **27.67** |\n| Conv3+depth2space  | 30.8ms | 26.5ms | 43.8ms | - |\n| NearestConv+depth2space  | **15.9ms** | 20.3ms | **14.8ms** | 26.67 |\n\n### Model Training\n```python3\npython main.py\n```\nThen the trained keras model will be saved in ```ckpt/basenet/model``` folder.\n\n### Model Validation\n```python3\npython eval.py\n```\nThen the results of original keras model will be saved in ```original_output``` folder and you can calculate the validation PSNR by run ```python calculate_PSNR.py```\n\n### Convert to TFLite\n``` bash\npython generate_tflite.py\n```\nThen the converted tflite model will be saved in ```TFLite ``` folder.\n\n### TFLite Model Validation\n``` bash\npython test_tflite.py\n```\nThen the results of TFLite model will be saved in ```results ``` folder.\n\n### Other Details\n\n* The input image range is [0, 255].\n* Number of parameters: 52,279 (53K)\n* Average PSNR on DIV2K validation data: 30.27 dB\n* Training data: DIV2K.\n\n## Citations\nIf this repo helps your research or work, please consider citing our work.\nThe following is a BibTeX reference.\n\n```\n@inproceedings{luo2023fast,\n  title={Fast nearest convolution for real-time efficient image super-resolution},\n  author={Luo, Ziwei and Li, Youwei and Yu, Lei and Wu, Qi and Wen, Zhihong and Fan, Haoqiang and Liu, Shuaicheng},\n  booktitle={Computer Vision--ECCV 2022 Workshops: Tel Aviv, Israel, October 23--27, 2022, Proceedings, Part II},\n  pages={561--572},\n  year={2023},\n  organization={Springer}\n}\n```\n\n## Contact\nemail: [ziwei.ro@gmail.com]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlgolzw%2FNCNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlgolzw%2FNCNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlgolzw%2FNCNet/lists"}