Object Detection Region Size unexpected behavior #22060
-
|
I'm trying to understand how object detection regions are determined in Frigate, particularly in relation to the model input size. Below are two examples from the same camera stream (1920×1080) in almost identical scenarios. The only difference is the model resolution: in the first case I'm using YOLOv9s 640×640, and in the second YOLOv9s 320×320 (both using the OpenVINO detector). In the first example, a relatively small motion generates a medium-sized detection region. This makes sense, since the detection region roughly corresponds to the model resolution (640px in this case), which is about two-thirds of the image height (1080p). frigate_y9_640.mp4I then lowered the model resolution to 320x320 expecting smaller detection regions, but I observed the opposite behavior. The detection region becomes extremely large, which likely causes significant loss of detail when the region is scaled down to 320 before being passed to the model. frigate_y9_320.mp4I cannot fully explain this consistent behavior. Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Frigate stores previous regions that led to detections in the DB, so when you tested with the 640 model first it stored a larger region. You can clear the DB (or just the regions table) to reset this. In general it shouldn't be a problem after using a particular model for a while as it will average out, but just doing back to back testing can lead to this behavior. |
Beta Was this translation helpful? Give feedback.
Frigate stores previous regions that led to detections in the DB, so when you tested with the 640 model first it stored a larger region. You can clear the DB (or just the regions table) to reset this. In general it shouldn't be a problem after using a particular model for a while as it will average out, but just doing back to back testing can lead to this behavior.