mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-22 06:23:20 -07:00
mask squeezing
This commit is contained in:
parent
7d864776e8
commit
072d8e447b
1 changed files with 2 additions and 2 deletions
|
@ -140,8 +140,8 @@ def lab_image_stats(image, mask=None):
|
|||
l, a, b = cv2.split(image)
|
||||
|
||||
if mask is not None:
|
||||
mask = np.squeeze(mask)
|
||||
l, a, b = l[mask == 1], a[mask == 1], b[mask == 1]
|
||||
im_mask = np.squeeze(mask) if len(np.shape(mask)) == 3 else mask
|
||||
l, a, b = l[im_mask == 1], a[im_mask == 1], b[im_mask == 1]
|
||||
|
||||
l_mean, l_std = np.mean(l), np.std(l)
|
||||
a_mean, a_std = np.mean(a), np.std(a)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue