Spaces:
Running
Running
Commit
·
c1d7f36
1
Parent(s):
d79313f
update
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
import os
|
4 |
import subprocess
|
5 |
|
@@ -22,7 +22,7 @@ def install_cuda_toolkit():
|
|
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"
|
23 |
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run"
|
24 |
CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
|
25 |
-
subprocess.call(["wget", CUDA_TOOLKIT_URL, "-O", CUDA_TOOLKIT_FILE])
|
26 |
subprocess.call(["chmod", "+x", CUDA_TOOLKIT_FILE])
|
27 |
subprocess.call([CUDA_TOOLKIT_FILE, "--silent", "--toolkit"])
|
28 |
|
@@ -49,7 +49,7 @@ from hawor.utils.process import get_mano_faces, run_mano, run_mano_left
|
|
49 |
from lib.eval_utils.custom_utils import load_slam_cam
|
50 |
from lib.vis.run_vis2 import run_vis2_on_video, run_vis2_on_video_cam
|
51 |
|
52 |
-
|
53 |
def render_reconstruction(input_video, img_focal):
|
54 |
args = EasyDict()
|
55 |
args.video_path = input_video
|
@@ -143,12 +143,7 @@ def render_reconstruction(input_video, img_focal):
|
|
143 |
# run_vis2_on_video_cam(left_dict, right_dict, output_pth, img_focal, image_names, R_w2c=R_w2c_sla_all[vis_start:vis_end], t_w2c=t_w2c_sla_all[vis_start:vis_end])
|
144 |
raise NotImplementedError
|
145 |
|
146 |
-
return vis_video_path
|
147 |
-
|
148 |
-
# @spaces.GPU()
|
149 |
-
def run_wilow_model(image, conf, IoU_threshold=0.5):
|
150 |
-
img_cv2 = image[...,::-1]
|
151 |
-
return img_vis.astype(np.float32)/255.0, len(detections), None
|
152 |
|
153 |
|
154 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import spaces
|
3 |
import os
|
4 |
import subprocess
|
5 |
|
|
|
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"
|
23 |
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run"
|
24 |
CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
|
25 |
+
subprocess.call(["wget", "-q", CUDA_TOOLKIT_URL, "-O", CUDA_TOOLKIT_FILE])
|
26 |
subprocess.call(["chmod", "+x", CUDA_TOOLKIT_FILE])
|
27 |
subprocess.call([CUDA_TOOLKIT_FILE, "--silent", "--toolkit"])
|
28 |
|
|
|
49 |
from lib.eval_utils.custom_utils import load_slam_cam
|
50 |
from lib.vis.run_vis2 import run_vis2_on_video, run_vis2_on_video_cam
|
51 |
|
52 |
+
@spaces.GPU()
|
53 |
def render_reconstruction(input_video, img_focal):
|
54 |
args = EasyDict()
|
55 |
args.video_path = input_video
|
|
|
143 |
# run_vis2_on_video_cam(left_dict, right_dict, output_pth, img_focal, image_names, R_w2c=R_w2c_sla_all[vis_start:vis_end], t_w2c=t_w2c_sla_all[vis_start:vis_end])
|
144 |
raise NotImplementedError
|
145 |
|
146 |
+
return vis_video_path
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
|
149 |
|