-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdataset_catalog.py
105 lines (102 loc) · 3.97 KB
/
dataset_catalog.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
from lib.config import cfg
class DatasetCatalog(object):
@staticmethod
def get(name):
dataset_attrs = {
'LinemodTest': {
'id': 'linemod',
'data_root': 'data/linemod/{}/JPEGImages'.format(cfg.cls_type),
'ann_file': 'data/linemod/{}/test.json'.format(cfg.cls_type),
'split': 'test'
},
'LinemodTrain': {
'id': 'linemod',
'data_root': 'data/linemod/{}/JPEGImages'.format(cfg.cls_type),
'ann_file': 'data/linemod/{}/train.json'.format(cfg.cls_type),
'split': 'train'
},
'TlessTest': {
'id': 'tless_test',
'ann_file': 'data/tless/test_primesense/test.json',
'split': 'test'
},
'TlessMini': {
'id': 'tless_test',
'ann_file': 'data/tless/test_primesense/test.json',
'split': 'mini'
},
'TlessTrain': {
'id': 'tless',
'ann_file': 'data/tless/renders/assets/asset.json',
'split': 'train'
},
'TlessAgTrain': {
'id': 'tless_ag',
'ann_file': 'data/tless/t-less-mix/train.json',
'split': 'test'
},
'TlessAgAsTrain': {
'id': 'tless_train',
'ann_file': 'data/tless/train_primesense/assets/train.json',
'split': 'train'
},
'LinemodOccTest': {
'id': 'linemod',
'data_root': 'data/occlusion_linemod/RGB-D/rgb_noseg',
'ann_file': 'data/linemod/{}/occ.json'.format(cfg.cls_type),
'split': 'test'
},
'TlessPoseTrain': {
'id': 'tless_train',
'ann_file': 'data/cache/tless_pose/{}/train.json'.format(cfg.cls_type),
'split': 'train'
},
'TlessPoseMini': {
'id': 'tless_test',
'det_file': 'data/cache/tless_ct/results.json',
'ann_file': 'data/cache/tless_pose/test.json',
'det_gt_file': 'data/tless/test_primesense/test.json',
'obj_id': cfg.cls_type,
'split': 'mini'
},
'TlessPoseTest': {
'id': 'tless_test',
'det_file': 'data/cache/tless_ct/results.json',
'ann_file': 'data/cache/tless_pose/test.json',
'det_gt_file': 'data/tless/test_primesense/test.json',
'obj_id': cfg.cls_type,
'split': 'test'
},
'YcbTest': {
'id': 'ycb',
'ann_file': 'data/YCB/posedb/{}_val.pkl'.format(cfg.cls_type),
'data_root': 'data/YCB'
},
'CustomTrain': {
'id': 'custom',
'data_root': 'data/custom',
'ann_file': 'data/custom/train.json',
'split': 'train'
},
'CustomTest': {
'id': 'custom',
'data_root': 'data/custom',
'ann_file': 'data/custom/train.json',
'split': 'test'
},
# register the dataset for xarm7
"CustomXArm7_syn_10k_Train": {
'id': 'custom',
'data_root': "../../data/xarm7/simulate/pvnet_data/pvnet_format/train/",
'ann_file': '../../data/xarm7/simulate/pvnet_data/pvnet_format/train//train.json',
'split': 'train'
},
"CustomXArm7_syn_10k_Test": {
'id': 'custom',
'data_root': "../../data/xarm7/simulate/pvnet_data/pvnet_format/test",
'ann_file': '../../data/xarm7/simulate/pvnet_data/pvnet_format/test/train.json',
'split': 'test'
}
}
attrs = dataset_attrs[name]
return attrs.copy()