Spaces:
Configuration error
Configuration error
Update app_recon.py
Browse files- app_recon.py +2 -0
app_recon.py
CHANGED
|
@@ -87,6 +87,7 @@ def sam_init():
|
|
| 87 |
|
| 88 |
sam_predictor = sam_init()
|
| 89 |
|
|
|
|
| 90 |
def sam_segment(predictor, input_image, *bbox_coords):
|
| 91 |
bbox = np.array(bbox_coords)
|
| 92 |
image = np.asarray(input_image)
|
|
@@ -149,6 +150,7 @@ def depth_normal(img_path,
|
|
| 149 |
|
| 150 |
return depth_colored, normal_colored, [depth_path, normal_path]
|
| 151 |
|
|
|
|
| 152 |
def reconstruction(image, files):
|
| 153 |
|
| 154 |
torch.cuda.empty_cache()
|
|
|
|
| 87 |
|
| 88 |
sam_predictor = sam_init()
|
| 89 |
|
| 90 |
+
@spaces.GPU
|
| 91 |
def sam_segment(predictor, input_image, *bbox_coords):
|
| 92 |
bbox = np.array(bbox_coords)
|
| 93 |
image = np.asarray(input_image)
|
|
|
|
| 150 |
|
| 151 |
return depth_colored, normal_colored, [depth_path, normal_path]
|
| 152 |
|
| 153 |
+
@spaces.GPU
|
| 154 |
def reconstruction(image, files):
|
| 155 |
|
| 156 |
torch.cuda.empty_cache()
|