(data_path)
| 8 | OUT_PATH = DATA_PATH + 'annotations/' |
| 9 | |
| 10 | def load_paths(data_path): |
| 11 | with open(data_path, 'r') as file: |
| 12 | img_files = file.readlines() |
| 13 | img_files = [x.replace('\n', '') for x in img_files] |
| 14 | img_files = list(filter(lambda x: len(x) > 0, img_files)) |
| 15 | label_files = [x.replace('images', 'labels_with_ids').replace('.png', '.txt').replace('.jpg', '.txt') for x in img_files] |
| 16 | return img_files, label_files |
| 17 | |
| 18 | if __name__ == '__main__': |
| 19 | if not os.path.exists(OUT_PATH): |
no outgoing calls
no test coverage detected