mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-14 10:46:59 -07:00
converter:
fixed crashes removed useless 'ebs' color transfer changed keys for color degrade added image degrade via denoise - same as denoise extracted data_dst.bat , but you can control this option directly in the interactive converter added image degrade via bicubic downscale and upscale SAEHD: default ae_dims for df now 256.
This commit is contained in:
parent
374d8c2388
commit
770c70d778
8 changed files with 274 additions and 57 deletions
|
@ -33,7 +33,7 @@ def color_transfer_mkl(x0, x1):
|
|||
mx1 = np.mean(x1, axis=0)
|
||||
|
||||
result = np.dot(x0-mx0, t) + mx1
|
||||
return np.clip ( result.reshape ( (h,w,c) ), 0, 1)
|
||||
return np.clip ( result.reshape ( (h,w,c) ).astype(x0.dtype), 0, 1)
|
||||
|
||||
def color_transfer_idt(i0, i1, bins=256, n_rot=20):
|
||||
relaxation = 1 / n_rot
|
||||
|
@ -76,7 +76,7 @@ def color_transfer_idt(i0, i1, bins=256, n_rot=20):
|
|||
|
||||
d0 = relaxation * np.linalg.solve(r, (d_r - d0r)) + d0
|
||||
|
||||
return np.clip ( d0.T.reshape ( (h,w,c) ), 0, 1)
|
||||
return np.clip ( d0.T.reshape ( (h,w,c) ).astype(i0.dtype) , 0, 1)
|
||||
|
||||
def laplacian_matrix(n, m):
|
||||
mat_D = scipy.sparse.lil_matrix((m, m))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue