Skip to content

Commit dcd1456

Browse files
Merge pull request #64 from bkvie/patch-5
Update run_inference.py
2 parents d62f7d9 + 060fc70 commit dcd1456

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

datasets/mpisintel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def make_dataset(dataset_dir, split, dataset_type='clean'):
2929
img1 = os.path.join(img_dir, scene_dir, '{}_{:04d}.png'.format(prefix, frame_nb))
3030
img2 = os.path.join(img_dir, scene_dir, '{}_{:04d}.png'.format(prefix, frame_nb + 1))
3131
flow_map = os.path.join(flow_dir,flow_map)
32-
if not (os.path.isfile(os.path.join(dataset_dir,img1)) or os.path.isfile(os.path.join(dataset_dir,img2))):
32+
if not (os.path.isfile(os.path.join(dataset_dir,img1)) and os.path.isfile(os.path.join(dataset_dir,img2))):
3333
continue
3434
images.append([[img1,img2],flow_map])
3535

run_inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def main():
105105
for suffix, flow_output in zip(['flow', 'inv_flow'], output):
106106
filename = save_path/'{}{}'.format(img1_file.namebase[:-1], suffix)
107107
if args.output_value in['vis', 'both']:
108-
rgb_flow = flow2rgb(args.div_flow * flow_output, max_value=args.max_flow)
108+
rgb_flow = flow2rgb(args.div_flow * flow_output[0], max_value=args.max_flow)
109109
to_save = (rgb_flow * 255).astype(np.uint8).transpose(1,2,0)
110110
imwrite(filename + '.png', to_save)
111111
if args.output_value in ['raw', 'both']:

0 commit comments

Comments
 (0)