MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / run_from_train

Function run_from_train

tutorials/ctracker/test.py:283–297  ·  view source on GitHub ↗
(model_dir, root_path)

Source from the content-addressed store, hash-verified

281 videoWriter.release()
282
283def run_from_train(model_dir, root_path):
284 if not os.path.exists(os.path.join(model_dir, 'results')):
285 os.makedirs(os.path.join(model_dir, 'results'))
286 retinanet = torch.load(os.path.join(model_dir, 'model_final.pt'))
287
288 use_gpu = True
289
290 if use_gpu: retinanet = retinanet.cuda()
291
292 retinanet.eval()
293
294 for seq_num in [2, 4, 5, 9, 10, 11, 13]:
295 run_each_dataset(model_dir, retinanet, root_path, 'train', 'MOT17-{:02d}'.format(seq_num))
296 for seq_num in [1, 3, 6, 7, 8, 12, 14]:
297 run_each_dataset(model_dir, retinanet, root_path, 'test', 'MOT17-{:02d}'.format(seq_num))
298
299def main(args=None):
300 parser = argparse.ArgumentParser(description='Simple script for testing a CTracker network.')

Callers

nothing calls this directly

Calls 2

run_each_datasetFunction · 0.70
evalMethod · 0.45

Tested by

no test coverage detected