Frigate camera sensor occasionally stays "detected"

hey all
sometimes the the two binary sensor entities the frigate installation brought to HA - the ones that uses the camera feed as “person detector” - turns from “clear” (off), to “detected” (on), by a person that moved there, and get stuck this way although the person had left the detection zone i had configured.

when looking into the camera feed within the frigate webpage under “debug” mode, i see the “motion box” were the person was detected, but there is no one there anymore.

bounding box pic:


bounding with masks:

as you can see, the sensor history can be “as expected” in some occasions, and sometime just stuck on “detected”.

sensor history:

I configured the camera not to detect anything on the masked zones (no movement and no person), and also disabled the stationary detection (or at least, i think so…).
i figured maybe it has something to do with that, and tried to disable it, for the entire set up (on top), and for that specific camera (within its on config parameters), but with no luck so far.

this is my configuration yaml for this camera.
any pointers will be great.

detect:
  stationary:
    interval: 0
  
cameras:
  g3:
    ffmpeg: 
      inputs:
        - path: rtsp://10.0.150.151:554/s2
          roles:
            - detect
            - record
    record:
      enabled: True
      retain:
        days: 1
        mode: motion
      events:
        retain:
          default: 2
          mode: active_objects
    detect:
      width: 1024
      height: 576
      stationary:
        interval: 0
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 1
    objects:
      filters:
        person:
          mask:
            - 360,0,357,171,587,165,588,0
            - 0,168,0,0,205,0
            - 1024,0,1024,576,761,576,799,388,844,379,741,285,662,188,693,0
    motion:
      mask:
        - 360,0,357,171,587,165,588,0
        - 0,168,0,0,205,0
        - 1024,0,1024,576,761,576,799,388,844,379,741,285,662,188,693,0

needless to say that not going back to “clear” is messing up my automations that are triggered by this sensor going from “off” to “on”…

and another thing - although the HA binary sensor says “detected”, frigate will keep recognizing new “person” entering the detection zone and record it as a “person” event. i can go into frigate page and see new “events” generating.

cheers!
:slight_smile:

1 Like

I’ve same issue.
I Hope someone could help us

The bottom center of the detected object's bounding box is evaluated against the mask.

"For example, you want to mask out your timestamp, the sky, rooftops, etc. Keep in mind that this mask only prevents motion from being detected and does not prevent objects from being detected if object detection was started due to motion in unmasked areas."

** Further Clarification**

** Avoiding stationary objects**
https://docs.frigate.video/guides/stationary_objects/

thanks for replaying @Coolie1101
If i understand correctly what you are trying to say - a person is being detected in an “un masked” area, and is being monitored as he walks into the “masked” area.

I thought that by excluding same area from both will solve this, because:

  1. system is no monitoring this area at all, for anything
  2. if by any chance a person will be detected elseward, and will move into that area - the system will stop monitoring him, since that area is masked for person as well.

so, what is the right configuration to stop this from reoccurring? will clearing the “person mask” solve this issue?

The bottom center of the detected object’s bounding box is evaluated against the mask.

ok. i understood what you meant the first time as well, i m just not sure on how to fix it…

how about, making the “person” mask bigger than the “motion” mask? will that do the trick?
if there is some other obvious solution im missing out on, plz let me know

for anyone else with this problem, it seems that the action in my last post is helping somewhat. at least for last 48 hours.