MCPcopy
hub / github.com/alibaba/EasyCV / build_dataset

Function build_dataset

easycv/datasets/builder.py:32–43  ·  view source on GitHub ↗
(cfg, default_args=None)

Source from the content-addressed store, hash-verified

30
31
32def build_dataset(cfg, default_args=None):
33 if isinstance(cfg, (list, tuple)):
34 dataset = ConcatDataset([build_dataset(c, default_args) for c in cfg])
35 elif cfg['type'] == 'RepeatDataset':
36 dataset = RepeatDataset(
37 build_dataset(cfg['dataset'], default_args), cfg['times'])
38 elif isinstance(cfg['data_source'].get('ann_file'), (list, tuple)):
39 dataset = _concat_dataset(cfg, default_args)
40 else:
41 dataset = build_from_cfg(cfg, DATASETS, default_args)
42
43 return dataset
44
45
46def build_dali_dataset(cfg, default_args=None):

Callers 15

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
quantize_evalFunction · 0.90
mainFunction · 0.90
count_flopFunction · 0.90
mainFunction · 0.90
train_modelFunction · 0.90
_get_datasetMethod · 0.90
_build_datasetFunction · 0.90

Calls 5

ConcatDatasetClass · 0.90
RepeatDatasetClass · 0.90
build_from_cfgFunction · 0.90
_concat_datasetFunction · 0.85
getMethod · 0.45

Tested by 15

_get_datasetMethod · 0.72
_build_datasetFunction · 0.72
test_metricMethod · 0.72
test_singleMethod · 0.72
_get_datasetMethod · 0.72
_get_datasetMethod · 0.72
_get_dataset_paiMethod · 0.72
_get_datasetMethod · 0.72
test_load_trainMethod · 0.72
test_load_testMethod · 0.72