mirror of
https://github.com/Deepshift/DeepCreamPy.git
synced 2024-11-29 05:10:43 +00:00
remove unnecessary initializations
This commit is contained in:
parent
c9c5868519
commit
a51f587343
@ -79,7 +79,6 @@ class Decensor():
|
|||||||
width, height = ori.size
|
width, height = ori.size
|
||||||
#save the alpha channel if the image has an alpha channel
|
#save the alpha channel if the image has an alpha channel
|
||||||
has_alpha = False
|
has_alpha = False
|
||||||
alpha_channel = None
|
|
||||||
if (ori.mode == "RGBA"):
|
if (ori.mode == "RGBA"):
|
||||||
has_alpha = True
|
has_alpha = True
|
||||||
alpha_channel = np.asarray(ori)[:,:,3]
|
alpha_channel = np.asarray(ori)[:,:,3]
|
||||||
@ -90,7 +89,6 @@ class Decensor():
|
|||||||
ori_array = np.array(ori_array / 255.0)
|
ori_array = np.array(ori_array / 255.0)
|
||||||
ori_array = np.expand_dims(ori_array, axis = 0)
|
ori_array = np.expand_dims(ori_array, axis = 0)
|
||||||
|
|
||||||
mask = None
|
|
||||||
if self.is_mosaic:
|
if self.is_mosaic:
|
||||||
#if mosaic decensor, mask is empty
|
#if mosaic decensor, mask is empty
|
||||||
mask = np.ones(ori_array.shape, np.uint8)
|
mask = np.ones(ori_array.shape, np.uint8)
|
||||||
|
Loading…
Reference in New Issue
Block a user