Spaces:
Sleeping
Sleeping
kargaranamir
commited on
v3 to v4.
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
from visual_clutter import Vlc
|
4 |
|
5 |
-
def inference(
|
6 |
-
clt = Vlc(
|
7 |
# get Feature Congestion clutter of a test map:
|
8 |
clutter_scalar_fc, clutter_map_fc = clt.getClutter_FC(p=1, pix=1)
|
9 |
# get Subband Entropy clutter of the test map:
|
@@ -18,11 +18,11 @@ css = ".output_image, .input_image {height: 40rem !important; width: 100% !impor
|
|
18 |
|
19 |
gr.Interface(
|
20 |
inference,
|
21 |
-
[gr.Image(type='
|
22 |
-
[gr.Image(type='
|
23 |
title=title,
|
24 |
description=description,
|
25 |
article=article,
|
26 |
examples=examples,
|
27 |
css=css,
|
28 |
-
).launch(debug=True
|
|
|
2 |
import torch
|
3 |
from visual_clutter import Vlc
|
4 |
|
5 |
+
def inference(img_path):
|
6 |
+
clt = Vlc(img_path, numlevels=3, contrast_filt_sigma=1, contrast_pool_sigma=3, color_pool_sigma=3, prefix='test')
|
7 |
# get Feature Congestion clutter of a test map:
|
8 |
clutter_scalar_fc, clutter_map_fc = clt.getClutter_FC(p=1, pix=1)
|
9 |
# get Subband Entropy clutter of the test map:
|
|
|
18 |
|
19 |
gr.Interface(
|
20 |
inference,
|
21 |
+
[gr.Image(type='file_path', label='Input')],
|
22 |
+
[gr.Image(type='file_path', label='Feature Congestion Output Image'), gr.Textbox(label="Feature Congestion"), gr.Textbox(label="Subband Entropy")],
|
23 |
title=title,
|
24 |
description=description,
|
25 |
article=article,
|
26 |
examples=examples,
|
27 |
css=css,
|
28 |
+
).launch(debug=True)
|