kargaranamir HF Staff commited on
Commit
c79cf7a
·
1 Parent(s): e44cce4

add scalar metrics

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,8 +11,8 @@ def inference(img):
11
  # get Feature Congestion clutter of a test map:
12
  clutter_scalar_fc, clutter_map_fc = clt.getClutter_FC(p=1, pix=1)
13
  # get Subband Entropy clutter of the test map:
14
- # clutter_scalar_se = clt.getClutter_SE(wlevels=3, wght_chrom=0.0625)
15
- return 'test_collapsed_combine_map.png'
16
 
17
  title = 'Visual Clutter'
18
  description = 'Compute two measures of visual clutter (Feature Congestion and Subband Entropy)'
@@ -23,7 +23,7 @@ css = ".output_image, .input_image {height: 40rem !important; width: 100% !impor
23
  gr.Interface(
24
  inference,
25
  [gr.inputs.Image(type='file', label='Input')],
26
- [gr.outputs.Image(type='file', label='Output')],
27
  title=title,
28
  description=description,
29
  article=article,
 
11
  # get Feature Congestion clutter of a test map:
12
  clutter_scalar_fc, clutter_map_fc = clt.getClutter_FC(p=1, pix=1)
13
  # get Subband Entropy clutter of the test map:
14
+ clutter_scalar_se = clt.getClutter_SE(wlevels=3, wght_chrom=0.0625)
15
+ return ['test_collapsed_combine_map.png', clutter_scalar_fc, clutter_scalar_se]
16
 
17
  title = 'Visual Clutter'
18
  description = 'Compute two measures of visual clutter (Feature Congestion and Subband Entropy)'
 
23
  gr.Interface(
24
  inference,
25
  [gr.inputs.Image(type='file', label='Input')],
26
+ [gr.outputs.Image(type='file', label='Feature Congestion Output Image'), gr.outputs.Textbox(self, type="number", label="Feature Congestion"), gr.outputs.Textbox(self, type="number", label="Subband Entorpy")],
27
  title=title,
28
  description=description,
29
  article=article,