Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -216,7 +216,7 @@ def pano_depth_to_world_points(depth, scale):
|
|
216 |
|
217 |
pts3d = np.concatenate((pts3d, pts), axis=0)
|
218 |
uv = np.concatenate((uv, uvs), axis=0)
|
219 |
-
print(f'i: {i}, j: {j}')
|
220 |
j = j+1
|
221 |
i = i+1
|
222 |
|
@@ -267,11 +267,11 @@ def get_mesh(image, depth):
|
|
267 |
def loadurl(url):
|
268 |
return url
|
269 |
|
270 |
-
def select_index(
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
return
|
276 |
|
277 |
|
@@ -323,8 +323,8 @@ with gr.Blocks(css=css) as demo:
|
|
323 |
input_url.change(fn=loadurl, inputs=[input_url], outputs=[input_video])
|
324 |
output_frame = gr.Gallery(label="Frame", type='numpy', preview=True, columns=8192)
|
325 |
output_depth = gr.Gallery(label="Depth", type='numpy', preview=True, columns=8192)
|
326 |
-
output_frame.select(fn=select_index, inputs=[
|
327 |
-
output_depth.select(fn=select_index, inputs=[
|
328 |
submit = gr.Button("Submit")
|
329 |
with gr.Column():
|
330 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|
|
|
216 |
|
217 |
pts3d = np.concatenate((pts3d, pts), axis=0)
|
218 |
uv = np.concatenate((uv, uvs), axis=0)
|
219 |
+
#print(f'i: {i}, j: {j}')
|
220 |
j = j+1
|
221 |
i = i+1
|
222 |
|
|
|
267 |
def loadurl(url):
|
268 |
return url
|
269 |
|
270 |
+
def select_index(glr):
|
271 |
+
print(glr[0])
|
272 |
+
print(glr[1])
|
273 |
+
output_depth.selected_index = output_frame.selected_index
|
274 |
+
output_frame.selected_index = output_depth.selected_index
|
275 |
return
|
276 |
|
277 |
|
|
|
323 |
input_url.change(fn=loadurl, inputs=[input_url], outputs=[input_video])
|
324 |
output_frame = gr.Gallery(label="Frame", type='numpy', preview=True, columns=8192)
|
325 |
output_depth = gr.Gallery(label="Depth", type='numpy', preview=True, columns=8192)
|
326 |
+
output_frame.select(fn=select_index, inputs=[output_frame], outputs=[])
|
327 |
+
output_depth.select(fn=select_index, inputs=[output_depth], outputs=[])
|
328 |
submit = gr.Button("Submit")
|
329 |
with gr.Column():
|
330 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|