Add object detection, tracking, mobile notifications, and search to any security camera.
regression test for newer tg
Rory Clear52928b7fb843
diff --git a/test/clip_images/front.png b/test/clip_images/front.pngnew file mode 100644index 0000000..2f4b323Binary files /dev/null and b/test/clip_images/front.png differdiff --git a/test/spam_test_yolo.py b/test/spam_test_yolo.pynew file mode 100644index 0000000..4d803e5--- /dev/null+++ b/test/spam_test_yolo.py@@ -0,0 +1,12 @@+import subprocess+for i in range(5):+ subprocess.run( ["python", "test/test_yolo.py"],+ env={+ **__import__("os").environ,+ "PYTHONPATH": ".",+ "BEAM": "2",+ "IGNORE_BEAM_CACHE": "1",+ },+ check=True,+ )+ print("passed",(i+1))diff --git a/test/test_yolo.py b/test/test_yolo.pyindex 3d6e858..5ab04fb 100644--- a/test/test_yolo.py+++ b/test/test_yolo.py@@ -5,17 +5,17 @@ from utils.helpers import jit_inferimport numpy as npif __name__ == "__main__":jit_cache = {}- img = cv2.imread("test/clip_images/f40.jpg")+ img = cv2.imread("test/clip_images/front.png")img = Tensor(img)model = YOLOv9("t", 960)for _ in range(3): preds = jit_infer(model, img, jit_cache).numpy()ret = []print(preds)for p in preds:- if p[-2] > 0.5: ret.append(list(p))- print(ret)+ if p[-2] > 0.7: ret.append(list(p))+ print("\n",ret)assert len(ret) == 1- expected = [70.17624, 212.71173, 895.62067, 517.2943, 0.6730736, 2.0]+ expected = [511.69214, 367.81128, 1294.1671, 899.5974, 0.8302731, 2.0]np.testing.assert_allclose(expected,ret[0], rtol=1e-4)# sanity test, BEAM is flakey