def _load_flow(flow_dir, img_fn, future, flow_as_angle): if future: flow_fn = flow_dir + "Flow_forward/" + img_fn[img_fn.index("480p"):].replace(".jpg", ".flo") else: flow_fn = flow_dir + "Flow_backward/" + img_fn[img_fn.index("480p"):].replace(".jpg", ".flo") flow = load_flow_from_flo(flow_fn, flow_as_angle) return flow
def my_load_flow(f): return load_flow_from_flo(f, flow_as_angle)