id is 1 start
(labels_path: str)
| 10 | |
| 11 | |
| 12 | def get_label2id(labels_path: str) -> Dict[str, int]: |
| 13 | """id is 1 start""" |
| 14 | with open(labels_path, 'r') as f: |
| 15 | labels_str = f.read().split() |
| 16 | labels_ids = list(range(0, len(labels_str))) |
| 17 | return dict(zip(labels_str, labels_ids)) |
| 18 | |
| 19 | |
| 20 | def get_annpaths(ann_dir_path: str = None, |