Spaces:
Running
Running
ciover2024
commited on
Commit
•
99c56f7
1
Parent(s):
710e9ed
Update app.py
Browse files
app.py
CHANGED
@@ -90,6 +90,7 @@ def resize_to_match(input_image, output_image):
|
|
90 |
#torch_img = pil_to_torch(input_image)
|
91 |
#torch_img_scaled = F.interpolate(torch_img.unsqueeze(0),mode='trilinear').squeeze(0)
|
92 |
#output_image = torchvision.transforms.functional.to_pil_image(torch_img_scaled, mode=None)
|
|
|
93 |
return output_image.resize(input_image.size, Image.BICUBIC) # Use BILINEAR for faster resizing
|
94 |
|
95 |
# Function to generate the mask using Florence SAM Masking API (Replicate)
|
|
|
90 |
#torch_img = pil_to_torch(input_image)
|
91 |
#torch_img_scaled = F.interpolate(torch_img.unsqueeze(0),mode='trilinear').squeeze(0)
|
92 |
#output_image = torchvision.transforms.functional.to_pil_image(torch_img_scaled, mode=None)
|
93 |
+
|
94 |
return output_image.resize(input_image.size, Image.BICUBIC) # Use BILINEAR for faster resizing
|
95 |
|
96 |
# Function to generate the mask using Florence SAM Masking API (Replicate)
|