File size: 1,646 Bytes
3767934
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Original github repo is [here](https://github.com/greatlog/RealDAN)

If this repo works for you, please cite our paper
```bitex
@article{luo2023end,
  title={End-to-end Alternating Optimization for Real-World Blind Super Resolution},
  author={Luo, Zhengxiong and Huang, Yan and Li, Shang and Wang, Liang and Tan, Tieniu},
  journal={International Journal of Computer Vision (IJCV)},
  year={2023}
}
```

This repo is buid on the basis of [BasicSR](https://github.com/XPixelGroup/BasicSR)

## Model Weights
Download the checkpoints of RealDAN.

Put the downloaded checkpoints into [checkpoints](./checkpoints)


## Inference

For inference on Real-World images

```bash
cd codes/config/RealDAN
python3 inference.py \
--opt options/test/dan_edsr_gan_real.yml \
--input_dir=/dir/of/input/images \
--output_dir=/dir/of/saved/outputs
```

For inference on blurry images

```bash
cd codes/config/KernelDAN
python3 inference.py \
--opt options/test/x4.yml \
--input_dir=/dir/of/input/images \
--output_dir=/dir/of/saved/outputs
```

## Evaluation

For evaluation on DIV2K-Real, please download the dataset to your own path, and run

```bash
cd codes/config/RealDAN
python3 test.py \
--opt options/test/dan_edsr_gan_syn.yml
```

and

```bash
cd codes/config/RealDAN
python3 test.py \
--opt options/test/dan_edsr_syn.yml
```


For evaluation on DIV2KRK, please download the [dataset](http://www.wisdom.weizmann.ac.il/~vision/kernelgan/DIV2KRK_public.zip) to your own path, and run

```bash
cd codes/config/KernelDAN
python3 test.py \
--opt options/test/x2.yml 
```

and

```bash
cd codes/config/KernelDAN
python3 test.py \
--opt options/test/x4.yml 
```