コード例 #1
0
    default=256,
    help='maxium disparity. Only affect the coarsest cost volume size')
parser.add_argument(
    '--fac',
    type=float,
    default=1,
    help=
    'controls the shape of search grid. Only affect the coarse cost volume size'
)
args = parser.parse_args()

# dataloader
if args.dataset == '2015':
    from dataloader import kitti15list as DA
    maxw, maxh = [int(args.testres * 1280), int(args.testres * 384)]
    test_left_img, test_right_img, _ = DA.dataloader(args.datapath)
elif args.dataset == '2015val':
    from dataloader import kitti15list_val as DA
    maxw, maxh = [int(args.testres * 1280), int(args.testres * 384)]
    test_left_img, test_right_img, _ = DA.dataloader(args.datapath)
elif args.dataset == '2015vallidar':
    from dataloader import kitti15list_val_lidar as DA
    maxw, maxh = [int(args.testres * 1280), int(args.testres * 384)]
    test_left_img, test_right_img, _ = DA.dataloader(args.datapath)
elif args.dataset == '2015test':
    from dataloader import kitti15list as DA
    maxw, maxh = [int(args.testres * 1280), int(args.testres * 384)]
    test_left_img, test_right_img, _ = DA.dataloader(args.datapath)
elif args.dataset == 'seq':
    from dataloader import seqlist as DA
    maxw, maxh = [int(args.testres * 1280), int(args.testres * 384)]
コード例 #2
0
ファイル: eval_flow.py プロジェクト: yzxstore/expansion
elif args.dataset == '2015vallidar':
    from dataloader import kitti15list_val_lidar as DA
    datapath = '/ssd/kitti_scene/training/'
elif args.dataset == '2015test':
    from dataloader import kitti15list as DA
    datapath = '/ssd/kitti_scene/testing/'
elif args.dataset == 'sintel':
    from dataloader import sintellist_val as DA
    datapath = '/ssd/rob_flow/training/'
elif args.dataset == 'sinteltest':
    from dataloader import sintellist as DA
    datapath = '/ssd/rob_flow/test/'
elif args.dataset == 'chairs':
    from dataloader import chairslist as DA
    datapath = '/ssd/FlyingChairs_release/data/'
test_left_img, test_right_img, flow_paths = DA.dataloader(datapath)

if args.dataset == 'chairs':
    with open('FlyingChairs_train_val.txt', 'r') as f:
        split = [int(i) for i in f.readlines()]
    test_left_img = [
        test_left_img[i] for i, flag in enumerate(split) if flag == 2
    ]
    test_right_img = [
        test_right_img[i] for i, flag in enumerate(split) if flag == 2
    ]
    flow_paths = [flow_paths[i] for i, flag in enumerate(split) if flag == 2]

for i, gtflow_path in enumerate(flow_paths):
    num = gtflow_path.split('/')[-1].strip().replace('flow.flo', 'img1.png')
    if not 'test' in args.dataset and not 'clip' in args.dataset: