Spaces:
Running
Running
Commit
·
fd197d1
1
Parent(s):
7c0be40
update
Browse files
app.py
CHANGED
@@ -7,6 +7,16 @@ import torch
|
|
7 |
print(torch.__version__)
|
8 |
print(torch.version.cuda)
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
def install_cuda_toolkit():
|
11 |
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
|
12 |
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
|
@@ -25,10 +35,11 @@ def install_cuda_toolkit():
|
|
25 |
# Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
|
26 |
os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
|
27 |
|
|
|
28 |
install_cuda_toolkit()
|
29 |
-
|
30 |
os.system('pip install ./thirdparty/DROID-SLAM')
|
31 |
os.system('pip install ./thirdparty/DROID-SLAM/thirdparty/lietorch')
|
|
|
32 |
import numpy as np
|
33 |
from easydict import EasyDict
|
34 |
from scripts.scripts_test_video.detect_track_video import detect_track_video
|
|
|
7 |
print(torch.__version__)
|
8 |
print(torch.version.cuda)
|
9 |
|
10 |
+
# download model
|
11 |
+
print("Downloading model weights")
|
12 |
+
os.system('wget https://huggingface.co/ThunderVVV/HaWoR/resolve/main/hawor/checkpoints/external/metric_depth_vit_large_800k.pth -P ./thirdparty/Metric3D/weights/')
|
13 |
+
os.system('wget https://huggingface.co/ThunderVVV/HaWoR/resolve/main/hawor/checkpoints/external/droid.pth -P ./weights/external/')
|
14 |
+
os.system('wget https://huggingface.co/ThunderVVV/HaWoR/resolve/main/hawor/checkpoints/external/detector.pt -P ./weights/external/')
|
15 |
+
os.system('wget https://huggingface.co/ThunderVVV/HaWoR/resolve/main/hawor/checkpoints/hawor.ckpt -P ./weights/hawor/checkpoints/')
|
16 |
+
os.system('wget https://huggingface.co/ThunderVVV/HaWoR/resolve/main/hawor/checkpoints/infiller.pt -P ./weights/hawor/checkpoints/')
|
17 |
+
os.system('wget https://huggingface.co/ThunderVVV/HaWoR/resolve/main/hawor/model_config.yaml -P ./weights/hawor/')
|
18 |
+
|
19 |
+
|
20 |
def install_cuda_toolkit():
|
21 |
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
|
22 |
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
|
|
|
35 |
# Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
|
36 |
os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
|
37 |
|
38 |
+
print("Compling DROID-SLAM")
|
39 |
install_cuda_toolkit()
|
|
|
40 |
os.system('pip install ./thirdparty/DROID-SLAM')
|
41 |
os.system('pip install ./thirdparty/DROID-SLAM/thirdparty/lietorch')
|
42 |
+
|
43 |
import numpy as np
|
44 |
from easydict import EasyDict
|
45 |
from scripts.scripts_test_video.detect_track_video import detect_track_video
|