Spaces:
Sleeping
Sleeping
Commit
•
b7ebf4b
1
Parent(s):
e4bf926
first version
Browse files- app.py +3 -3
- mask/reindeer_antlers.png +0 -0
- mask/reindeer_nose.png +0 -0
- mask/santa_hat.png +0 -0
app.py
CHANGED
@@ -193,8 +193,8 @@ def apply_reindeer_mask(image: Image, person: Person) -> Image:
|
|
193 |
"""
|
194 |
Apply a reindeer mask to a person in an image
|
195 |
"""
|
196 |
-
reindeer_nose = Image.open("
|
197 |
-
reindeer_antlers = Image.open("
|
198 |
|
199 |
reindeer_nose_coordinate = (person.nose_x, person.nose_y)
|
200 |
|
@@ -210,7 +210,7 @@ def apply_santa_hat_mask(image: Image, person: Person) -> Image:
|
|
210 |
"""
|
211 |
Apply a santa hat mask to a person in an image
|
212 |
"""
|
213 |
-
santa_hat = Image.open("
|
214 |
santa_hat_size = (person.head_width, )
|
215 |
santa_hat_coordinate = (person.middle_top_head_x, person.middle_top_head_y)
|
216 |
image = add_mask(image, santa_hat, santa_hat_coordinate, santa_hat_size, Placement.TOP)
|
|
|
193 |
"""
|
194 |
Apply a reindeer mask to a person in an image
|
195 |
"""
|
196 |
+
reindeer_nose = Image.open("mask/reindeer_nose.png")
|
197 |
+
reindeer_antlers = Image.open("mask/reindeer_antlers.png")
|
198 |
|
199 |
reindeer_nose_coordinate = (person.nose_x, person.nose_y)
|
200 |
|
|
|
210 |
"""
|
211 |
Apply a santa hat mask to a person in an image
|
212 |
"""
|
213 |
+
santa_hat = Image.open("mask/santa_hat.png")
|
214 |
santa_hat_size = (person.head_width, )
|
215 |
santa_hat_coordinate = (person.middle_top_head_x, person.middle_top_head_y)
|
216 |
image = add_mask(image, santa_hat, santa_hat_coordinate, santa_hat_size, Placement.TOP)
|
mask/reindeer_antlers.png
ADDED
mask/reindeer_nose.png
ADDED
mask/santa_hat.png
ADDED