52 for main_dir
in VERSION_DICT:
54 train_dir = VERSION_DICT[main_dir][TRAIN_DIR_KEY]
55 test_dir = VERSION_DICT[main_dir][TEST_DIR_KEY]
58 assert has_main_dir,
'Dataset folder not found'
81 for img_path, pid, camid
in query:
82 query_tmp.append((img_path, pid+num_train_pids, camid))
87 for img_path, pid, camid
in gallery:
88 gallery_temp.append((img_path, pid+num_train_pids, camid))
90 gallery = gallery_temp
94 if 'combineall' in kwargs
and kwargs[
'combineall']:
96 super(MSMT17, self).
__init__(train, query, gallery, **kwargs)
99 with open(list_path,
'r')
as txt:
100 lines = txt.readlines()
104 for img_idx, img_info
in enumerate(lines):
105 img_path, pid = img_info.split(
' ')
107 camid = int(img_path.split(
'_')[2]) - 1
108 img_path = osp.join(dir_path, img_path)
112 data.append((img_path, pid, camid))