mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-22 06:23:20 -07:00
Hide image stats debug logs
This commit is contained in:
parent
2c28c6eb3f
commit
4f765d2279
1 changed files with 0 additions and 3 deletions
|
@ -136,20 +136,17 @@ def linear_color_transfer(target_img, source_img, mode='sym', eps=1e-3):
|
||||||
|
|
||||||
|
|
||||||
def lab_image_stats(image, mask=None):
|
def lab_image_stats(image, mask=None):
|
||||||
print('np.shape(image):', np.shape(image), )
|
|
||||||
# compute the mean and standard deviation of each channel
|
# compute the mean and standard deviation of each channel
|
||||||
l, a, b = cv2.split(image)
|
l, a, b = cv2.split(image)
|
||||||
|
|
||||||
if mask is not None:
|
if mask is not None:
|
||||||
im_mask = np.squeeze(mask) if len(np.shape(mask)) == 3 else mask
|
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, a, b = l[im_mask == 1], a[im_mask == 1], b[im_mask == 1]
|
||||||
print('np.shape(im_mask):', np.shape(im_mask))
|
|
||||||
|
|
||||||
l_mean, l_std = np.mean(l), np.std(l)
|
l_mean, l_std = np.mean(l), np.std(l)
|
||||||
a_mean, a_std = np.mean(a), np.std(a)
|
a_mean, a_std = np.mean(a), np.std(a)
|
||||||
b_mean, b_std = np.mean(b), np.std(b)
|
b_mean, b_std = np.mean(b), np.std(b)
|
||||||
|
|
||||||
print('l_mean, l_std, a_mean, a_std, b_mean, b_std:', l_mean, l_std, a_mean, a_std, b_mean, b_std)
|
|
||||||
# return the color statistics
|
# return the color statistics
|
||||||
return l_mean, l_std, a_mean, a_std, b_mean, b_std
|
return l_mean, l_std, a_mean, a_std, b_mean, b_std
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue