Add object detection, tracking, mobile notifications, and search to any security camera.
print time taken
rorycleard6bfa8d911c0
diff --git a/test/test_ocsort.py b/test/test_ocsort.pyindex 9541a0a..334ec45 100644--- a/test/test_ocsort.py+++ b/test/test_ocsort.py@@ -1,13 +1,16 @@import picklefrom ocsort_tracker import ocsortimport numpy as np+import timeocs_tracker = ocsort.OCSort(max_age=60)tracks = pickle.load(open('test/tracks.pkl', 'rb'))+st = time.time()for i in range(len(tracks)):out = ocs_tracker.update(tracks[i][0], 0.25)preds = []expected = []for x in out: preds.append(np.array([x.tlwh[0], x.tlwh[1], x.tlwh[0] + x.tlwh[2], x.tlwh[1] + x.tlwh[3], x.score, x.class_id]))for x in tracks[i][1]: expected.append(np.array([x.tlwh[0], x.tlwh[1], x.tlwh[0] + x.tlwh[2], x.tlwh[1] + x.tlwh[3], x.score, x.class_id]))- np.testing.assert_allclose(preds, expected, rtol=1e-5)\ No newline at end of file+ np.testing.assert_allclose(preds, expected, rtol=1e-5)+print(f"passed in {(time.time() - st):.2f} seconds")\ No newline at end of file