turn-the-cam-anonymous commited on
Commit
86845b7
1 Parent(s): f7f7d9b

small updates

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -11,6 +11,8 @@ def retrieve_input_image_wild(dataset, inputs):
11
  image = Image.open(os.path.join(img_path, '%s.jpg' % img_id))
12
  except:
13
  image = Image.open(os.path.join(img_path, '%s.png' % img_id))
 
 
14
  return image
15
 
16
  def retrieve_input_image(dataset, inputs):
@@ -35,6 +37,7 @@ with gr.Blocks() as demo:
35
  with gr.Row():
36
  with gr.Column(scale=1):
37
  default_input_image = Image.open( os.path.join('online_demo', 'nerf_wild', 'step-100_scale-6.0', 'car1.png'))
 
38
  input_image = gr.Image(default_input_image, shape=[256, 256])
39
  options = sorted(next(os.walk('online_demo/nerf_wild/step-100_scale-6.0'))[1])
40
  img_id = gr.Dropdown(options, value='car1', label='options')
@@ -58,6 +61,7 @@ with gr.Blocks() as demo:
58
  with gr.Row():
59
  with gr.Column(scale=1):
60
  default_input_image = Image.open( os.path.join('online_demo', 'GSO', 'step-100_scale-6.0', 'SAMBA_HEMP', 'input.png'))
 
61
  input_image = gr.Image(default_input_image, shape=[256, 256])
62
  options = sorted(os.listdir('online_demo/GSO/step-100_scale-6.0'))
63
  img_id = gr.Dropdown(options, value='SAMBA_HEMP', label='options')
@@ -81,6 +85,7 @@ with gr.Blocks() as demo:
81
  with gr.Row():
82
  with gr.Column(scale=1):
83
  default_input_image = Image.open( os.path.join('online_demo', 'RTMV', 'step-100_scale-6.0', '00000', 'input.png'))
 
84
  input_image = gr.Image(default_input_image, shape=[256, 256])
85
  options = sorted(os.listdir('online_demo/RTMV/step-100_scale-6.0'))
86
  img_id = gr.Dropdown(options, value='00000', label='options')
 
11
  image = Image.open(os.path.join(img_path, '%s.jpg' % img_id))
12
  except:
13
  image = Image.open(os.path.join(img_path, '%s.png' % img_id))
14
+
15
+ image.thumbnail([256, 256], Image.Resampling.LANCZOS)
16
  return image
17
 
18
  def retrieve_input_image(dataset, inputs):
 
37
  with gr.Row():
38
  with gr.Column(scale=1):
39
  default_input_image = Image.open( os.path.join('online_demo', 'nerf_wild', 'step-100_scale-6.0', 'car1.png'))
40
+ default_input_image.thumbnail([256, 256], Image.Resampling.LANCZOS)
41
  input_image = gr.Image(default_input_image, shape=[256, 256])
42
  options = sorted(next(os.walk('online_demo/nerf_wild/step-100_scale-6.0'))[1])
43
  img_id = gr.Dropdown(options, value='car1', label='options')
 
61
  with gr.Row():
62
  with gr.Column(scale=1):
63
  default_input_image = Image.open( os.path.join('online_demo', 'GSO', 'step-100_scale-6.0', 'SAMBA_HEMP', 'input.png'))
64
+ default_input_image.thumbnail([256, 256], Image.Resampling.LANCZOS)
65
  input_image = gr.Image(default_input_image, shape=[256, 256])
66
  options = sorted(os.listdir('online_demo/GSO/step-100_scale-6.0'))
67
  img_id = gr.Dropdown(options, value='SAMBA_HEMP', label='options')
 
85
  with gr.Row():
86
  with gr.Column(scale=1):
87
  default_input_image = Image.open( os.path.join('online_demo', 'RTMV', 'step-100_scale-6.0', '00000', 'input.png'))
88
+ default_input_image.thumbnail([256, 256], Image.Resampling.LANCZOS)
89
  input_image = gr.Image(default_input_image, shape=[256, 256])
90
  options = sorted(os.listdir('online_demo/RTMV/step-100_scale-6.0'))
91
  img_id = gr.Dropdown(options, value='00000', label='options')