MCPcopy Create free account
hub / github.com/drinkingcoder/FlowFormer-Official / HD1K

Class HD1K

core/utils/datasets.py:392–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390
391
392class HD1K(FlowDataset):
393 def __init__(self, aug_params=None, root='datasets/HD1k'):
394 super(HD1K, self).__init__(aug_params, sparse=True)
395
396 root = 's3://'
397 self.image_list = []
398 with open("./flow_dataset/HD1K/HD1K_image.txt") as f:
399 images = f.readlines()
400 for img1, img2 in zip(images[0::2], images[1::2]):
401 self.image_list.append([root+img1.strip(), root+img2.strip()])
402 self.flow_list = []
403 with open("./flow_dataset/HD1K/HD1K_flow.txt") as f:
404 flows = f.readlines()
405 for flow in flows:
406 self.flow_list.append(root+flow.strip())
407
408 # seq_ix = 0
409 # while 1:
410 # flows = sorted(glob(os.path.join(root, 'hd1k_flow_gt', 'flow_occ/%06d_*.png' % seq_ix)))
411 # images = sorted(glob(os.path.join(root, 'hd1k_input', 'image_2/%06d_*.png' % seq_ix)))
412
413 # if len(flows) == 0:
414 # break
415
416 # for i in range(len(flows)-1):
417 # self.flow_list += [flows[i]]
418 # self.image_list += [ [images[i], images[i+1]] ]
419
420 # seq_ix += 1
421
422
423

Callers 1

fetch_dataloaderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected