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