def load_flow_from_png(png_path):
return(imread(png_path)[:,:,0:2].astype(float) - 128)
def make_dataset(dir, split, occ=True):
"""Will search in training folder for folders "flow_noc" or "flow_occ" and "colored_0" (KITTI 2012) or "image_2" (KITTI 2015) """
After Change
def load_flow_from_png(png_path):
flo_file = cv2.imread(png_path,cv2.IMREAD_UNCHANGED)
flo_img = flo_file[:,:,1::-1].astype(np.float32)
invalid = (flo_file[:,:,2] == 0)
flo_img = flo_img - 32768
flo_img = flo_img / 64
flo_img[invalid, :] = np.NaN
return(flo_img)
def make_dataset(dir, split, occ=True):
"""Will search in training folder for folders "flow_noc" or "flow_occ" and "colored_0" (KITTI 2012) or "image_2" (KITTI 2015) """