Spaces:
Runtime error
Runtime error
lyndonzheng
commited on
Commit
Β·
8287c2f
1
Parent(s):
13398c7
update bugs
Browse files
app.py
CHANGED
@@ -48,12 +48,14 @@ def main():
|
|
48 |
model.cfg.dataset.width, model.cfg.dataset.height = image.size
|
49 |
model.set_backproject()
|
50 |
else:
|
|
|
51 |
image = TTF.resize(
|
52 |
image, (cfg.dataset.height, cfg.dataset.width),
|
53 |
interpolation=TT.InterpolationMode.BICUBIC
|
54 |
)
|
55 |
if padding:
|
56 |
image = pad_border_fn(image)
|
|
|
57 |
else:
|
58 |
model.cfg.dataset.pad_border_aug = 0
|
59 |
return image
|
@@ -93,7 +95,7 @@ def main():
|
|
93 |
gr.Markdown(
|
94 |
"""
|
95 |
# Flash3D
|
96 |
-
**Flash3D** [[project page](https://www.robots.ox.ac.uk/~vgg/research/flash3d/)] is a fast, super efficient,
|
97 |
The model used in the demo was trained on only **RealEstate10k dataset on a single A6000 GPU within 1 day**.
|
98 |
Upload an image of a scene or click on one of the provided examples to see how the Flash3D does.
|
99 |
The 3D viewer will render a .ply scene exported from the 3D Gaussians, which is only an approximation.
|
@@ -113,7 +115,7 @@ def main():
|
|
113 |
submit = gr.Button("Generate", elem_id="generate", variant="primary")
|
114 |
|
115 |
with gr.Row():
|
116 |
-
dynamic_size = gr.Checkbox(True, interactive=True, label='Use the original image
|
117 |
padding = gr.Checkbox(True, interactive=True, label='add padding to the image')
|
118 |
|
119 |
with gr.Row(variant="panel"):
|
|
|
48 |
model.cfg.dataset.width, model.cfg.dataset.height = image.size
|
49 |
model.set_backproject()
|
50 |
else:
|
51 |
+
cfg.dataset.height, cfg.dataset.width = 256, 384
|
52 |
image = TTF.resize(
|
53 |
image, (cfg.dataset.height, cfg.dataset.width),
|
54 |
interpolation=TT.InterpolationMode.BICUBIC
|
55 |
)
|
56 |
if padding:
|
57 |
image = pad_border_fn(image)
|
58 |
+
model.cfg.dataset.pad_border_aug = 32
|
59 |
else:
|
60 |
model.cfg.dataset.pad_border_aug = 0
|
61 |
return image
|
|
|
95 |
gr.Markdown(
|
96 |
"""
|
97 |
# Flash3D
|
98 |
+
**Flash3D** [[project page](https://www.robots.ox.ac.uk/~vgg/research/flash3d/)] is a fast, super efficient, trainable on a single GPU in a day for scene 3D reconstruction from a single image.
|
99 |
The model used in the demo was trained on only **RealEstate10k dataset on a single A6000 GPU within 1 day**.
|
100 |
Upload an image of a scene or click on one of the provided examples to see how the Flash3D does.
|
101 |
The 3D viewer will render a .ply scene exported from the 3D Gaussians, which is only an approximation.
|
|
|
115 |
submit = gr.Button("Generate", elem_id="generate", variant="primary")
|
116 |
|
117 |
with gr.Row():
|
118 |
+
dynamic_size = gr.Checkbox(True, interactive=True, label='Use the original image ratio')
|
119 |
padding = gr.Checkbox(True, interactive=True, label='add padding to the image')
|
120 |
|
121 |
with gr.Row(variant="panel"):
|