Spaces:
Running
on
Zero
Running
on
Zero
ohayonguy
commited on
Commit
•
1de925c
1
Parent(s):
839dcf3
Improved description
Browse files
app.py
CHANGED
@@ -209,12 +209,12 @@ intro = """
|
|
209 |
Gradio demo for the blind face image restoration version of [Posterior-Mean Rectified Flow: Towards Minimum MSE Photo-Realistic Image Restoration](https://arxiv.org/abs/2410.00418).
|
210 |
You may use this demo to enhance the quality of any image which contains faces.
|
211 |
|
212 |
-
PMRF is a novel photo-realistic image restoration algorithm. It (provably) approximates the optimal estimator that minimizes the Mean Squared Error (MSE) under a perfect perceptual quality constraint. Please refer to our project's page for more details: https://pmrf-ml.github.io/.
|
213 |
|
214 |
*Notes* :
|
215 |
|
216 |
-
1. Our model is designed to restore
|
217 |
-
2. If
|
218 |
3. Too large images may result in out-of-memory error.
|
219 |
"""
|
220 |
|
@@ -244,19 +244,12 @@ This project is released under the <a rel="license" href="https://github.com/oha
|
|
244 |
If you have any questions, please feel free to contact me at <b>[email protected]</b>.
|
245 |
"""
|
246 |
|
247 |
-
css = """
|
248 |
-
#col-container {
|
249 |
-
margin: 0 auto;
|
250 |
-
max-width: 512px;
|
251 |
-
}
|
252 |
-
"""
|
253 |
-
|
254 |
demo = gr.Interface(
|
255 |
inference,
|
256 |
[
|
257 |
gr.Image(label="Input", type="filepath", show_label=True),
|
258 |
gr.Checkbox(label="Randomize seed", value=True),
|
259 |
-
gr.Checkbox(label="The input is an aligned face image", value=False),
|
260 |
gr.Slider(
|
261 |
label="Scale factor (applicable to non-aligned face images)",
|
262 |
minimum=1,
|
@@ -266,7 +259,7 @@ demo = gr.Interface(
|
|
266 |
scale=1,
|
267 |
),
|
268 |
gr.Slider(
|
269 |
-
label="Number of
|
270 |
minimum=1,
|
271 |
maximum=200,
|
272 |
step=1,
|
|
|
209 |
Gradio demo for the blind face image restoration version of [Posterior-Mean Rectified Flow: Towards Minimum MSE Photo-Realistic Image Restoration](https://arxiv.org/abs/2410.00418).
|
210 |
You may use this demo to enhance the quality of any image which contains faces.
|
211 |
|
212 |
+
PMRF is a novel photo-realistic image restoration algorithm. It (provably) approximates the optimal estimator that minimizes the Mean Squared Error (MSE) under a perfect perceptual quality constraint. Our model in this demo is specifically tailored for blind face image restoration. Please refer to our project's page for more details: https://pmrf-ml.github.io/.
|
213 |
|
214 |
*Notes* :
|
215 |
|
216 |
+
1. Our original model is designed to restore low-quality face images, where the image is square, there is *only one* face in the image, and the face is centered and aligned. In this demo, however, we incorporate mechanisms that allow restoring the quality of *any* image that contains *any* number of faces. Thus, the resulting quality of such general images is not guaranteed.
|
217 |
+
2. If your image is not an aligned and square face image, make sure that the checkbox "The input is an aligned and square face image" in *not* marked.
|
218 |
3. Too large images may result in out-of-memory error.
|
219 |
"""
|
220 |
|
|
|
244 |
If you have any questions, please feel free to contact me at <b>[email protected]</b>.
|
245 |
"""
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
demo = gr.Interface(
|
248 |
inference,
|
249 |
[
|
250 |
gr.Image(label="Input", type="filepath", show_label=True),
|
251 |
gr.Checkbox(label="Randomize seed", value=True),
|
252 |
+
gr.Checkbox(label="The input is an aligned and square face image", value=False),
|
253 |
gr.Slider(
|
254 |
label="Scale factor (applicable to non-aligned face images)",
|
255 |
minimum=1,
|
|
|
259 |
scale=1,
|
260 |
),
|
261 |
gr.Slider(
|
262 |
+
label="Number of inference steps (a larger number should lead to better image quality)",
|
263 |
minimum=1,
|
264 |
maximum=200,
|
265 |
step=1,
|