def __init__(self, root='/raid/home/zhihui/reid_strong_baseline/data/Market-1501-fixed/', verbose=True, **kwargs):
    super(Market1501, self).__init__()
    self.dataset_dir = root
    self.train_dir = osp.join(self.dataset_dir, 'bounding_box_train')
    self.query_dir = osp.join(self.dataset_dir, 'query')
    self.gallery_dir = osp.join(self.dataset_dir, 'bounding_box_test')
    self._check_before_run()
    train = self._process_dir(self.train_dir, relabel=True)
    query = self._process_dir(self.query_dir, relabel=False)
    gallery = self._process_dir(self.gallery_dir, relabel=False)
    if verbose:
        print('=> Market1501 loaded')
        self.print_dataset_statistics(train, query, gallery)
    self.train = train
    self.query = query
    self.gallery = gallery
    (self.num_train_pids, self.num_train_imgs, self.num_train_cams) = self.get_imagedata_info(self.train)
    (self.num_query_pids, self.num_query_imgs, self.num_query_cams) = self.get_imagedata_info(self.query)
    (self.num_gallery_pids, self.num_gallery_imgs, self.num_gallery_cams) = self.get_imagedata_info(self.gallery)
def __init__(self, root='/raid/home/zhihui/reid_strong_baseline/data/Market-1501-fixed/', verbose=True, **kwargs):
    super(Market1501, self).__init__()
    self.dataset_dir = root
    self.train_dir = osp.join(self.dataset_dir, 'bounding_box_train')
    self.query_dir = osp.join(self.dataset_dir, 'query')
    self.gallery_dir = osp.join(self.dataset_dir, 'bounding_box_test')
    self._check_before_run()
    train = self._process_dir(self.train_dir, relabel=True)
    query = self._process_dir(self.query_dir, relabel=False)
    gallery = self._process_dir(self.gallery_dir, relabel=False)
    if verbose:
        print('=> Market1501 loaded')
        self.print_dataset_statistics(train, query, gallery)
    self.train = train
    self.query = query
    self.gallery = gallery
    (self.num_train_pids, self.num_train_imgs, self.num_train_cams) = self.get_imagedata_info(self.train)
    (self.num_query_pids, self.num_query_imgs, self.num_query_cams) = self.get_imagedata_info(self.query)
    (self.num_gallery_pids, self.num_gallery_imgs, self.num_gallery_cams) = self.get_imagedata_info(self.gallery)