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

Method __init__

core/utils/datasets.py:164–185  ·  view source on GitHub ↗
(self, aug_params=None, split='train', root='datasets/FlyingChairs_release/data')

Source from the content-addressed store, hash-verified

162
163class FlyingChairs(FlowDataset):
164 def __init__(self, aug_params=None, split='train', root='datasets/FlyingChairs_release/data'):
165 super(FlyingChairs, self).__init__(aug_params)
166
167 root = 's3://'
168
169 with open("./flow_dataset/flying_chairs/flyingchairs_ppm.txt") as f:
170 images = f.readlines()
171 images = [root+img.strip() for img in images]
172 with open("./flow_dataset/flying_chairs/flyingchairs_flo.txt") as f:
173 flows = f.readlines()
174 flows = [root+flo.strip() for flo in flows]
175
176 # images = sorted(glob(osp.join(root, '*.ppm')))
177 # flows = sorted(glob(osp.join(root, '*.flo')))
178 assert (len(images)//2 == len(flows))
179
180 split_list = np.loadtxt('chairs_split.txt', dtype=np.int32)
181 for i in range(len(flows)):
182 xid = split_list[i]
183 if (split=='training' and xid==1) or (split=='validation' and xid==2):
184 self.flow_list += [ flows[i] ]
185 self.image_list += [ [images[2*i], images[2*i+1]] ]
186
187
188class FlyingThings3D(FlowDataset):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected