markmagic commited on
Commit
a281e0b
1 Parent(s): a08472f

init change to zero

Browse files
Files changed (2) hide show
  1. README.md +4 -3
  2. app.py +10 -28
README.md CHANGED
@@ -1,10 +1,11 @@
1
  ---
2
- title: SeemoRe
3
- emoji: 💻
 
4
  colorFrom: purple
5
  colorTo: blue
6
  sdk: gradio
7
- sdk_version: 4.31.5
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
1
  ---
2
+ title: See More Details - Zero
3
+ short_description: Efficient Image Super-Resolution
4
+ emoji: 😊
5
  colorFrom: purple
6
  colorTo: blue
7
  sdk: gradio
8
+ sdk_version: 4.21.0
9
  app_file: app.py
10
  pinned: false
11
  license: mit
app.py CHANGED
@@ -4,6 +4,7 @@ import torch
4
  import argparse
5
  import numpy as np
6
  import gradio as gr
 
7
 
8
  from PIL import Image
9
  from copy import deepcopy
@@ -39,6 +40,7 @@ def load_img (filename, norm=True,):
39
  img = img.astype(np.float32)
40
  return img
41
 
 
42
  def process_img (image):
43
  img = np.array(image)
44
  img = img / 255.
@@ -93,43 +95,22 @@ load_network(model, MODEL_NAME, strict=True, param_key='params')
93
 
94
 
95
 
96
- title = "See More Details"
97
- description = ''' ### See More Details: Efficient Image Super-Resolution by Experts Mining - ICML 2024, Vienna, Austria
98
 
99
- #### [Eduard Zamfir<sup>1</sup>](https://eduardzamfir.github.io), [Zongwei Wu<sup>1*</sup>](https://sites.google.com/view/zwwu/accueil), [Nancy Mehta<sup>1</sup>](https://scholar.google.com/citations?user=WwdYdlUAAAAJ&hl=en&oi=ao), [Yulun Zhang<sup>2,3*</sup>](http://yulunzhang.com/) and [Radu Timofte<sup>1</sup>](https://www.informatik.uni-wuerzburg.de/computervision/)
100
 
101
- #### **<sup>1</sup> University of Würzburg, Germany - <sup>2</sup> Shanghai Jiao Tong University, China - <sup>3</sup> ETH Zürich, Switzerland**
102
- #### **<sup>*</sup> Corresponding authors**
103
 
104
- <details>
105
- <summary> <b> Abstract</b> (click me to read)</summary>
106
- <p>
107
- Reconstructing high-resolution (HR) images from low-resolution (LR) inputs poses a significant challenge in image super-resolution (SR). While recent approaches have demonstrated the efficacy of intricate operations customized for various objectives, the straightforward stacking of these disparate operations can result in a substantial computational burden, hampering their practical utility. In response, we introduce **S**eemo**R**e, an efficient SR model employing expert mining. Our approach strategically incorporates experts at different levels, adopting a collaborative methodology. At the macro scale, our experts address rank-wise and spatial-wise informative features, providing a holistic understanding. Subsequently, the model delves into the subtleties of rank choice by leveraging a mixture of low-rank experts. By tapping into experts specialized in distinct key factors crucial for accurate SR, our model excels in uncovering intricate intra-feature details. This collaborative approach is reminiscent of the concept of **see more**, allowing our model to achieve an optimal performance with minimal computational costs in efficient settings
108
- </p>
109
- </details>
110
 
111
-
112
- #### Drag the slider on the super-resolution image left and right to see the changes in the image details. SeemoRe performs x4 upscaling on the input image.
113
-
114
- <br>
115
-
116
- <code>
117
- @inproceedings{zamfir2024details,
118
- title={See More Details: Efficient Image Super-Resolution by Experts Mining},
119
- author={Eduard Zamfir and Zongwei Wu and Nancy Mehta and Yulun Zhang and Radu Timofte},
120
- booktitle={International Conference on Machine Learning},
121
- year={2024},
122
- organization={PMLR}
123
- }
124
- </code>
125
  <br>
126
  '''
127
 
128
 
129
- article = "<p style='text-align: center'><a href='https://eduardzamfir.github.io/seemore' target='_blank'>See More Details: Efficient Image Super-Resolution by Experts Mining</a></p>"
130
 
131
  #### Image,Prompts examples
132
  examples = [
 
133
  ['images/0801x4.png'],
134
  ['images/0840x4.png'],
135
  ['images/0841x4.png'],
@@ -156,8 +137,9 @@ css = """
156
  """
157
 
158
  demo = gr.Interface(
 
159
  fn=process_img,
160
- inputs=[gr.Image(type="pil", label="Input", value="images/0878x4.png"),],
161
  outputs=ImageSlider(label="Super-Resolved Image",
162
  type="pil",
163
  show_download_button=True,
@@ -170,4 +152,4 @@ demo = gr.Interface(
170
  )
171
 
172
  if __name__ == "__main__":
173
- demo.launch()
 
4
  import argparse
5
  import numpy as np
6
  import gradio as gr
7
+ import spaces
8
 
9
  from PIL import Image
10
  from copy import deepcopy
 
40
  img = img.astype(np.float32)
41
  return img
42
 
43
+ @spaces.GPU(enable_queue=True)
44
  def process_img (image):
45
  img = np.array(image)
46
  img = img / 255.
 
95
 
96
 
97
 
98
+ title = "See More Details - Efficient Image Super-Resolution"
99
+ description = '''
100
 
 
101
 
102
+ Drag the slider on the super-resolution image left and right to see the changes in the image details. SeemoRe performs x4 upscaling on the input image.
 
103
 
 
 
 
 
 
 
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  <br>
106
  '''
107
 
108
 
109
+ article = ""
110
 
111
  #### Image,Prompts examples
112
  examples = [
113
+
114
  ['images/0801x4.png'],
115
  ['images/0840x4.png'],
116
  ['images/0841x4.png'],
 
137
  """
138
 
139
  demo = gr.Interface(
140
+ theme='gradio/soft',
141
  fn=process_img,
142
+ inputs=[gr.Image(type="pil", label="Input", value="images/img002x4.png"),],
143
  outputs=ImageSlider(label="Super-Resolved Image",
144
  type="pil",
145
  show_download_button=True,
 
152
  )
153
 
154
  if __name__ == "__main__":
155
+ demo.launch(show_api=False)