Update README.md
Browse files
README.md
CHANGED
|
@@ -1,8 +1,3 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
tags:
|
| 4 |
-
- code
|
| 5 |
-
---
|
| 6 |
<!--
|
| 7 |
* @Author: Yaozzz666
|
| 8 |
* @Date: 2025-03-21 13:49:25
|
|
@@ -11,17 +6,36 @@ tags:
|
|
| 11 |
*
|
| 12 |
* Copyright (c) 2025 by ${Yaozzz666}, All Rights Reserved.
|
| 13 |
-->
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
## Distillation Supervised ConvLora Finetuning for SR
|
| 17 |
|
|
|
|
| 18 |
<div align=center>
|
| 19 |
-
<img src="https://huggingface.co/sssefe/DSCLoRA/resolve/main/figs/DSCF_arch.png" width="800px"/>
|
| 20 |
</div>
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
The 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:
|
| 27 |
|
|
@@ -33,43 +47,25 @@ The evaluation environments adopted by us is recorded in the `requirements.txt`.
|
|
| 33 |
|
| 34 |
or take it as a reference based on your original environments.
|
| 35 |
|
| 36 |
-
## How to test the model?
|
| 37 |
1. Run the [`run.sh`](./run.sh)
|
| 38 |
```bash
|
| 39 |
CUDA_VISIBLE_DEVICES=0 python test_demo.py --data_dir [path to your data dir] --save_dir [path to your save dir] --model_id 23
|
| 40 |
```
|
| 41 |
- Be sure the change the directories `--data_dir` and `--save_dir`.
|
| 42 |
|
| 43 |
-
## How to calculate the number of parameters, FLOPs, and activations
|
| 44 |
-
|
| 45 |
-
```python
|
| 46 |
-
from utils.model_summary import get_model_flops, get_model_activation
|
| 47 |
-
from models.team00_EFDN import EFDN
|
| 48 |
-
from fvcore.nn import FlopCountAnalysis
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
input_dim = (3, 256, 256) # set the input dimension
|
| 53 |
-
activations, num_conv = get_model_activation(model, input_dim)
|
| 54 |
-
activations = activations / 10 ** 6
|
| 55 |
-
print("{:>16s} : {:<.4f} [M]".format("#Activations", activations))
|
| 56 |
-
print("{:>16s} : {:<d}".format("#Conv2d", num_conv))
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
flops = FlopCountAnalysis(model, input_fake).total()
|
| 66 |
-
flops = flops/10**9
|
| 67 |
-
print("{:>16s} : {:<.4f} [G]".format("FLOPs", flops))
|
| 68 |
-
|
| 69 |
-
num_parameters = sum(map(lambda x: x.numel(), model.parameters()))
|
| 70 |
-
num_parameters = num_parameters / 10 ** 6
|
| 71 |
-
print("{:>16s} : {:<.4f} [M]".format("#Params", num_parameters))
|
| 72 |
```
|
| 73 |
|
| 74 |
-
## License and Acknowledgement
|
| 75 |
-
This code repository is release under [MIT License](LICENSE).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
<!--
|
| 2 |
* @Author: Yaozzz666
|
| 3 |
* @Date: 2025-03-21 13:49:25
|
|
|
|
| 6 |
*
|
| 7 |
* Copyright (c) 2025 by ${Yaozzz666}, All Rights Reserved.
|
| 8 |
-->
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
<h1 align="center">
|
| 12 |
+
<a href="https://arxiv.org/abs/2504.11271">
|
| 13 |
+
Distillation-Supervised Convolutional Low-Rank Adaptation for Efficient Image Super-Resolution
|
| 14 |
+
</a>
|
| 15 |
+
</h1>
|
| 16 |
+
|
| 17 |
+
<div align="center">
|
| 18 |
+
<a href="https://arxiv.org/abs/2504.11271" style="text-decoration:none;">
|
| 19 |
+
<img src="https://img.shields.io/badge/cs.CV-2504.11271-%23B22222" alt="cs.CV">
|
| 20 |
+
</a>
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
|
|
|
|
| 24 |
|
| 25 |
+
## π The Architecture of DSCLoRA Model
|
| 26 |
<div align=center>
|
| 27 |
+
<img src="https://huggingface.co/sssefe/DSCLoRA/resolve/main/figs/DSCF_arch.png" width="800px"/>
|
| 28 |
</div>
|
| 29 |
+
We replace the SPAB module with the proposed SConvLB module and incorporate
|
| 30 |
+
ConvLoRA layers into both the pixel shuffle block and its preceding convolutional layer. Spatial Affinity Distillation Loss is calculated
|
| 31 |
+
between each feature map.
|
| 32 |
|
| 33 |
+
## π Updates
|
| 34 |
+
* [2025.04.21] β
Upload our model here.
|
| 35 |
+
* [2025.04.15] π Our [paper](https://arxiv.org/abs/2504.11271) is accepted to CVPR 2025 Workshop!
|
| 36 |
+
* [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).
|
| 37 |
+
* [2025.03.21] β
Release our code on [github](https://github.com/Yaozzz666/DSCF-SR).
|
| 38 |
+
## π§ The Environments
|
| 39 |
|
| 40 |
The 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:
|
| 41 |
|
|
|
|
| 47 |
|
| 48 |
or take it as a reference based on your original environments.
|
| 49 |
|
| 50 |
+
## β‘ How to test the model?
|
| 51 |
1. Run the [`run.sh`](./run.sh)
|
| 52 |
```bash
|
| 53 |
CUDA_VISIBLE_DEVICES=0 python test_demo.py --data_dir [path to your data dir] --save_dir [path to your save dir] --model_id 23
|
| 54 |
```
|
| 55 |
- Be sure the change the directories `--data_dir` and `--save_dir`.
|
| 56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
+
## π₯° Citation
|
| 59 |
+
If our work is useful to you, please use the following BibTeX for citation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
+
```
|
| 62 |
+
@inproceedings{Chai2025DistillationSupervisedCL,
|
| 63 |
+
title={Distillation-Supervised Convolutional Low-Rank Adaptation for Efficient Image Super-Resolution},
|
| 64 |
+
author={Xinning Chai and Yao Zhang and Yuxuan Zhang and Zhengxue Cheng and Yingsheng Qin and Yucai Yang and Li Song},
|
| 65 |
+
year={2025},
|
| 66 |
+
url={https://api.semanticscholar.org/CorpusID:277787382}
|
| 67 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
```
|
| 69 |
|
| 70 |
+
## π License and Acknowledgement
|
| 71 |
+
This code repository is release under [MIT License](LICENSE).
|