Add object detection, tracking, mobile notifications, and search to any security camera.
remove rfdetr from mot test
Rory Clear53cde1205a0b
diff --git a/test/run_mot.py b/test/run_mot.pyindex cc049c9..14479d5 100644--- a/test/run_mot.py+++ b/test/run_mot.py@@ -1,6 +1,5 @@from detection.yolov9 import YOLOv9, safe_load, load_state_dict, Sequential, Silence, Conv, RepNCSPELAN4, AConv,\ADown, CBLinear, CBFuse, SPPELAN, Upsample, Concat, DDetect, postprocess, fetch-from detection.rfdetr import RFDETR, detr_to_yolofrom utils.helpers import draw_bounding_boxesimport cv2from tinygrad import Tensor, TinyJit@@ -21,8 +20,8 @@ if __name__ == "__main__":w, h = int(cap.get(3)), int(cap.get(4))out = cv2.VideoWriter(f"test_outputs/out_{size}.mp4", cv2.VideoWriter_fourcc(*"mp4v"), 30, (w, h))- model = YOLOv9(size, res=960) if m == "y" else RFDETR("nano")- expected = 156 if m == "y" else 157+ model = YOLOv9(size, res=960)+ expected = 156i = 0ppl = set()@@ -33,8 +32,6 @@ if __name__ == "__main__":im = Tensor(im).cast(dtypes.float32)pred = model(im).numpy()online_targets = ocs_tracker.update(pred, 0.25)- if type(model) == RFDETR: # RF-DETR has different class_ids- for j in range(len(online_targets)): online_targets[j].class_id = detr_to_yolo[int(online_targets[j].class_id)]preds = []for x in online_targets:if x.tracklet_len < 1 or x.speed < 2.5: continuediff --git a/test/test_mot.py b/test/test_mot.pyindex 73dadaa..f6b678b 100644--- a/test/test_mot.py+++ b/test/test_mot.py@@ -1,2 +1,2 @@-import subprocess-for x in ["y", "r"]: subprocess.run(["python", "test/run_mot.py", x])\ No newline at end of file+import subprocess # todo remove+for x in ["y"]: subprocess.run(["python", "test/run_mot.py", x])\ No newline at end of file