Spaces:
Running
on
Zero
Running
on
Zero
lemonaddie
commited on
Update app_recon.py
Browse files- app_recon.py +3 -3
app_recon.py
CHANGED
@@ -111,7 +111,7 @@ def sam_segment(predictor, input_image, *bbox_coords):
|
|
111 |
return Image.fromarray(out_image_bbox, mode='RGBA'), masks_bbox
|
112 |
|
113 |
@spaces.GPU
|
114 |
-
def depth_normal(
|
115 |
denoising_steps,
|
116 |
ensemble_size,
|
117 |
processing_res,
|
@@ -122,7 +122,7 @@ def depth_normal(img,
|
|
122 |
if seed >= 0:
|
123 |
torch.manual_seed(seed)
|
124 |
|
125 |
-
|
126 |
|
127 |
pipe_out = pipe(
|
128 |
img,
|
@@ -157,7 +157,7 @@ def reconstruction(image, files):
|
|
157 |
|
158 |
torch.cuda.empty_cache()
|
159 |
|
160 |
-
|
161 |
|
162 |
image_rem = img.convert('RGBA')
|
163 |
image_nobg = remove(image_rem, alpha_matting=True)
|
|
|
111 |
return Image.fromarray(out_image_bbox, mode='RGBA'), masks_bbox
|
112 |
|
113 |
@spaces.GPU
|
114 |
+
def depth_normal(img_path,
|
115 |
denoising_steps,
|
116 |
ensemble_size,
|
117 |
processing_res,
|
|
|
122 |
if seed >= 0:
|
123 |
torch.manual_seed(seed)
|
124 |
|
125 |
+
img = Image.open(img_path)
|
126 |
|
127 |
pipe_out = pipe(
|
128 |
img,
|
|
|
157 |
|
158 |
torch.cuda.empty_cache()
|
159 |
|
160 |
+
img = Image.open(image)
|
161 |
|
162 |
image_rem = img.convert('RGBA')
|
163 |
image_nobg = remove(image_rem, alpha_matting=True)
|