remove unnecessary initializations

This commit is contained in:
deeppomf 2018-10-21 04:27:16 -04:00
parent c9c5868519
commit a51f587343

View File

@ -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)