yocabon commited on
Commit
02db12f
1 Parent(s): 83ae704

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +1 -8
demo.py CHANGED
@@ -132,8 +132,6 @@ def get_reconstructed_scene(outdir, model, device, silent, image_size, filelist,
132
  scenegraph_type = scenegraph_type + "-" + str(winsize)
133
  elif scenegraph_type == "oneref":
134
  scenegraph_type = scenegraph_type + "-" + str(refid)
135
- elif scenegraph_type == "matrix":
136
- scenegraph_type = scenegraph_type + "-" + str(winsize)
137
 
138
  pairs = make_pairs(imgs, scene_graph=scenegraph_type, prefilter=None, symmetrize=True)
139
  if optim_level == 'coarse':
@@ -160,11 +158,6 @@ def set_scenegraph_options(inputfiles, winsize, refid, scenegraph_type):
160
  minimum=1, maximum=max_winsize, step=1, visible=False)
161
  refid = gradio.Slider(label="Scene Graph: Id", value=0, minimum=0,
162
  maximum=num_files - 1, step=1, visible=True)
163
- elif scenegraph_type == "matrix":
164
- winsize = gradio.Slider(label="Scene Graph: long period", value=6,
165
- minimum=2, maximum=num_files, step=1, visible=True)
166
- refid = gradio.Slider(label="Scene Graph: Id", value=0, minimum=0,
167
- maximum=num_files - 1, step=1, visible=False)
168
  else:
169
  winsize = gradio.Slider(label="Scene Graph: Window Size", value=max_winsize,
170
  minimum=1, maximum=max_winsize, step=1, visible=False)
@@ -196,7 +189,7 @@ def main_demo(tmpdirname, model, device, image_size, server_name, server_port, s
196
  value='refine', label="OptLevel",
197
  info="Optimization level")
198
 
199
- scenegraph_type = gradio.Dropdown(["complete", "swin", "oneref", 'matrix'],
200
  value='complete', label="Scenegraph",
201
  info="Define how to make pairs",
202
  interactive=True)
 
132
  scenegraph_type = scenegraph_type + "-" + str(winsize)
133
  elif scenegraph_type == "oneref":
134
  scenegraph_type = scenegraph_type + "-" + str(refid)
 
 
135
 
136
  pairs = make_pairs(imgs, scene_graph=scenegraph_type, prefilter=None, symmetrize=True)
137
  if optim_level == 'coarse':
 
158
  minimum=1, maximum=max_winsize, step=1, visible=False)
159
  refid = gradio.Slider(label="Scene Graph: Id", value=0, minimum=0,
160
  maximum=num_files - 1, step=1, visible=True)
 
 
 
 
 
161
  else:
162
  winsize = gradio.Slider(label="Scene Graph: Window Size", value=max_winsize,
163
  minimum=1, maximum=max_winsize, step=1, visible=False)
 
189
  value='refine', label="OptLevel",
190
  info="Optimization level")
191
 
192
+ scenegraph_type = gradio.Dropdown(["complete", "swin", "oneref"],
193
  value='complete', label="Scenegraph",
194
  info="Define how to make pairs",
195
  interactive=True)