MCPcopy Create free account
hub / github.com/Walter0807/MotionBERT / WildDetDataset

Class WildDetDataset

lib/data/dataset_wild.py:88–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 return motion.astype(np.float32)
87
88class WildDetDataset(Dataset):
89 def __init__(self, json_path, clip_len=243, vid_size=None, scale_range=None, focus=None):
90 self.json_path = json_path
91 self.clip_len = clip_len
92 self.vid_all = read_input(json_path, vid_size, scale_range, focus)
93
94 def __len__(self):
95 'Denotes the total number of samples'
96 return math.ceil(len(self.vid_all) / self.clip_len)
97
98 def __getitem__(self, index):
99 'Generates one sample of data'
100 st = index*self.clip_len
101 end = min((index+1)*self.clip_len, len(self.vid_all))
102 return self.vid_all[st:end]

Callers 2

infer_wild_mesh.pyFile · 0.90
infer_wild.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected