| 53 | self.need_reset = True in [x < 1 for x in ratio_list] |
| 54 | |
| 55 | def set_epoch_as_seed(self, seed, dataset_config): |
| 56 | if self.mode == 'train': |
| 57 | try: |
| 58 | border_map_id = [ |
| 59 | index for index, dictionary in enumerate( |
| 60 | dataset_config['transforms']) |
| 61 | if 'MakeBorderMap' in dictionary |
| 62 | ][0] |
| 63 | shrink_map_id = [ |
| 64 | index for index, dictionary in enumerate( |
| 65 | dataset_config['transforms']) |
| 66 | if 'MakeShrinkMap' in dictionary |
| 67 | ][0] |
| 68 | dataset_config['transforms'][border_map_id]['MakeBorderMap'][ |
| 69 | 'epoch'] = seed if seed is not None else 0 |
| 70 | dataset_config['transforms'][shrink_map_id]['MakeShrinkMap'][ |
| 71 | 'epoch'] = seed if seed is not None else 0 |
| 72 | except Exception: |
| 73 | return |
| 74 | |
| 75 | def get_image_info_list(self, file_list, ratio_list): |
| 76 | if isinstance(file_list, str): |