Update README.md
Browse files123456782 unmodified lines11121314151617181920212223242526275 unmodified lines33343536373839404142434445464748495051525354555657585960616263646566676869707172737475---license: mittags:- code---<!--* @Author: Yaozzz666* @Date: 2025-03-21 13:49:252 unmodified lines** Copyright (c) 2025 by ${Yaozzz666}, All Rights Reserved.--># [NTIRE 2025 Challenge on Efficient Super-Resolution](https://cvlai.net/ntire/2025/) @ [CVPR 2025](https://cvpr.thecvf.com/)## Distillation Supervised ConvLora Finetuning for SR<div align=center><img src="https://huggingface.co/sssefe/DSCLoRA/resolve/main/figs/DSCF_arch.png" width="800px"/></div>- An overview of our DSCF-SR## The EnvironmentsThe evaluation environments adopted by us is recorded in the `requirements.txt`. After you built your own basic Python (Python = 3.9 in our setting) setup via either *virtual environment* or *anaconda*, please try to keep similar to it via:5 unmodified linesor take it as a reference based on your original environments.## How to test the model?1. Run the [`run.sh`](./run.sh)```bashCUDA_VISIBLE_DEVICES=0 python test_demo.py --data_dir [path to your data dir] --save_dir [path to your save dir] --model_id 23```- Be sure the change the directories `--data_dir` and `--save_dir`.## How to calculate the number of parameters, FLOPs, and activations```pythonfrom utils.model_summary import get_model_flops, get_model_activationfrom models.team00_EFDN import EFDNfrom fvcore.nn import FlopCountAnalysismodel = EFDN()input_dim = (3, 256, 256) # set the input dimensionactivations, num_conv = get_model_activation(model, input_dim)activations = activations / 10 ** 6print("{:>16s} : {:<.4f} [M]".format("#Activations", activations))print("{:>16s} : {:<d}".format("#Conv2d", num_conv))# The FLOPs calculation in previous NTIRE_ESR Challenge# flops = get_model_flops(model, input_dim, False)# flops = flops / 10 ** 9# print("{:>16s} : {:<.4f} [G]".format("FLOPs", flops))# fvcore is used in NTIRE2025_ESR for FLOPs calculationinput_fake = torch.rand(1, 3, 256, 256).to(device)flops = FlopCountAnalysis(model, input_fake).total()flops = flops/10**9print("{:>16s} : {:<.4f} [G]".format("FLOPs", flops))num_parameters = sum(map(lambda x: x.numel(), model.parameters()))num_parameters = num_parameters / 10 ** 6print("{:>16s} : {:<.4f} [M]".format("#Params", num_parameters))```## License and AcknowledgementThis code repository is release under [MIT License](LICENSE).1232 unmodified lines678910111213141516171819202122232425262728293031323334353637383940415 unmodified lines47484950515253545556575859606162636465666768697071<!--* @Author: Yaozzz666* @Date: 2025-03-21 13:49:252 unmodified lines** Copyright (c) 2025 by ${Yaozzz666}, All Rights Reserved.--><h1 align="center"><a href="https://arxiv.org/abs/2504.11271">Distillation-Supervised Convolutional Low-Rank Adaptation for Efficient Image Super-Resolution</a></h1><div align="center"><a href="https://arxiv.org/abs/2504.11271" style="text-decoration:none;"><img src="https://img.shields.io/badge/cs.CV-2504.11271-%23B22222" alt="cs.CV"></a></div>## π The Architecture of DSCLoRA Model<div align=center><img src="https://huggingface.co/sssefe/DSCLoRA/resolve/main/figs/DSCF_arch.png" width="800px"/></div>We replace the SPAB module with the proposed SConvLB module and incorporateConvLoRA layers into both the pixel shuffle block and its preceding convolutional layer. Spatial Affinity Distillation Loss is calculatedbetween each feature map.## π Updates* [2025.04.21] β Upload our model here.* [2025.04.15] π Our [paper](https://arxiv.org/abs/2504.11271) is accepted to CVPR 2025 Workshop!* [2025.03.26] π Our team won **1st** place in the [NTIRE 2025 Efficient SR Challenge](https://cvlai.net/ntire/2025/). Challenge report is [here](https://arxiv.org/abs/2504.10686).* [2025.03.21] β Release our code on [github](https://github.com/Yaozzz666/DSCF-SR).## π§ The EnvironmentsThe evaluation environments adopted by us is recorded in the `requirements.txt`. After you built your own basic Python (Python = 3.9 in our setting) setup via either *virtual environment* or *anaconda*, please try to keep similar to it via:5 unmodified linesor take it as a reference based on your original environments.## β‘ How to test the model?1. Run the [`run.sh`](./run.sh)```bashCUDA_VISIBLE_DEVICES=0 python test_demo.py --data_dir [path to your data dir] --save_dir [path to your save dir] --model_id 23```- Be sure the change the directories `--data_dir` and `--save_dir`.## π₯° CitationIf our work is useful to you, please use the following BibTeX for citation.```@inproceedings{Chai2025DistillationSupervisedCL,title={Distillation-Supervised Convolutional Low-Rank Adaptation for Efficient Image Super-Resolution},author={Xinning Chai and Yao Zhang and Yuxuan Zhang and Zhengxue Cheng and Yingsheng Qin and Yucai Yang and Li Song},year={2025},url={https://api.semanticscholar.org/CorpusID:277787382}}```## π License and AcknowledgementThis code repository is release under [MIT License](LICENSE).
README.md+37-41