lime-j commited on
Commit
0aacd53
·
verified ·
1 Parent(s): 0d717fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -5,11 +5,11 @@ import os
5
  from db import send_message_to_mongodb
6
  all_property = ['artifact', 'color', 'noise', 'lightness', 'blury']
7
  property_dict = {
8
- 'artifact': 'less artifact',
9
- 'color': 'pleasant color',
10
- 'noise': 'less noise',
11
- 'lightness': 'Illuminated',
12
- 'blury': 'sharp boundary'
13
  }
14
  methods = ['IMGS_Bread', 'IMGS_iat', 'retinexformer_png', 'images', 'IMGS_Kind', 'IMGS_ZeroDCE', 'IMGS_nerco', 'IMGS_quadprior']
15
  method_dict = {
@@ -66,20 +66,20 @@ with gr.Blocks() as block_demo:
66
  # print(str(request))
67
  print(request_state)
68
  image, method1, method2, image1, image2, property, image_input = refresh_comparison()
69
- return image1, image2, f'### Which one is better in terms of **{property_dict[property]}**?',\
70
  image, method1, method2, property, image_input, request_state
71
  with gr.Row():
72
  with gr.Column():
73
  gr.Markdown("<h2 style='font-size: 24px;'>Low-light Image Enhancer Arena 🥊</h2>")
74
  gr.Markdown("<p style='font-size: 18px;'>This is a simple arena to test the performance of different low-light image enhancers.</p>")
75
  gr.Markdown("<p style='font-size: 18px;'>Please help us to find the better image!</p>")
76
- gr.Markdown("<p style='font-size: 18px;'>Failures:</p>")
77
  gr.Markdown("<ul style='font-size: 18px;'>"
78
  f"<li><strong>Artifact:</strong> - There might be unwanted or unintended alterations in the image.</li>"
79
- f"<li><strong>Color Degradation:</strong> - The color recoverd from low-light input is not the same as the color in the input image.</li>"
80
- f"<li><strong>Noise:</strong> - There might be noise in the image.</li>"
81
  f"<li><strong>Poor Illumination:</strong> - The brightness level of the image is not good, it might be too dark or too bright.</li>"
82
- f"<li><strong>Blury:</strong> - The sharpness of the image is not good, it might be too blurry or too sharp.</li>"
83
  "</ul>")
84
  img_input = gr.Image(label="Input Image")
85
 
 
5
  from db import send_message_to_mongodb
6
  all_property = ['artifact', 'color', 'noise', 'lightness', 'blury']
7
  property_dict = {
8
+ 'artifact': 'hase less artifact',
9
+ 'color': 'has pleasant color',
10
+ 'noise': 'is less noisy',
11
+ 'lightness': 'is well illuminated',
12
+ 'blury': 'has sharp boundary'
13
  }
14
  methods = ['IMGS_Bread', 'IMGS_iat', 'retinexformer_png', 'images', 'IMGS_Kind', 'IMGS_ZeroDCE', 'IMGS_nerco', 'IMGS_quadprior']
15
  method_dict = {
 
66
  # print(str(request))
67
  print(request_state)
68
  image, method1, method2, image1, image2, property, image_input = refresh_comparison()
69
+ return image1, image2, f'### Which one **{property_dict[property]}**?',\
70
  image, method1, method2, property, image_input, request_state
71
  with gr.Row():
72
  with gr.Column():
73
  gr.Markdown("<h2 style='font-size: 24px;'>Low-light Image Enhancer Arena 🥊</h2>")
74
  gr.Markdown("<p style='font-size: 18px;'>This is a simple arena to test the performance of different low-light image enhancers.</p>")
75
  gr.Markdown("<p style='font-size: 18px;'>Please help us to find the better image!</p>")
76
+ gr.Markdown("<p style='font-size: 18px;'>Common Failures:</p>")
77
  gr.Markdown("<ul style='font-size: 18px;'>"
78
  f"<li><strong>Artifact:</strong> - There might be unwanted or unintended alterations in the image.</li>"
79
+ f"<li><strong>Color Degradation:</strong> - The color recovered from low-light input is unnatural.</li>"
80
+ f"<li><strong>Noise:</strong> - Noise is polluted during imaging, and the low-light enhancer failed to eliminate it.</li>"
81
  f"<li><strong>Poor Illumination:</strong> - The brightness level of the image is not good, it might be too dark or too bright.</li>"
82
+ f"<li><strong>Blury:</strong> - The sharpness of the image is not good, possibly due to an overshooting denoising.</li>"
83
  "</ul>")
84
  img_input = gr.Image(label="Input Image")
85