Spaces:
Sleeping
Sleeping
Update gaussian_pipeline.py
Browse files- gaussian_pipeline.py +5 -2
gaussian_pipeline.py
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
def reconstruct_3d_gaussian(keyframes, output_dir, device="cpu"):
|
| 2 |
-
import
|
| 3 |
import trimesh
|
| 4 |
import numpy as np
|
| 5 |
from sklearn.decomposition import PCA
|
|
@@ -16,4 +19,4 @@ def reconstruct_3d_gaussian(keyframes, output_dir, device="cpu"):
|
|
| 16 |
output_model_path = os.path.join(output_dir, "reconstructed_model.obj")
|
| 17 |
mesh.export(output_model_path)
|
| 18 |
|
| 19 |
-
return output_model_path
|
|
|
|
| 1 |
+
from spaces import GPU # huggingface_hub ํจํค์ง์์ ์ ๊ณต๋จ
|
| 2 |
+
|
| 3 |
+
@GPU()
|
| 4 |
def reconstruct_3d_gaussian(keyframes, output_dir, device="cpu"):
|
| 5 |
+
import os
|
| 6 |
import trimesh
|
| 7 |
import numpy as np
|
| 8 |
from sklearn.decomposition import PCA
|
|
|
|
| 19 |
output_model_path = os.path.join(output_dir, "reconstructed_model.obj")
|
| 20 |
mesh.export(output_model_path)
|
| 21 |
|
| 22 |
+
return output_model_path
|