Spaces:
Configuration error
Configuration error
Update app_recon.py
Browse files- app_recon.py +2 -2
app_recon.py
CHANGED
|
@@ -172,12 +172,12 @@ def reconstruction(image, files):
|
|
| 172 |
y_max = int(y_nonzero[0].max())
|
| 173 |
masked_image, mask = sam_segment(sam_predictor, img.convert('RGB'), x_min, y_min, x_max, y_max)
|
| 174 |
|
| 175 |
-
mask = mask.resize((width, height), Image.LANCZOS)
|
| 176 |
depth_np = np.load(files[0])
|
| 177 |
normal_np = np.load(files[1])
|
| 178 |
|
| 179 |
dir_name = os.path.dirname(os.path.realpath(files[0]))
|
| 180 |
-
mask_output_temp = mask
|
| 181 |
name_base = os.path.splitext(os.path.basename(files[0]))[0][:-6]
|
| 182 |
|
| 183 |
normal_np[:, :, 0] *= -1
|
|
|
|
| 172 |
y_max = int(y_nonzero[0].max())
|
| 173 |
masked_image, mask = sam_segment(sam_predictor, img.convert('RGB'), x_min, y_min, x_max, y_max)
|
| 174 |
|
| 175 |
+
mask = mask[-1].resize((width, height), Image.LANCZOS)
|
| 176 |
depth_np = np.load(files[0])
|
| 177 |
normal_np = np.load(files[1])
|
| 178 |
|
| 179 |
dir_name = os.path.dirname(os.path.realpath(files[0]))
|
| 180 |
+
mask_output_temp = mask
|
| 181 |
name_base = os.path.splitext(os.path.basename(files[0]))[0][:-6]
|
| 182 |
|
| 183 |
normal_np[:, :, 0] *= -1
|