Spaces:
Configuration error
Configuration error
Commit
·
41db8b0
1
Parent(s):
a016574
zerogpu
Browse files- app.py +6 -1
- demo_cache/input_images_20250917_181443_481650/images/kf_00114.jpg +3 -0
- demo_cache/input_images_20250917_181443_481650/images/kf_00115.jpg +3 -0
- demo_cache/input_images_20250917_181443_481650/images/kf_00116.jpg +3 -0
- demo_cache/input_images_20250917_181443_481650/images/kf_00117.jpg +3 -0
- demo_cache/input_images_20250917_181443_481650/images/kf_00118.jpg +3 -0
- demo_cache/input_images_20250917_181443_481650/images/kf_00119.jpg +3 -0
- demo_cache/input_images_20250917_181443_481650/images/kf_00120.jpg +3 -0
- stream3r/__pycache__/__init__.cpython-310.pyc +0 -0
- stream3r/__pycache__/stream_session.cpython-310.pyc +0 -0
- stream3r/dust3r/__pycache__/__init__.cpython-310.pyc +0 -0
- stream3r/dust3r/utils/__pycache__/__init__.cpython-310.pyc +0 -0
- stream3r/dust3r/utils/__pycache__/misc.cpython-310.pyc +0 -0
- stream3r/models/__pycache__/__init__.cpython-310.pyc +0 -0
- stream3r/models/__pycache__/stream3r.cpython-310.pyc +0 -0
- stream3r/models/components/aggregator/__pycache__/streamaggregator.cpython-310.pyc +0 -0
- stream3r/models/components/heads/__pycache__/camera_head.cpython-310.pyc +0 -0
- stream3r/models/components/heads/__pycache__/dpt_head.cpython-310.pyc +0 -0
- stream3r/models/components/heads/__pycache__/head_act.cpython-310.pyc +0 -0
- stream3r/models/components/heads/__pycache__/utils.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/__init__.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/attention.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/block.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/drop_path.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/layer_scale.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/mlp.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/patch_embed.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/rope.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/swiglu_ffn.cpython-310.pyc +0 -0
- stream3r/models/components/layers/__pycache__/vision_transformer.cpython-310.pyc +0 -0
- stream3r/models/components/utils/__pycache__/geometry.cpython-310.pyc +0 -0
- stream3r/models/components/utils/__pycache__/load_fn.cpython-310.pyc +0 -0
- stream3r/models/components/utils/__pycache__/pose_enc.cpython-310.pyc +0 -0
- stream3r/models/components/utils/__pycache__/rotation.cpython-310.pyc +0 -0
- stream3r/utils/__pycache__/__init__.cpython-310.pyc +0 -0
- stream3r/utils/__pycache__/instantiators.cpython-310.pyc +0 -0
- stream3r/utils/__pycache__/logging_utils.cpython-310.pyc +0 -0
- stream3r/utils/__pycache__/pylogger.cpython-310.pyc +0 -0
- stream3r/utils/__pycache__/rich_utils.cpython-310.pyc +0 -0
- stream3r/utils/__pycache__/utils.cpython-310.pyc +0 -0
- 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 |
-
|
|
|
|
|
|
|
| 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
|
demo_cache/input_images_20250917_181443_481650/images/kf_00115.jpg
ADDED
|
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00116.jpg
ADDED
|
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00117.jpg
ADDED
|
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00118.jpg
ADDED
|
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00119.jpg
ADDED
|
Git LFS Details
|
demo_cache/input_images_20250917_181443_481650/images/kf_00120.jpg
ADDED
|
Git LFS Details
|
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
|
|
|