mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-07-14 00:53:49 -07:00
fix
This commit is contained in:
parent
4fe2da23c0
commit
c37882ebd1
1 changed files with 2 additions and 0 deletions
|
@ -17,6 +17,8 @@ class ImageProcessor:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, img : np.ndarray, copy=False):
|
def __init__(self, img : np.ndarray, copy=False):
|
||||||
|
if copy:
|
||||||
|
img = img.copy()
|
||||||
ndim = img.ndim
|
ndim = img.ndim
|
||||||
if ndim not in [2,3,4]:
|
if ndim not in [2,3,4]:
|
||||||
raise ValueError(f'img.ndim must be 2,3,4, not {ndim}.')
|
raise ValueError(f'img.ndim must be 2,3,4, not {ndim}.')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue