Add import copy to blending.py

Commit f051221f76 added a copy.deepcopy command without a corresponding import copy to the file.

This fixes that oversight.
This commit is contained in:
Eddie Offermann
2024-10-24 08:19:20 -07:00
committed by czk32611
parent 31ee3e4d12
commit 0e1b9a75f3

View File

@@ -1,6 +1,7 @@
from PIL import Image from PIL import Image
import numpy as np import numpy as np
import cv2 import cv2
import copy
from face_parsing import FaceParsing from face_parsing import FaceParsing
fp = FaceParsing() fp = FaceParsing()
@@ -96,4 +97,4 @@ def get_image_blending(image,face,face_box,mask_array,crop_box):
body[y_s:y_e, x_s:x_e] = cv2.blendLinear(face_large,body[y_s:y_e, x_s:x_e],mask_image,1-mask_image) body[y_s:y_e, x_s:x_e] = cv2.blendLinear(face_large,body[y_s:y_e, x_s:x_e],mask_image,1-mask_image)
return body return body