MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / load_paths

Function load_paths

tools/convert_ethz_to_coco.py:10–16  ·  view source on GitHub ↗
(data_path)

Source from the content-addressed store, hash-verified

8OUT_PATH = DATA_PATH + 'annotations/'
9
10def 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
18if __name__ == '__main__':
19 if not os.path.exists(OUT_PATH):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected