File size: 1,720 Bytes
a5ea9af
 
 
 
 
 
 
 
5ee0311
 
 
7c0d6eb
 
 
 
a5ea9af
5ee0311
 
7c0d6eb
5ee0311
7c0d6eb
a5ea9af
 
 
 
11472c5
 
 
 
5ee0311
 
a5ea9af
 
 
 
 
 
 
 
 
 
b8dae8a
a5ea9af
 
 
b8dae8a
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
---
license: cc-by-nc-4.0
language:
- en
tags:
- superresolution
- computervision
---

**DCASR**

The DCASR model, trained with the DIV2K dataset, is implemented using TensorFlow. It is capable of image enhancement at x2, x3 and x4 scales. 

DCASR model has been proven to give better results than other SR models compared to other SR models. You can find all the details of the model in the source below.

- <a href="https://doi.org/10.1016/j.jestch.2025.102003" target="_blank">A novel model for higher performance object detection with deep channel attention super resolution</a>

*IMPORTANT: If you are going to use the DCASR model in your academic studies, you must cite the original article.*

Model weights saved for x2, x3 and x4:

- <a href="https://drive.google.com/file/d/1UL_tWB5Pht59ICLdnyxIjKa2BBd4EQ04/view?usp=sharing" target="_blank">DCASR_x2</a>
- <a href="https://drive.google.com/file/d/1Hp94OjYxrXii1alYh5xMg3A7jW0AyOGn/view?usp=sharing" target="_blank">DCASR_x3</a>
- <a href="https://drive.google.com/file/d/1DajIAnpvI1p1_ZRTny-gEDNKVaLuRPv0/view?usp=sharing" target="_blank">DCASR_x4</a>

The model is built in tensorflow 2.14.0. 
```python
  pip install tensorflow==2.14.0
```

**Usage**
```python
  from tensorflow.keras.models import load_model
  from PIL import Image
  from skimage import io
  import tensorflow as tf
  
  device = "/GPU:0" if tf.config.list_physical_devices('GPU') else "/CPU:0"
  print(f"used device: {device}")
  
  model = load_model("DCASR_x2.keras")
  original = io.imread("input/lr_image.png")
  preds = model.predict_step(original)
  preds_np = preds.numpy()
  predicted_image = Image.fromarray(preds_np.astype('uint8'))
  predicted_image.save("output/hr_image.png")