Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -258,7 +258,7 @@ def pano_depth_to_world_points(depth):
|
|
258 |
|
259 |
pts = np.stack([x, y, z], axis=1)
|
260 |
uvs = np.stack([lon/np.pi/2, lat/np.pi], axis=1)
|
261 |
-
nls = np.stack([nx, ny, nz], axis=1)
|
262 |
|
263 |
pts3d = np.concatenate((pts3d, pts), axis=0)
|
264 |
uv = np.concatenate((uv, uvs), axis=0)
|
@@ -785,7 +785,7 @@ with gr.Blocks(css=css, js=js) as demo:
|
|
785 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|
786 |
processed_video = gr.Video(label="Output Video", format="mp4")
|
787 |
processed_zip = gr.File(label="Output Archive")
|
788 |
-
result = gr.Model3D(label="3D Mesh", clear_color=[0.5, 0.5, 0.5, 0.0], camera_position=[0, 90, 0], zoom_speed=2.0, pan_speed=2.0, interactive=True, elem_id="model3D")
|
789 |
svg_in = gr.HTML(value="""<svg id='svg_in' height='32' width='256' viewBox='0 0 256 32' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='touch-action:none;background-color:#808080;' onpointerdown='
|
790 |
try{
|
791 |
if (document.getElementById(\"pl\").getAttribute(\"points\").slice(0,5) == \"-1,0 \") {
|
|
|
258 |
|
259 |
pts = np.stack([x, y, z], axis=1)
|
260 |
uvs = np.stack([lon/np.pi/2, lat/np.pi], axis=1)
|
261 |
+
nls = np.stack([-nx, -ny, -nz], axis=1)
|
262 |
|
263 |
pts3d = np.concatenate((pts3d, pts), axis=0)
|
264 |
uv = np.concatenate((uv, uvs), axis=0)
|
|
|
785 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|
786 |
processed_video = gr.Video(label="Output Video", format="mp4")
|
787 |
processed_zip = gr.File(label="Output Archive")
|
788 |
+
result = gr.Model3D(label="3D Mesh", display_mode="point_cloud", clear_color=[0.5, 0.5, 0.5, 0.0], camera_position=[0, 90, 0], zoom_speed=2.0, pan_speed=2.0, interactive=True, elem_id="model3D")
|
789 |
svg_in = gr.HTML(value="""<svg id='svg_in' height='32' width='256' viewBox='0 0 256 32' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='touch-action:none;background-color:#808080;' onpointerdown='
|
790 |
try{
|
791 |
if (document.getElementById(\"pl\").getAttribute(\"points\").slice(0,5) == \"-1,0 \") {
|