Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -91,81 +91,24 @@ print ("IMAGE MODEL CKPT:", MODEL_NAME)
|
|
91 |
load_network(model, MODEL_NAME, strict=True, param_key='params')
|
92 |
|
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'],
|
136 |
-
['images/0870x4.png'],
|
137 |
-
['images/0878x4.png'],
|
138 |
-
['images/0884x4.png'],
|
139 |
-
['images/0900x4.png'],
|
140 |
-
['images/img002x4.png'],
|
141 |
-
['images/img003x4.png'],
|
142 |
-
['images/img004x4.png'],
|
143 |
-
['images/img035x4.png'],
|
144 |
-
['images/img053x4.png'],
|
145 |
-
['images/img064x4.png'],
|
146 |
-
['images/img083x4.png'],
|
147 |
-
['images/img092x4.png'],
|
148 |
-
]
|
149 |
|
150 |
css = """
|
151 |
-
|
152 |
width: auto;
|
153 |
height: auto;
|
154 |
max-width: none;
|
155 |
-
}
|
|
|
156 |
"""
|
157 |
|
158 |
demo = gr.Interface(
|
159 |
fn=process_img,
|
160 |
-
inputs=[gr.Image(type="pil", label="
|
161 |
-
outputs=
|
162 |
-
type="pil",
|
163 |
-
show_download_button=True,
|
164 |
-
), #[gr.Image(type="pil", label="Ouput", min_width=500)],
|
165 |
title=title,
|
166 |
-
description=description,
|
167 |
-
article=article,
|
168 |
-
examples=examples,
|
169 |
css=css,
|
170 |
)
|
171 |
|
|
|
91 |
load_network(model, MODEL_NAME, strict=True, param_key='params')
|
92 |
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
'''
|
95 |
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
css = """
|
99 |
+
/* .image-frame img, .image-container img {
|
100 |
width: auto;
|
101 |
height: auto;
|
102 |
max-width: none;
|
103 |
+
}*/
|
104 |
+
footer {visibility: hidden !important;}
|
105 |
"""
|
106 |
|
107 |
demo = gr.Interface(
|
108 |
fn=process_img,
|
109 |
+
inputs=[gr.Image(type="pil", label="Изображение"),],
|
110 |
+
outputs=[gr.Image(type="pil", label="Расширеное изображение", min_width=500)],
|
|
|
|
|
|
|
111 |
title=title,
|
|
|
|
|
|
|
112 |
css=css,
|
113 |
)
|
114 |
|