color transfer sot : optimization
This commit is contained in:
@@ -35,8 +35,9 @@ def color_transfer_sot(src,trg, steps=10, batch_size=5, reg_sigmaXY=16.0, reg_si
|
|||||||
h,w,c = src.shape
|
h,w,c = src.shape
|
||||||
new_src = src.copy()
|
new_src = src.copy()
|
||||||
|
|
||||||
|
advect = np.empty ( (h*w,c), dtype=src_dtype )
|
||||||
for step in range (steps):
|
for step in range (steps):
|
||||||
advect = np.zeros ( (h*w,c), dtype=src_dtype )
|
advect.fill(0)
|
||||||
for batch in range (batch_size):
|
for batch in range (batch_size):
|
||||||
dir = np.random.normal(size=c).astype(src_dtype)
|
dir = np.random.normal(size=c).astype(src_dtype)
|
||||||
dir /= npla.norm(dir)
|
dir /= npla.norm(dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user