turn-the-cam-anonymous commited on
Commit
b938b85
1 Parent(s): 25c2b18

small updates

Browse files
.gitattributes CHANGED
@@ -32,3 +32,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ *.jpg filter=lfs diff=lfs merge=lfs -text
36
+ *.png filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -4,6 +4,15 @@ import os
4
  from PIL import Image
5
  from functools import partial
6
 
 
 
 
 
 
 
 
 
 
7
  def retrieve_input_image(dataset, inputs):
8
  img_id = inputs
9
  img_path = os.path.join('online_demo', dataset, 'step-100_scale-6.0', img_id, 'input.png')
@@ -25,12 +34,12 @@ with gr.Blocks() as demo:
25
  with gr.Tab("In-the-wild Images"):
26
  with gr.Row():
27
  with gr.Column(scale=1):
28
- default_input_image = Image.open( os.path.join('online_demo', 'nerf_wild', 'step-100_scale-6.0', 'car1', 'input.png'))
29
  input_image = gr.Image(default_input_image, shape=[256, 256])
30
- options = sorted(os.listdir('online_demo/nerf_wild/step-100_scale-6.0'))
31
  img_id = gr.Dropdown(options, value='car1', label='options')
32
  text_button = gr.Button("Load Input Image")
33
- retrieve_input_image_dataset = partial(retrieve_input_image, 'nerf_wild')
34
  text_button.click(retrieve_input_image_dataset, inputs=img_id, outputs=input_image)
35
 
36
  with gr.Column(scale=1):
@@ -41,7 +50,7 @@ with gr.Blocks() as demo:
41
  gr.Slider(-0.5, 0.5, value=0, step=0.5, label='Zoom'),
42
  gr.Slider(0, 3, value=1, step=1, label='Random seed')]
43
 
44
- submit_button = gr.Button("Get Novel View")
45
  retrieve_novel_view_dataset = partial(retrieve_novel_view, 'nerf_wild')
46
  submit_button.click(retrieve_novel_view_dataset, inputs=inputs, outputs=novel_view)
47
 
@@ -64,7 +73,7 @@ with gr.Blocks() as demo:
64
  gr.Slider(-0.5, 0.5, value=0, step=0.5, label='Zoom'),
65
  gr.Slider(0, 3, value=1, step=1, label='Random seed')]
66
 
67
- submit_button = gr.Button("Get Novel View")
68
  retrieve_novel_view_dataset = partial(retrieve_novel_view, 'GSO')
69
  submit_button.click(retrieve_novel_view_dataset, inputs=inputs, outputs=novel_view)
70
 
 
4
  from PIL import Image
5
  from functools import partial
6
 
7
+ def retrieve_input_image_wild(dataset, inputs):
8
+ img_id = inputs
9
+ img_path = os.path.join('online_demo', dataset, 'step-100_scale-6.0')
10
+ try:
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):
17
  img_id = inputs
18
  img_path = os.path.join('online_demo', dataset, 'step-100_scale-6.0', img_id, 'input.png')
 
34
  with gr.Tab("In-the-wild Images"):
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')
41
  text_button = gr.Button("Load Input Image")
42
+ retrieve_input_image_dataset = partial(retrieve_input_image_wild, 'nerf_wild')
43
  text_button.click(retrieve_input_image_dataset, inputs=img_id, outputs=input_image)
44
 
45
  with gr.Column(scale=1):
 
50
  gr.Slider(-0.5, 0.5, value=0, step=0.5, label='Zoom'),
51
  gr.Slider(0, 3, value=1, step=1, label='Random seed')]
52
 
53
+ submit_button = gr.Button("Generate Novel View")
54
  retrieve_novel_view_dataset = partial(retrieve_novel_view, 'nerf_wild')
55
  submit_button.click(retrieve_novel_view_dataset, inputs=inputs, outputs=novel_view)
56
 
 
73
  gr.Slider(-0.5, 0.5, value=0, step=0.5, label='Zoom'),
74
  gr.Slider(0, 3, value=1, step=1, label='Random seed')]
75
 
76
+ submit_button = gr.Button("Generate Novel View")
77
  retrieve_novel_view_dataset = partial(retrieve_novel_view, 'GSO')
78
  submit_button.click(retrieve_novel_view_dataset, inputs=inputs, outputs=novel_view)
79
 
online_demo/nerf_wild/step-100_scale-6.0/alma.jpg ADDED

Git LFS Details

  • SHA256: c09e08a12b1cc1545c9dca564a07c8883e10c921e61f03a39497d5c8484e04c3
  • Pointer size: 131 Bytes
  • Size of remote file: 508 kB
online_demo/nerf_wild/step-100_scale-6.0/bike.png ADDED
online_demo/nerf_wild/step-100_scale-6.0/car1.png ADDED
online_demo/nerf_wild/step-100_scale-6.0/car2.png ADDED
online_demo/nerf_wild/step-100_scale-6.0/car3.png ADDED
online_demo/nerf_wild/step-100_scale-6.0/car4.jpg ADDED

Git LFS Details

  • SHA256: 36ec7449a50ae1e569ff9baaef0485157c2be72f777df85864a8353de50987c5
  • Pointer size: 130 Bytes
  • Size of remote file: 80.3 kB
online_demo/nerf_wild/step-100_scale-6.0/chair.png ADDED
online_demo/nerf_wild/step-100_scale-6.0/extinguisher.jpg ADDED

Git LFS Details

  • SHA256: 1d89133a25aca0ae9db18aa74903998f2c8692d690a689ab211bfec16e08a2e0
  • Pointer size: 132 Bytes
  • Size of remote file: 1.91 MB
online_demo/nerf_wild/step-100_scale-6.0/hyrdrant.png ADDED
online_demo/nerf_wild/step-100_scale-6.0/lysol.jpg ADDED

Git LFS Details

  • SHA256: 1ff8349c49d7125f7e9303308428e5b46c2525c19c50123528445f2d872736f6
  • Pointer size: 132 Bytes
  • Size of remote file: 1.96 MB
online_demo/nerf_wild/step-100_scale-6.0/minion.jpg ADDED

Git LFS Details

  • SHA256: 7033d104ffda9b404e1dc247914d13ac067b617c97ea3a21bee1eb51d633288b
  • Pointer size: 131 Bytes
  • Size of remote file: 105 kB
online_demo/nerf_wild/step-100_scale-6.0/phone1.png ADDED
online_demo/nerf_wild/step-100_scale-6.0/phone2.png ADDED
online_demo/nerf_wild/step-100_scale-6.0/picasso.png ADDED
online_demo/nerf_wild/step-100_scale-6.0/pikachu.jpg ADDED

Git LFS Details

  • SHA256: 13c7220456679aa0cf0ed037ebe6fd597414fc9ff04e7f7498d4b41e0a85eb48
  • Pointer size: 131 Bytes
  • Size of remote file: 124 kB
online_demo/nerf_wild/step-100_scale-6.0/sculpture1.jpg ADDED

Git LFS Details

  • SHA256: 46a3ad8bd4e87c2018cf235176849925890020880c24815e564ac6726159ba13
  • Pointer size: 130 Bytes
  • Size of remote file: 34.4 kB
online_demo/nerf_wild/step-100_scale-6.0/sculpture2.jpg ADDED

Git LFS Details

  • SHA256: 42ad9a99b23ca617e983ecbedf54f82378b0e7861743532a9f37dca9339cf03c
  • Pointer size: 130 Bytes
  • Size of remote file: 14 kB
online_demo/nerf_wild/step-100_scale-6.0/spyro.jpg ADDED

Git LFS Details

  • SHA256: d3b73133f8226a65ee9d4da4164fc88e1d8fb35ee3d525e517f5e76218f3ee1d
  • Pointer size: 131 Bytes
  • Size of remote file: 181 kB
online_demo/nerf_wild/step-100_scale-6.0/sunflower.jpg ADDED

Git LFS Details

  • SHA256: 16156b1526c4b620dedf0e282325fd71905de7372ba486962a1dfbb2ec8d52d3
  • Pointer size: 131 Bytes
  • Size of remote file: 596 kB
online_demo/nerf_wild/step-100_scale-6.0/taxi.jpg ADDED

Git LFS Details

  • SHA256: d3f0e9ed251fe64684c64cdc64edc147c29c17eac4ef08d9cb6b0752edd0b9eb
  • Pointer size: 132 Bytes
  • Size of remote file: 1.69 MB
online_demo/nerf_wild/step-100_scale-6.0/yellowduck.jpg ADDED

Git LFS Details

  • SHA256: b46ef56b3ac88d7cb199dd788e1b03a9563dd9af4fdbc4eef2ea4057a362a3f8
  • Pointer size: 132 Bytes
  • Size of remote file: 1.77 MB