Open Nd-sole opened 6 months ago
def read_mask(mpath, length, size, flow_mask_dilates=8, mask_dilates=5,resize_ratio=1): masks_img = [] masks_dilated = [] flow_masks = []
if mpath.endswith(('jpg', 'jpeg', 'png', 'JPG', 'JPEG', 'PNG')): # input single img path
masks_img = [Image.open(mpath)]
elif mpath.endswith(('mp4')):
#把mp4抽帧
frames, fps, size, video_name = read_frame_from_videos(mpath)
frames ,size, out_size = resize_frames(frames, (int(resize_ratio * size[0]), int(resize_ratio * size[1])))
masks_img=frames
Hi,
Can we use video mask corresponding to each frame instead of image mask for video completion?