mirror of
https://github.com/facefusion/facefusion.git
synced 2026-04-27 11:56:14 +02:00
Fix different color on box
This commit is contained in:
@@ -38,7 +38,7 @@ def paste_back(temp_frame : Frame, crop_frame : Frame, affine_matrix : Matrix) -
|
||||
temp_frame_height, temp_frame_width = temp_frame.shape[0:2]
|
||||
crop_frame_height, crop_frame_width = crop_frame.shape[0:2]
|
||||
inverse_crop_frame = cv2.warpAffine(crop_frame, inverse_affine_matrix, (temp_frame_width, temp_frame_height))
|
||||
inverse_mask = numpy.ones((crop_frame_height, crop_frame_width, 3), dtype = numpy.uint8)
|
||||
inverse_mask = numpy.ones((crop_frame_height, crop_frame_width, 3))
|
||||
inverse_mask_frame = cv2.warpAffine(inverse_mask, inverse_affine_matrix, (temp_frame_width, temp_frame_height))
|
||||
inverse_mask_frame = cv2.erode(inverse_mask_frame, numpy.ones((2, 2)))
|
||||
inverse_mask_border = inverse_mask_frame * inverse_crop_frame
|
||||
|
||||
Reference in New Issue
Block a user