mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-08-14 02:37:01 -07:00
fix
This commit is contained in:
parent
03212982e6
commit
9e50b59f6f
2 changed files with 7 additions and 5 deletions
|
@ -3,7 +3,7 @@ from .binary_dilate_circle import binary_dilate_circle
|
|||
from .binary_erode_circle import binary_erode_circle
|
||||
from .gaussian_blur import gaussian_blur
|
||||
from .pad import pad
|
||||
|
||||
from .cast import cast
|
||||
|
||||
def binary_morph(input_t : Tensor, erode_dilate : int, blur : float, fade_to_border : bool = False, dtype=None) -> Tensor:
|
||||
"""
|
||||
|
@ -39,5 +39,7 @@ def binary_morph(input_t : Tensor, erode_dilate : int, blur : float, fade_to_bor
|
|||
|
||||
if blur > 0:
|
||||
x = gaussian_blur(x, blur * 0.250, dtype=dtype)
|
||||
|
||||
else:
|
||||
x = cast(x, dtype=dtype)
|
||||
|
||||
return x[...,H:-H,W:-W]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue