def __init__(self, root='data', min_seq_len=0, verbose=True, **kwargs):
    self.dataset_dir = osp.join(root, self.dataset_dir)
    self.dataset_url = 'http://vision.cs.duke.edu/DukeMTMC/data/misc/DukeMTMC-VideoReID.zip'
    self.train_dir = osp.join(self.dataset_dir, 'DukeMTMC-VideoReID/train')
    self.query_dir = osp.join(self.dataset_dir, 'DukeMTMC-VideoReID/query')
    self.gallery_dir = osp.join(self.dataset_dir, 'DukeMTMC-VideoReID/gallery')
    self.split_train_json_path = osp.join(self.dataset_dir, 'split_train.json')
    self.split_query_json_path = osp.join(self.dataset_dir, 'split_query.json')
    self.split_gallery_json_path = osp.join(self.dataset_dir, 'split_gallery.json')
    self.min_seq_len = min_seq_len
    self._download_data()
    self._check_before_run()
    print('Note: if root path is changed, the previously generated json files need to be re-generated (so delete them first)')
    train = self._process_dir(self.train_dir, self.split_train_json_path, relabel=True)
    query = self._process_dir(self.query_dir, self.split_query_json_path, relabel=False)
    gallery = self._process_dir(self.gallery_dir, self.split_gallery_json_path, relabel=False)
    if verbose:
        print('=> DukeMTMC-VideoReID loaded')
        self.print_dataset_statistics(train, query, gallery)
    self.train = train
    self.query = query
    self.gallery = gallery
    (self.num_train_pids, _, self.num_train_cams) = self.get_videodata_info(self.train)
    (self.num_query_pids, _, self.num_query_cams) = self.get_videodata_info(self.query)
    (self.num_gallery_pids, _, self.num_gallery_cams) = self.get_videodata_info(self.gallery)
def __init__(self, root='data', min_seq_len=0, verbose=True, **kwargs):
    self.dataset_dir = osp.join(root, self.dataset_dir)
    self.dataset_url = 'http://vision.cs.duke.edu/DukeMTMC/data/misc/DukeMTMC-VideoReID.zip'
    self.train_dir = osp.join(self.dataset_dir, 'DukeMTMC-VideoReID/train')
    self.query_dir = osp.join(self.dataset_dir, 'DukeMTMC-VideoReID/query')
    self.gallery_dir = osp.join(self.dataset_dir, 'DukeMTMC-VideoReID/gallery')
    self.split_train_json_path = osp.join(self.dataset_dir, 'split_train.json')
    self.split_query_json_path = osp.join(self.dataset_dir, 'split_query.json')
    self.split_gallery_json_path = osp.join(self.dataset_dir, 'split_gallery.json')
    self.min_seq_len = min_seq_len
    self._download_data()
    self._check_before_run()
    print('Note: if root path is changed, the previously generated json files need to be re-generated (so delete them first)')
    train = self._process_dir(self.train_dir, self.split_train_json_path, relabel=True)
    query = self._process_dir(self.query_dir, self.split_query_json_path, relabel=False)
    gallery = self._process_dir(self.gallery_dir, self.split_gallery_json_path, relabel=False)
    if verbose:
        print('=> DukeMTMC-VideoReID loaded')
        self.print_dataset_statistics(train, query, gallery)
    self.train = train
    self.query = query
    self.gallery = gallery
    (self.num_train_pids, _, self.num_train_cams) = self.get_videodata_info(self.train)
    (self.num_query_pids, _, self.num_query_cams) = self.get_videodata_info(self.query)
    (self.num_gallery_pids, _, self.num_gallery_cams) = self.get_videodata_info(self.gallery)