Spaces:
Configuration error
Configuration error
Commit
·
fab34d5
1
Parent(s):
fbd0580
iterative image adding
Browse files- .vscode/launch.json +17 -0
- app.py +13 -6
- demo_cache/input_images_20250917_181443_481650/images/kf_00114.jpg +0 -3
- demo_cache/input_images_20250917_181443_481650/images/kf_00115.jpg +0 -3
- demo_cache/input_images_20250917_181443_481650/images/kf_00116.jpg +0 -3
- demo_cache/input_images_20250917_181443_481650/images/kf_00117.jpg +0 -3
- demo_cache/input_images_20250917_181443_481650/images/kf_00118.jpg +0 -3
- demo_cache/input_images_20250917_181443_481650/images/kf_00119.jpg +0 -3
- demo_cache/input_images_20250917_181443_481650/images/kf_00120.jpg +0 -3
- stream3r/__pycache__/stream_session.cpython-311.pyc +0 -0
.vscode/launch.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "0.2.0",
|
| 3 |
+
"configurations": [
|
| 4 |
+
|
| 5 |
+
{
|
| 6 |
+
"name": "Python: Current File (venv)",
|
| 7 |
+
"type": "debugpy",
|
| 8 |
+
"request": "launch",
|
| 9 |
+
"program": "${file}",
|
| 10 |
+
"console": "integratedTerminal",
|
| 11 |
+
"cwd": "${workspaceFolder}",
|
| 12 |
+
"envFile": "${workspaceFolder}/.env",
|
| 13 |
+
"python": "/home/robot_op/miniconda3/envs/stream3r/bin/python",
|
| 14 |
+
"justMyCode": true
|
| 15 |
+
},
|
| 16 |
+
]
|
| 17 |
+
}
|
app.py
CHANGED
|
@@ -211,7 +211,7 @@ def run_model(target_dir: str, model: STream3R, mode: str="causal", streaming: b
|
|
| 211 |
print(f"Running inference in {'streaming' if streaming else 'batch'} mode...")
|
| 212 |
dtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] >= 8 else torch.float16
|
| 213 |
|
| 214 |
-
session_cache_path: str
|
| 215 |
|
| 216 |
with torch.no_grad():
|
| 217 |
with torch.amp.autocast(dtype=dtype, device_type=device):
|
|
@@ -370,8 +370,8 @@ def update_gallery_on_upload(input_video, input_images, input_zip, session_state
|
|
| 370 |
Handle any new uploads (video, images, or zip) and render preview.
|
| 371 |
"""
|
| 372 |
if not input_video and not input_images and not input_zip and not session_state:
|
| 373 |
-
default_updates = [gr.update()] *
|
| 374 |
-
return (
|
| 375 |
|
| 376 |
target_dir, image_paths, session_loaded = handle_uploads(
|
| 377 |
input_video,
|
|
@@ -400,7 +400,8 @@ def update_gallery_on_upload(input_video, input_images, input_zip, session_state
|
|
| 400 |
mask_sky_update = gr.update()
|
| 401 |
prediction_mode_update = gr.update()
|
| 402 |
|
| 403 |
-
|
|
|
|
| 404 |
|
| 405 |
if session_loaded:
|
| 406 |
settings = load_session_settings(target_dir)
|
|
@@ -450,16 +451,19 @@ def update_gallery_on_upload(input_video, input_images, input_zip, session_state
|
|
| 450 |
f"glbscene_{conf_val}_{sanitize_frame_filter_label(frame_value)}_maskb{mask_black_val}_maskw{mask_white_val}_cam{show_cam_val}_sky{mask_sky_val}_pred{pred_mode_val.replace(' ', '_')}_mode{mode_val}.glb",
|
| 451 |
)
|
| 452 |
if os.path.exists(glb_candidate):
|
| 453 |
-
|
| 454 |
except (KeyError, AttributeError):
|
| 455 |
pass
|
| 456 |
|
|
|
|
|
|
|
| 457 |
return (
|
| 458 |
-
|
| 459 |
target_dir,
|
| 460 |
image_paths,
|
| 461 |
message,
|
| 462 |
None,
|
|
|
|
| 463 |
streaming_update,
|
| 464 |
mode_update,
|
| 465 |
conf_update,
|
|
@@ -939,6 +943,7 @@ with gr.Blocks(
|
|
| 939 |
dropdown,
|
| 940 |
image_paths,
|
| 941 |
session_file,
|
|
|
|
| 942 |
False,
|
| 943 |
mode,
|
| 944 |
conf_thres,
|
|
@@ -974,6 +979,7 @@ with gr.Blocks(
|
|
| 974 |
frame_filter,
|
| 975 |
image_gallery,
|
| 976 |
session_state_output,
|
|
|
|
| 977 |
streaming,
|
| 978 |
mode,
|
| 979 |
conf_thres,
|
|
@@ -1141,6 +1147,7 @@ with gr.Blocks(
|
|
| 1141 |
image_gallery,
|
| 1142 |
log_output,
|
| 1143 |
session_state_output,
|
|
|
|
| 1144 |
streaming,
|
| 1145 |
mode,
|
| 1146 |
conf_thres,
|
|
|
|
| 211 |
print(f"Running inference in {'streaming' if streaming else 'batch'} mode...")
|
| 212 |
dtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] >= 8 else torch.float16
|
| 213 |
|
| 214 |
+
session_cache_path: Optional[str] = None
|
| 215 |
|
| 216 |
with torch.no_grad():
|
| 217 |
with torch.amp.autocast(dtype=dtype, device_type=device):
|
|
|
|
| 370 |
Handle any new uploads (video, images, or zip) and render preview.
|
| 371 |
"""
|
| 372 |
if not input_video and not input_images and not input_zip and not session_state:
|
| 373 |
+
default_updates = [gr.update()] * 10
|
| 374 |
+
return (gr.update(), current_target_dir, None, None, None, *default_updates)
|
| 375 |
|
| 376 |
target_dir, image_paths, session_loaded = handle_uploads(
|
| 377 |
input_video,
|
|
|
|
| 400 |
mask_sky_update = gr.update()
|
| 401 |
prediction_mode_update = gr.update()
|
| 402 |
|
| 403 |
+
reconstruction_update = gr.update()
|
| 404 |
+
session_state_reset = gr.update()
|
| 405 |
|
| 406 |
if session_loaded:
|
| 407 |
settings = load_session_settings(target_dir)
|
|
|
|
| 451 |
f"glbscene_{conf_val}_{sanitize_frame_filter_label(frame_value)}_maskb{mask_black_val}_maskw{mask_white_val}_cam{show_cam_val}_sky{mask_sky_val}_pred{pred_mode_val.replace(' ', '_')}_mode{mode_val}.glb",
|
| 452 |
)
|
| 453 |
if os.path.exists(glb_candidate):
|
| 454 |
+
reconstruction_update = glb_candidate
|
| 455 |
except (KeyError, AttributeError):
|
| 456 |
pass
|
| 457 |
|
| 458 |
+
session_state_reset = gr.update(value=None)
|
| 459 |
+
|
| 460 |
return (
|
| 461 |
+
reconstruction_update,
|
| 462 |
target_dir,
|
| 463 |
image_paths,
|
| 464 |
message,
|
| 465 |
None,
|
| 466 |
+
session_state_reset,
|
| 467 |
streaming_update,
|
| 468 |
mode_update,
|
| 469 |
conf_update,
|
|
|
|
| 943 |
dropdown,
|
| 944 |
image_paths,
|
| 945 |
session_file,
|
| 946 |
+
gr.update(value=None),
|
| 947 |
False,
|
| 948 |
mode,
|
| 949 |
conf_thres,
|
|
|
|
| 979 |
frame_filter,
|
| 980 |
image_gallery,
|
| 981 |
session_state_output,
|
| 982 |
+
session_state_input,
|
| 983 |
streaming,
|
| 984 |
mode,
|
| 985 |
conf_thres,
|
|
|
|
| 1147 |
image_gallery,
|
| 1148 |
log_output,
|
| 1149 |
session_state_output,
|
| 1150 |
+
session_state_input,
|
| 1151 |
streaming,
|
| 1152 |
mode,
|
| 1153 |
conf_thres,
|
demo_cache/input_images_20250917_181443_481650/images/kf_00114.jpg
DELETED
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00115.jpg
DELETED
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00116.jpg
DELETED
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00117.jpg
DELETED
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00118.jpg
DELETED
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00119.jpg
DELETED
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00120.jpg
DELETED
Git LFS Details
|
stream3r/__pycache__/stream_session.cpython-311.pyc
CHANGED
|
Binary files a/stream3r/__pycache__/stream_session.cpython-311.pyc and b/stream3r/__pycache__/stream_session.cpython-311.pyc differ
|
|
|