Example #1
0
    def check_raw_file(self):
        assert self.zipfiles_dir.exists()
        if not self.raw_data_folder.exists():
            unpack_file(self.zipfiles_dir, self.store_dir, self.logger)

        check_path(self.split_config_path, create=True)

        if not self.split_new_det_mat_path.exists() or not self.split_new_lab_mat_path.exists():
            config_file_dir = self.split_config_path / 'person-re-ranking-master'
            if not config_file_dir.exists():
                config_file_path = self.store_dir / 'person-re-ranking-master.zip'
                if not config_file_path.exists():
                    urlretrieve(self.split_new_mat_url, config_file_path)

                unpack_file(config_file_path, self.split_config_path, self.logger)

            if not self.split_new_det_mat_path.exists():
                copy_file_to(
                    self.split_config_path / 'person-re-ranking-master/evaluation/data/CUHK03/cuhk03_new_protocol_config_detected.mat',
                    self.store_dir)
            if not self.split_new_lab_mat_path.exists():
                copy_file_to(
                    self.split_config_path / 'person-re-ranking-master/evaluation/data/CUHK03/cuhk03_new_protocol_config_labeled.mat',
                    self.store_dir)

            if config_file_dir.exists():
                remove_folder(config_file_dir)

        assert self.raw_mat_path.exists()
Example #2
0
    def check_raw_file(self):
        if not self.zipfiles_dir.exists():
            check_path(self.zipfiles_dir.parent, create=True)
            urlretrieve(self.dataset_url, self.zipfiles_dir)
        if not self.raw_data_folder.exists():
            unpack_file(self.zipfiles_dir, self.store_dir, self.logger)

        assert self.split_mat_path.exists()
Example #3
0
    def check_raw_file(self):
        assert self.zipfiles_dir.exists()
        if not self.raw_data_folder.exists():
            unpack_file(self.zipfiles_dir, self.store_dir, self.logger)

        assert self.train_dir.exists()
        assert self.query_dir.exists()
        assert self.gallery_dir.exists()
Example #4
0
    def check_raw_file(self):
        check_path(self.raw_data_folder, create=True)
        raw_file_folder = self.zipfiles_dir.parent
        raw_data_list = ['bbox_train', 'bbox_test', 'MARS-evaluation-master']

        for raw_data in raw_data_list:
            if not (self.raw_data_folder / raw_data).exists():
                unpack_file(raw_file_folder / str(raw_data + '.zip'), self.raw_data_folder, self.logger)
Example #5
0
 def check_raw_file(self):
     if not self.raw_data_folder.exists():
         unpack_file(self.zipfiles_dir, self.store_dir)