This commit is contained in:
Glenn Jocher 2019-08-01 02:21:40 +02:00
parent 69c7d07996
commit e3d100dd34
1 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,7 @@ def detect(cfg,
colors = [[random.randint(0, 255) for _ in range(3)] for _ in range(len(classes))] colors = [[random.randint(0, 255) for _ in range(3)] for _ in range(len(classes))]
# Run inference # Run inference
t0 = time.time()
for i, (path, img, im0, vid_cap) in enumerate(dataloader): for i, (path, img, im0, vid_cap) in enumerate(dataloader):
t = time.time() t = time.time()
save_path = str(Path(output) / Path(path).name) save_path = str(Path(output) / Path(path).name)
@ -123,6 +124,8 @@ def detect(cfg,
if platform == 'darwin': # macos if platform == 'darwin': # macos
os.system('open ' + output + ' ' + save_path) os.system('open ' + output + ' ' + save_path)
print('Done. (%.3fs)' % (time.time() - t0))
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()