issue #104 fix attempt

pull/132/head
Alexey Borsky 2023-05-16 11:29:05 +03:00
parent 9e08b4c7d3
commit 00fbf01831
1 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ def start_process(*args):
utils.set_CNs_input_image(args_dict, Image.fromarray(curr_video_frame))
processed_frames, _, _, _ = utils.txt2img(args_dict)
processed_frame = np.array(processed_frames[0])
processed_frame = np.array(processed_frames[0])[...,:3]
processed_frame = np.clip(processed_frame, 0, 255).astype(np.uint8)
init_frame = processed_frame.copy()
@ -153,7 +153,7 @@ def start_process(*args):
utils.set_CNs_input_image(args_dict, Image.fromarray(curr_video_frame))
processed_frames, _, _, _ = utils.img2img(args_dict)
processed_frame = np.array(processed_frames[0])
processed_frame = np.array(processed_frames[0])[...,:3]
processed_frame = skimage.exposure.match_histograms(processed_frame, init_frame, channel_axis=-1)
processed_frame = np.clip(processed_frame, 0, 255).astype(np.uint8)