Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def segment_body(image):
|
|
36 |
# Function to overlay clothing onto the image
|
37 |
def overlay_clothing(user_image, clothing_image, mask):
|
38 |
# Resize clothing image to match the user's body size (for simplicity, we use resizing here)
|
39 |
-
clothing_resized = clothing_image.resize((user_image.width, user_image.height), Image.
|
40 |
|
41 |
# Convert to numpy arrays for OpenCV processing
|
42 |
user_image_np = np.array(user_image)
|
|
|
36 |
# Function to overlay clothing onto the image
|
37 |
def overlay_clothing(user_image, clothing_image, mask):
|
38 |
# Resize clothing image to match the user's body size (for simplicity, we use resizing here)
|
39 |
+
clothing_resized = clothing_image.resize((user_image.width, user_image.height), Image.Resampling.LANCZOS)
|
40 |
|
41 |
# Convert to numpy arrays for OpenCV processing
|
42 |
user_image_np = np.array(user_image)
|