Setting up mask in Frigate to ignore areas does not work frowning

Hello! Please tell me where I made a mistake? The mask does not work and messages about the detected object are received.

mqtt:
  host: 192.168.1.134
  user: Alex
  password: Alex

# --------------DETECT-------------
detect:
  width: 1280
  height: 720
  fps: 5
  enabled: True
  stationary:
    interval: 0
    threshold: 50

# ----------OBJECTS--------------
objects:
  track:
    - person
    - car
    - cat
    - bird

record:
  enabled: True
  retain:
    days: 3
    mode: all
  events:
    pre_capture: 1
    post_capture: 1
    objects:
      - person
      - car
      - cat
      - bird
    retain:
      default: 6
      mode: active_objects
      objects:
        person: 6
        car: 3
        cat: 6
        bird: 6

snapshots:
  enabled: true
  clean_copy: True
  timestamp: False
  bounding_box: False
  crop: False
  height: 475
  required_zones: []
  retain:
    default: 10
    objects:
      person: 10
      car: 10
      cat: 6
      bird: 6

#---------CAMERAS-----------
cameras:
  camera_3:
      ffmpeg:
        inputs:
          - path: rtsp://admin:[email protected]:554/1
            roles:
              - detect
          - path: rtsp://admin:[email protected]:554/1
            roles:
              - record
      motion:
        mask:
          - 0,0,0,242,616,258,612,333,1280,414,1280,0,705,0


If the motion started outside of the mask (for example the wind moved the grass) it could still trigger detection of the objects nearby. You can observe the motion boxes in debug mode to check if that is the issue.

If you don’t want to detect the object in that area you can always set detection filter masks not only motion masks.

Or you can set the area of interest as a zone and only send notifications if an object enters the zone.

You’re right! It’s really grass. But the configuration states that only detected

objects:
  track:
    - person
    - car
    - cat
    - bird

Frigate works by detecting motion and then running object detection on the motion area to check if any object of interest is there. So the motion detection is independent of the object.

The motion mask prevents motion detection from triggering in that area but If the motion starts outside the mask but it overlaps with the mask it can still detect object in the mask area.

2 Likes

This is very unusual. Motion detects below.

A registers an object in a mask.

If you turn on “Regions” in the Debug menu it will show you what part of the picture is sent to object detection.

here is a more detailed explanation: Masks | Frigate

1 Like

Please read the docs Masks | Frigate

Motion masks are not supposed to be used this way, it is highly discouraged. If you don’t want events from objects in the street then a required zone should be used

2 Likes

I missed required_zones when I was reading through config docs. I have to modify my config. Thanks for the info!

And yet I can’t understand why the setup is not working correctly. If I have specified that the pictures and recordings are only for cars, humans, cats, dogs and birds. And it captures any movement.

No? You specifically configured it to record everything for 3 days and then 6 days of the objects detected

Snapshots are only ever taken of detected objects.

1 Like

I thought that these settings are not for all active objects.)))

which settings? it is not clear what you mean

Don’t these settings tell Frigate that you need to record the specified names?

For events yes, you are still telling it to keep 24/7 recordings for 3 days

I’d suggest reading the docs Recording | Frigate

1 Like