Spaces:
Running
Running
AshanGimhana
commited on
Commit
•
4a62f1b
1
Parent(s):
35ada7b
Update app.py
Browse files
app.py
CHANGED
@@ -28,13 +28,13 @@ def update_templates(gender):
|
|
28 |
# Main function for face swapping
|
29 |
def face_swap_and_merge(src_image, gender, template_choice):
|
30 |
# Resize the source image to 700x400 for uniform processing
|
31 |
-
src_image = cv2.resize(src_image, (
|
32 |
|
33 |
template_image_path = f'/content/{template_choice}'
|
34 |
template_image = cv2.imread(template_image_path, cv2.IMREAD_UNCHANGED)
|
35 |
|
36 |
# Resize the template image to 700x400 for uniform processing
|
37 |
-
template_image = cv2.resize(template_image, (
|
38 |
|
39 |
src_faces = FACE_ANALYSER.get(src_image)
|
40 |
template_faces = FACE_ANALYSER.get(template_image)
|
|
|
28 |
# Main function for face swapping
|
29 |
def face_swap_and_merge(src_image, gender, template_choice):
|
30 |
# Resize the source image to 700x400 for uniform processing
|
31 |
+
src_image = cv2.resize(src_image, (1181, 1772))
|
32 |
|
33 |
template_image_path = f'/content/{template_choice}'
|
34 |
template_image = cv2.imread(template_image_path, cv2.IMREAD_UNCHANGED)
|
35 |
|
36 |
# Resize the template image to 700x400 for uniform processing
|
37 |
+
template_image = cv2.resize(template_image, (1181, 1772))
|
38 |
|
39 |
src_faces = FACE_ANALYSER.get(src_image)
|
40 |
template_faces = FACE_ANALYSER.get(template_image)
|