Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -136,7 +136,7 @@ def expand_mask(mask, kernel_size):
|
|
136 |
return Image.fromarray(expanded_mask_array)
|
137 |
|
138 |
|
139 |
-
def
|
140 |
"""
|
141 |
Detect the face and crop a rectangular region that includes more of the body below the face.
|
142 |
Instead of centering around the face, we start near the face region and extend downward.
|
|
|
136 |
return Image.fromarray(expanded_mask_array)
|
137 |
|
138 |
|
139 |
+
def crop_face_to_square(image_rgb, padding_ratio=0.2, height_multiplier=1.5):
|
140 |
"""
|
141 |
Detect the face and crop a rectangular region that includes more of the body below the face.
|
142 |
Instead of centering around the face, we start near the face region and extend downward.
|