mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-13 10:16:59 -07:00
fix
This commit is contained in:
parent
faa14c4e59
commit
70dada42ea
1 changed files with 4 additions and 0 deletions
|
@ -12,8 +12,12 @@ def normalize_channels(img, target_channels):
|
|||
|
||||
if c == 0 and target_channels > 0:
|
||||
img = img[...,np.newaxis]
|
||||
c = 1
|
||||
|
||||
if c == 1 and target_channels > 1:
|
||||
img = np.repeat (img, target_channels, -1)
|
||||
c = target_channels
|
||||
|
||||
if c > target_channels:
|
||||
img = img[...,0:target_channels]
|
||||
c = target_channels
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue