Skip to content

Commit

Permalink
Issue #92 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
volotat committed May 14, 2023
1 parent 9849e63 commit a35f446
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/core/vid2vid.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def save_result_to_image(image, ind):
args_dict['init_img'] = Image.fromarray(curr_frame)
utils.set_CNs_input_image(args_dict, Image.fromarray(curr_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, curr_frame, channel_axis=None)
processed_frame = np.clip(processed_frame, 0, 255).astype(np.uint8)
#print('Processed frame ', 0)
Expand Down Expand Up @@ -214,7 +214,7 @@ def save_result_to_image(image, ind):
img2img_args_dict['seed'] = args_dict['step_1_seed']
utils.set_CNs_input_image(img2img_args_dict, Image.fromarray(curr_frame))
processed_frames, _, _, _ = utils.img2img(img2img_args_dict)
processed_frame = np.array(processed_frames[0])
processed_frame = np.array(processed_frames[0])[...,:3]

# normalizing the colors
processed_frame = skimage.exposure.match_histograms(processed_frame, curr_frame, channel_axis=None)
Expand Down

0 comments on commit a35f446

Please # to comment.