Spaces:
Paused
Paused
Commit
·
70db994
1
Parent(s):
092d5ee
upload apple example
Browse files
app.py
CHANGED
|
@@ -170,7 +170,7 @@ def vggsfm_predictions_to_glb(predictions):
|
|
| 170 |
# glbscene.export(file_obj=glbfile)
|
| 171 |
return glbscene
|
| 172 |
|
| 173 |
-
|
| 174 |
# os.path.join(os.path.dirname(__file__), "apple_video.mp4")
|
| 175 |
british_museum_video = "vggsfm_code/examples/videos/british_museum_video.mp4"
|
| 176 |
|
|
@@ -183,7 +183,7 @@ bonsai_video = "vggsfm_code/examples/videos/bonsai_video.mp4"
|
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
-
|
| 187 |
bonsai_images = glob.glob(f'vggsfm_code/examples/bonsai/images/*')
|
| 188 |
cake_images = glob.glob(f'vggsfm_code/examples/cake/images/*')
|
| 189 |
british_museum_images = glob.glob(f'vggsfm_code/examples/british_museum/images/*')
|
|
@@ -215,7 +215,7 @@ with gr.Blocks() as demo:
|
|
| 215 |
with gr.Column(scale=1):
|
| 216 |
input_video = gr.Video(label="Input video", interactive=True)
|
| 217 |
input_images = gr.File(file_count="multiple", label="Input Images", interactive=True)
|
| 218 |
-
num_query_images = gr.Slider(minimum=1, maximum=
|
| 219 |
info="More query images usually lead to better reconstruction at lower speeds. If the viewpoint differences between your images are minimal, you can set this value to 1. ")
|
| 220 |
num_query_points = gr.Slider(minimum=512, maximum=3072, step=1, value=1024, label="Number of query points",
|
| 221 |
info="More query points usually lead to denser reconstruction at lower speeds.")
|
|
@@ -233,6 +233,7 @@ with gr.Blocks() as demo:
|
|
| 233 |
|
| 234 |
examples = [
|
| 235 |
[british_museum_video, british_museum_images, 2, 4096],
|
|
|
|
| 236 |
[bonsai_video, bonsai_images, 3, 2048],
|
| 237 |
[cake_video, cake_images, 3, 2048],
|
| 238 |
]
|
|
|
|
| 170 |
# glbscene.export(file_obj=glbfile)
|
| 171 |
return glbscene
|
| 172 |
|
| 173 |
+
apple_video = "vggsfm_code/examples/videos/apple_video.mp4"
|
| 174 |
# os.path.join(os.path.dirname(__file__), "apple_video.mp4")
|
| 175 |
british_museum_video = "vggsfm_code/examples/videos/british_museum_video.mp4"
|
| 176 |
|
|
|
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
+
apple_images = glob.glob(f'vggsfm_code/examples/apple/images/*')
|
| 187 |
bonsai_images = glob.glob(f'vggsfm_code/examples/bonsai/images/*')
|
| 188 |
cake_images = glob.glob(f'vggsfm_code/examples/cake/images/*')
|
| 189 |
british_museum_images = glob.glob(f'vggsfm_code/examples/british_museum/images/*')
|
|
|
|
| 215 |
with gr.Column(scale=1):
|
| 216 |
input_video = gr.Video(label="Input video", interactive=True)
|
| 217 |
input_images = gr.File(file_count="multiple", label="Input Images", interactive=True)
|
| 218 |
+
num_query_images = gr.Slider(minimum=1, maximum=8, step=1, value=4, label="Number of query images (key frames)",
|
| 219 |
info="More query images usually lead to better reconstruction at lower speeds. If the viewpoint differences between your images are minimal, you can set this value to 1. ")
|
| 220 |
num_query_points = gr.Slider(minimum=512, maximum=3072, step=1, value=1024, label="Number of query points",
|
| 221 |
info="More query points usually lead to denser reconstruction at lower speeds.")
|
|
|
|
| 233 |
|
| 234 |
examples = [
|
| 235 |
[british_museum_video, british_museum_images, 2, 4096],
|
| 236 |
+
[apple_video, apple_images, 5, 2048],
|
| 237 |
[bonsai_video, bonsai_images, 3, 2048],
|
| 238 |
[cake_video, cake_images, 3, 2048],
|
| 239 |
]
|