update
Browse files- app.py +10 -2
- src/experiments/real_world/gs/helpers.py +4 -0
app.py
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
2 |
from PIL import Image
|
3 |
from pathlib import Path
|
4 |
from omegaconf import DictConfig, OmegaConf
|
@@ -46,8 +49,13 @@ def install_cuda_toolkit():
|
|
46 |
os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
|
47 |
|
48 |
install_cuda_toolkit()
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
51 |
os.system('pip install dgl -f https://data.dgl.ai/wheels/torch-2.4/cu124/repo.html')
|
52 |
# os.system('conda install conda-forge::ffmpeg')
|
53 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import importlib
|
3 |
+
import sys
|
4 |
+
import site
|
5 |
from PIL import Image
|
6 |
from pathlib import Path
|
7 |
from omegaconf import DictConfig, OmegaConf
|
|
|
49 |
os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
|
50 |
|
51 |
install_cuda_toolkit()
|
52 |
+
|
53 |
+
gs_path = Path(__file__).parent / "src/third-party/diff-gaussian-rasterization-w-depth"
|
54 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "-e", str(gs_path)])
|
55 |
+
site.main() # re-processes every *.pth in site-packages
|
56 |
+
importlib.invalidate_caches()
|
57 |
+
diff_gaussian_rasterization = importlib.import_module("diff_gaussian_rasterization")
|
58 |
+
|
59 |
os.system('pip install dgl -f https://data.dgl.ai/wheels/torch-2.4/cu124/repo.html')
|
60 |
# os.system('conda install conda-forge::ffmpeg')
|
61 |
|
src/experiments/real_world/gs/helpers.py
CHANGED
@@ -2,6 +2,10 @@ import torch
|
|
2 |
import os
|
3 |
import open3d as o3d
|
4 |
import numpy as np
|
|
|
|
|
|
|
|
|
5 |
from diff_gaussian_rasterization import GaussianRasterizationSettings as Camera
|
6 |
|
7 |
|
|
|
2 |
import os
|
3 |
import open3d as o3d
|
4 |
import numpy as np
|
5 |
+
from pathlib import Path
|
6 |
+
import importlib
|
7 |
+
|
8 |
+
diff_gaussian_rasterization = importlib.import_module("diff_gaussian_rasterization")
|
9 |
from diff_gaussian_rasterization import GaussianRasterizationSettings as Camera
|
10 |
|
11 |
|