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

Class FlyingChairs

core/datasets.py:121–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120
121class FlyingChairs(FlowDataset):
122 def __init__(self, aug_params=None, split='train', root='datasets/FlyingChairs_release/data'):
123 super(FlyingChairs, self).__init__(aug_params)
124
125 images = sorted(glob(osp.join(root, '*.ppm')))
126 flows = sorted(glob(osp.join(root, '*.flo')))
127 assert (len(images)//2 == len(flows))
128
129 split_list = np.loadtxt('chairs_split.txt', dtype=np.int32)
130 for i in range(len(flows)):
131 xid = split_list[i]
132 if (split=='training' and xid==1) or (split=='validation' and xid==2):
133 self.flow_list += [ flows[i] ]
134 self.image_list += [ [images[2*i], images[2*i+1]] ]
135
136
137class FlyingThings3D(FlowDataset):

Callers 1

fetch_dataloaderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected