brian4dwell commited on
Commit
41db8b0
·
1 Parent(s): a016574
Files changed (41) hide show
  1. app.py +6 -1
  2. demo_cache/input_images_20250917_181443_481650/images/kf_00114.jpg +3 -0
  3. demo_cache/input_images_20250917_181443_481650/images/kf_00115.jpg +3 -0
  4. demo_cache/input_images_20250917_181443_481650/images/kf_00116.jpg +3 -0
  5. demo_cache/input_images_20250917_181443_481650/images/kf_00117.jpg +3 -0
  6. demo_cache/input_images_20250917_181443_481650/images/kf_00118.jpg +3 -0
  7. demo_cache/input_images_20250917_181443_481650/images/kf_00119.jpg +3 -0
  8. demo_cache/input_images_20250917_181443_481650/images/kf_00120.jpg +3 -0
  9. stream3r/__pycache__/__init__.cpython-310.pyc +0 -0
  10. stream3r/__pycache__/stream_session.cpython-310.pyc +0 -0
  11. stream3r/dust3r/__pycache__/__init__.cpython-310.pyc +0 -0
  12. stream3r/dust3r/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  13. stream3r/dust3r/utils/__pycache__/misc.cpython-310.pyc +0 -0
  14. stream3r/models/__pycache__/__init__.cpython-310.pyc +0 -0
  15. stream3r/models/__pycache__/stream3r.cpython-310.pyc +0 -0
  16. stream3r/models/components/aggregator/__pycache__/streamaggregator.cpython-310.pyc +0 -0
  17. stream3r/models/components/heads/__pycache__/camera_head.cpython-310.pyc +0 -0
  18. stream3r/models/components/heads/__pycache__/dpt_head.cpython-310.pyc +0 -0
  19. stream3r/models/components/heads/__pycache__/head_act.cpython-310.pyc +0 -0
  20. stream3r/models/components/heads/__pycache__/utils.cpython-310.pyc +0 -0
  21. stream3r/models/components/layers/__pycache__/__init__.cpython-310.pyc +0 -0
  22. stream3r/models/components/layers/__pycache__/attention.cpython-310.pyc +0 -0
  23. stream3r/models/components/layers/__pycache__/block.cpython-310.pyc +0 -0
  24. stream3r/models/components/layers/__pycache__/drop_path.cpython-310.pyc +0 -0
  25. stream3r/models/components/layers/__pycache__/layer_scale.cpython-310.pyc +0 -0
  26. stream3r/models/components/layers/__pycache__/mlp.cpython-310.pyc +0 -0
  27. stream3r/models/components/layers/__pycache__/patch_embed.cpython-310.pyc +0 -0
  28. stream3r/models/components/layers/__pycache__/rope.cpython-310.pyc +0 -0
  29. stream3r/models/components/layers/__pycache__/swiglu_ffn.cpython-310.pyc +0 -0
  30. stream3r/models/components/layers/__pycache__/vision_transformer.cpython-310.pyc +0 -0
  31. stream3r/models/components/utils/__pycache__/geometry.cpython-310.pyc +0 -0
  32. stream3r/models/components/utils/__pycache__/load_fn.cpython-310.pyc +0 -0
  33. stream3r/models/components/utils/__pycache__/pose_enc.cpython-310.pyc +0 -0
  34. stream3r/models/components/utils/__pycache__/rotation.cpython-310.pyc +0 -0
  35. stream3r/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  36. stream3r/utils/__pycache__/instantiators.cpython-310.pyc +0 -0
  37. stream3r/utils/__pycache__/logging_utils.cpython-310.pyc +0 -0
  38. stream3r/utils/__pycache__/pylogger.cpython-310.pyc +0 -0
  39. stream3r/utils/__pycache__/rich_utils.cpython-310.pyc +0 -0
  40. stream3r/utils/__pycache__/utils.cpython-310.pyc +0 -0
  41. stream3r/utils/__pycache__/visual_utils.cpython-310.pyc +0 -0
app.py CHANGED
@@ -22,14 +22,19 @@ from stream3r.models.components.utils.pose_enc import pose_encoding_to_extri_int
22
  from stream3r.models.components.utils.geometry import unproject_depth_map_to_point_map
23
  from stream3r.utils.visual_utils import predictions_to_glb
24
 
 
 
25
 
26
- device = "cuda" if torch.cuda.is_available() else "cpu"
 
 
27
 
28
  model = STream3R.from_pretrained("yslan/STream3R")
29
 
30
  # -------------------------------------------------------------------------
31
  # 1) Core model inference
32
  # -------------------------------------------------------------------------
 
33
  def run_model(target_dir: str, model: STream3R, mode: str="causal", streaming: bool=False) -> dict:
34
  """
35
  Run the STream3R model on images in the 'target_dir/images' folder and return predictions.
 
22
  from stream3r.models.components.utils.geometry import unproject_depth_map_to_point_map
23
  from stream3r.utils.visual_utils import predictions_to_glb
24
 
25
+ import warnings
26
+ warnings.filterwarnings("ignore", message="Can't initialize NVML")
27
 
28
+ import spaces
29
+
30
+ device = "cuda"
31
 
32
  model = STream3R.from_pretrained("yslan/STream3R")
33
 
34
  # -------------------------------------------------------------------------
35
  # 1) Core model inference
36
  # -------------------------------------------------------------------------
37
+ @spaces.GPU # triggers ZeroGPU allocation for this call
38
  def run_model(target_dir: str, model: STream3R, mode: str="causal", streaming: bool=False) -> dict:
39
  """
40
  Run the STream3R model on images in the 'target_dir/images' folder and return predictions.
demo_cache/input_images_20250917_181443_481650/images/kf_00114.jpg ADDED

Git LFS Details

  • SHA256: bb8a33b88d6e1108bf447e7a795700c7caca6a8b24c9d5fdcf777458351c9f94
  • Pointer size: 131 Bytes
  • Size of remote file: 302 kB
demo_cache/input_images_20250917_181443_481650/images/kf_00115.jpg ADDED

Git LFS Details

  • SHA256: 9125134af68ae66ab13ca042aef16940a8ef696a9436e56f72adf237fd566acc
  • Pointer size: 131 Bytes
  • Size of remote file: 293 kB
demo_cache/input_images_20250917_181443_481650/images/kf_00116.jpg ADDED

Git LFS Details

  • SHA256: ab0a3eebad61fe62f9facd1701bd12bc841ebcc9d756428288e10057f74bbf88
  • Pointer size: 131 Bytes
  • Size of remote file: 298 kB
demo_cache/input_images_20250917_181443_481650/images/kf_00117.jpg ADDED

Git LFS Details

  • SHA256: 82bc413ad43f25f0dddc5bfabbf83404ec42959df63ae4e1198f9e917bda4178
  • Pointer size: 131 Bytes
  • Size of remote file: 344 kB
demo_cache/input_images_20250917_181443_481650/images/kf_00118.jpg ADDED

Git LFS Details

  • SHA256: 42e912f2d004bd47dae8e7f44f27b3e5b84150362315e86cc578f0a4c074168f
  • Pointer size: 131 Bytes
  • Size of remote file: 349 kB
demo_cache/input_images_20250917_181443_481650/images/kf_00119.jpg ADDED

Git LFS Details

  • SHA256: 8890bb49a45b19efaa3b2e6d6fffef5d249075353a4aac3086861987485d1971
  • Pointer size: 131 Bytes
  • Size of remote file: 327 kB
demo_cache/input_images_20250917_181443_481650/images/kf_00120.jpg ADDED

Git LFS Details

  • SHA256: 6fdcf9091c7b295a5780b2ec3d9016bedd5d00c3ad9d700b2bf7fc80fc83f750
  • Pointer size: 131 Bytes
  • Size of remote file: 315 kB
stream3r/__pycache__/__init__.cpython-310.pyc CHANGED
Binary files a/stream3r/__pycache__/__init__.cpython-310.pyc and b/stream3r/__pycache__/__init__.cpython-310.pyc differ
 
stream3r/__pycache__/stream_session.cpython-310.pyc CHANGED
Binary files a/stream3r/__pycache__/stream_session.cpython-310.pyc and b/stream3r/__pycache__/stream_session.cpython-310.pyc differ
 
stream3r/dust3r/__pycache__/__init__.cpython-310.pyc CHANGED
Binary files a/stream3r/dust3r/__pycache__/__init__.cpython-310.pyc and b/stream3r/dust3r/__pycache__/__init__.cpython-310.pyc differ
 
stream3r/dust3r/utils/__pycache__/__init__.cpython-310.pyc CHANGED
Binary files a/stream3r/dust3r/utils/__pycache__/__init__.cpython-310.pyc and b/stream3r/dust3r/utils/__pycache__/__init__.cpython-310.pyc differ
 
stream3r/dust3r/utils/__pycache__/misc.cpython-310.pyc CHANGED
Binary files a/stream3r/dust3r/utils/__pycache__/misc.cpython-310.pyc and b/stream3r/dust3r/utils/__pycache__/misc.cpython-310.pyc differ
 
stream3r/models/__pycache__/__init__.cpython-310.pyc CHANGED
Binary files a/stream3r/models/__pycache__/__init__.cpython-310.pyc and b/stream3r/models/__pycache__/__init__.cpython-310.pyc differ
 
stream3r/models/__pycache__/stream3r.cpython-310.pyc CHANGED
Binary files a/stream3r/models/__pycache__/stream3r.cpython-310.pyc and b/stream3r/models/__pycache__/stream3r.cpython-310.pyc differ
 
stream3r/models/components/aggregator/__pycache__/streamaggregator.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/aggregator/__pycache__/streamaggregator.cpython-310.pyc and b/stream3r/models/components/aggregator/__pycache__/streamaggregator.cpython-310.pyc differ
 
stream3r/models/components/heads/__pycache__/camera_head.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/heads/__pycache__/camera_head.cpython-310.pyc and b/stream3r/models/components/heads/__pycache__/camera_head.cpython-310.pyc differ
 
stream3r/models/components/heads/__pycache__/dpt_head.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/heads/__pycache__/dpt_head.cpython-310.pyc and b/stream3r/models/components/heads/__pycache__/dpt_head.cpython-310.pyc differ
 
stream3r/models/components/heads/__pycache__/head_act.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/heads/__pycache__/head_act.cpython-310.pyc and b/stream3r/models/components/heads/__pycache__/head_act.cpython-310.pyc differ
 
stream3r/models/components/heads/__pycache__/utils.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/heads/__pycache__/utils.cpython-310.pyc and b/stream3r/models/components/heads/__pycache__/utils.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/__init__.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/__init__.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/__init__.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/attention.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/attention.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/attention.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/block.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/block.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/block.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/drop_path.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/drop_path.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/drop_path.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/layer_scale.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/layer_scale.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/layer_scale.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/mlp.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/mlp.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/mlp.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/patch_embed.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/patch_embed.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/patch_embed.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/rope.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/rope.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/rope.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/swiglu_ffn.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/swiglu_ffn.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/swiglu_ffn.cpython-310.pyc differ
 
stream3r/models/components/layers/__pycache__/vision_transformer.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/layers/__pycache__/vision_transformer.cpython-310.pyc and b/stream3r/models/components/layers/__pycache__/vision_transformer.cpython-310.pyc differ
 
stream3r/models/components/utils/__pycache__/geometry.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/utils/__pycache__/geometry.cpython-310.pyc and b/stream3r/models/components/utils/__pycache__/geometry.cpython-310.pyc differ
 
stream3r/models/components/utils/__pycache__/load_fn.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/utils/__pycache__/load_fn.cpython-310.pyc and b/stream3r/models/components/utils/__pycache__/load_fn.cpython-310.pyc differ
 
stream3r/models/components/utils/__pycache__/pose_enc.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/utils/__pycache__/pose_enc.cpython-310.pyc and b/stream3r/models/components/utils/__pycache__/pose_enc.cpython-310.pyc differ
 
stream3r/models/components/utils/__pycache__/rotation.cpython-310.pyc CHANGED
Binary files a/stream3r/models/components/utils/__pycache__/rotation.cpython-310.pyc and b/stream3r/models/components/utils/__pycache__/rotation.cpython-310.pyc differ
 
stream3r/utils/__pycache__/__init__.cpython-310.pyc CHANGED
Binary files a/stream3r/utils/__pycache__/__init__.cpython-310.pyc and b/stream3r/utils/__pycache__/__init__.cpython-310.pyc differ
 
stream3r/utils/__pycache__/instantiators.cpython-310.pyc CHANGED
Binary files a/stream3r/utils/__pycache__/instantiators.cpython-310.pyc and b/stream3r/utils/__pycache__/instantiators.cpython-310.pyc differ
 
stream3r/utils/__pycache__/logging_utils.cpython-310.pyc CHANGED
Binary files a/stream3r/utils/__pycache__/logging_utils.cpython-310.pyc and b/stream3r/utils/__pycache__/logging_utils.cpython-310.pyc differ
 
stream3r/utils/__pycache__/pylogger.cpython-310.pyc CHANGED
Binary files a/stream3r/utils/__pycache__/pylogger.cpython-310.pyc and b/stream3r/utils/__pycache__/pylogger.cpython-310.pyc differ
 
stream3r/utils/__pycache__/rich_utils.cpython-310.pyc CHANGED
Binary files a/stream3r/utils/__pycache__/rich_utils.cpython-310.pyc and b/stream3r/utils/__pycache__/rich_utils.cpython-310.pyc differ
 
stream3r/utils/__pycache__/utils.cpython-310.pyc CHANGED
Binary files a/stream3r/utils/__pycache__/utils.cpython-310.pyc and b/stream3r/utils/__pycache__/utils.cpython-310.pyc differ
 
stream3r/utils/__pycache__/visual_utils.cpython-310.pyc CHANGED
Binary files a/stream3r/utils/__pycache__/visual_utils.cpython-310.pyc and b/stream3r/utils/__pycache__/visual_utils.cpython-310.pyc differ