MCPcopy Index your code
hub / github.com/MotrixLab/MotionDiffuse / get_dataset_motion_loader

Function get_dataset_motion_loader

text2motion/datasets/evaluator.py:277–296  ·  view source on GitHub ↗
(opt_path, batch_size, device)

Source from the content-addressed store, hash-verified

275
276
277def get_dataset_motion_loader(opt_path, batch_size, device):
278 opt = get_opt(opt_path, device)
279
280 # Configurations of T2M dataset and KIT dataset is almost the same
281 if opt.dataset_name == 't2m' or opt.dataset_name == 'kit':
282 print('Loading dataset %s ...' % opt.dataset_name)
283
284 mean = np.load(pjoin(opt.meta_dir, 'mean.npy'))
285 std = np.load(pjoin(opt.meta_dir, 'std.npy'))
286
287 w_vectorizer = WordVectorizer('./data/glove', 'our_vab')
288 split_file = pjoin(opt.data_root, 'test.txt')
289 dataset = Text2MotionDatasetV2(opt, mean, std, split_file, w_vectorizer)
290 dataloader = DataLoader(dataset, batch_size=batch_size, num_workers=4, drop_last=True,
291 collate_fn=collate_fn, shuffle=True)
292 else:
293 raise KeyError('Dataset not Recognized !!')
294
295 print('Ground Truth Dataset Loading Completed!!!')
296 return dataloader, dataset
297
298
299class MMGeneratedDataset(Dataset):

Callers 1

evaluation.pyFile · 0.90

Calls 4

get_optFunction · 0.90
WordVectorizerClass · 0.90
loadMethod · 0.80

Tested by

no test coverage detected