blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.2k stars 1.76k forks source link

[Support]: event does not follow the mask #7829

Closed ukrolelo closed 1 year ago

ukrolelo commented 1 year ago

Describe the problem you are having

Mask is not masked, the event took the car as snapshot and recording

Version

0.12.1-367D724

Frigate config file

ffmpeg:

  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
  hwaccel_args: []

  output_args:
    detect: -f rawvideo -pix_fmt yuv420p
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an

cameras:
  CAM:

    ffmpeg:
      inputs:
        - path: rtsp://xxxx:xxxx@192.168.1.97:554/cam/realmonitor?channel=1&subtype=0
          roles:

            - record
        - path: rtsp://xxxx:xxxx@192.168.1.97:554/cam/realmonitor?channel=1&subtype=1
          roles:
            - detect
    zones:
      zone_outside:
        coordinates: 1920,1080,1920,187,1827,126,1650,77,1528,89,1079,138,372,329,0,480,0,1080
    motion:
      mask:
        - 1093,152,1514,100,1542,39,1920,167,1920,0,0,0,0,494,411,331,732,230

    detect:
      enabled: True
      max_disappeared: 25
      width: 1920
      height: 1080
      fps: 5
      stationary:
        interval: 300
      #best_image_timeout: 60

    record:
      enabled: True
      retain:
        days: 5
        mode: motion
      events:
        pre_capture: 15
        post_capture: 15
        objects:
          - person
          - bicycle
          - car
        retain:
            default: 5
            mode: motion

    rtmp:
      enabled: False
    snapshots:
      enabled: True
      timestamp: False
      bounding_box: True
      crop: False
      retain:
        default: 15
        #objects:
          #person: 15
    mqtt:
      enabled: False
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
    objects:
      track:
        - person
        - bicycle
        - car
      filters:
        person:
          min_area: 5000
          max_area: 40000
          min_score: 0.5
          threshold: 0.7
        bicycle:
          min_area: 5000
          max_area: 40000
          min_score: 0.5
          threshold: 0.7

Relevant log output

N/A

FFprobe output from your camera

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"5/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":1080,"width":1920}]}},{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"5/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":576,"width":704}]}}]

Frigate stats

{"CAM":{"camera_fps":5.0,"capture_pid":322,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":328,"pid":287,"process_fps":5.0,"skipped_fps":0.0},"CAM_2":{"camera_fps":5.0,"capture_pid":325,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":333,"pid":289,"process_fps":5.0,"skipped_fps":0.0},"CAM_3":{"camera_fps":5.1,"capture_pid":326,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":344,"pid":290,"process_fps":5.1,"skipped_fps":0.0},"CAM_4":{"camera_fps":5.0,"capture_pid":331,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":359,"pid":302,"process_fps":5.0,"skipped_fps":0.0},"OLD_CAM_1":{"camera_fps":5.0,"capture_pid":334,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":357,"pid":304,"process_fps":5.0,"skipped_fps":0.0},"OLD_CAM_11":{"camera_fps":5.0,"capture_pid":363,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":386,"pid":312,"process_fps":5.0,"skipped_fps":0.0},"OLD_CAM_12":{"camera_fps":5.1,"capture_pid":372,"detection_enabled":0,"detection_fps":0.0,"ffmpeg_pid":388,"pid":314,"process_fps":5.1,"skipped_fps":0.0},"OLD_CAM_13":{"camera_fps":5.1,"capture_pid":381,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":407,"pid":316,"process_fps":5.1,"skipped_fps":0.0},"OLD_CAM_14":{"camera_fps":5.1,"capture_pid":390,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":416,"pid":317,"process_fps":5.1,"skipped_fps":0.0},"OLD_CAM_15":{"camera_fps":5.0,"capture_pid":394,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":410,"pid":319,"process_fps":5.0,"skipped_fps":0.0},"OLD_CAM_16":{"camera_fps":5.1,"capture_pid":404,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":419,"pid":320,"process_fps":5.1,"skipped_fps":0.0},"OLD_CAM_2":{"camera_fps":5.0,"capture_pid":340,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":365,"pid":305,"process_fps":5.0,"skipped_fps":0.0},"OLD_CAM_4":{"camera_fps":5.0,"capture_pid":345,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":367,"pid":307,"process_fps":5.1,"skipped_fps":0.0},"OLD_CAM_7":{"camera_fps":5.1,"capture_pid":351,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":387,"pid":308,"process_fps":5.1,"skipped_fps":0.0},"OLD_CAM_8":{"camera_fps":5.2,"capture_pid":355,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":383,"pid":309,"process_fps":5.2,"skipped_fps":0.0},"OLD_CAM_9":{"camera_fps":5.2,"capture_pid":358,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":392,"pid":311,"process_fps":5.2,"skipped_fps":0.0},"cpu_usages":{"%Cpu(s):":{"cpu":"id,","mem":"0.4"},"1":{"cpu":"0.0","mem":"0.0"},"107":{"cpu":"0.0","mem":"0.0"},"112":{"cpu":"10.0","mem":"6.9"},"119":{"cpu":"0.0","mem":"0.1"},"12764":{"cpu":"0.0","mem":"0.0"},"12831":{"cpu":"0.0","mem":"0.1"},"12835":{"cpu":"0.3","mem":"0.1"},"12852":{"cpu":"0.0","mem":"0.0"},"134":{"cpu":"0.0","mem":"0.3"},"135":{"cpu":"0.0","mem":"0.1"},"136":{"cpu":"0.0","mem":"0.1"},"137":{"cpu":"0.0","mem":"0.3"},"15":{"cpu":"0.0","mem":"0.0"},"16":{"cpu":"0.0","mem":"0.0"},"24":{"cpu":"0.0","mem":"0.0"},"25":{"cpu":"0.0","mem":"0.0"},"26":{"cpu":"0.0","mem":"0.0"},"27":{"cpu":"0.0","mem":"0.0"},"275":{"cpu":"0.0","mem":"1.3"},"28":{"cpu":"0.0","mem":"0.0"},"281":{"cpu":"0.7","mem":"0.1"},"282":{"cpu":"0.0","mem":"1.9"},"284":{"cpu":"2.7","mem":"1.8"},"287":{"cpu":"0.7","mem":"1.7"},"288":{"cpu":"0.0","mem":"0.8"},"289":{"cpu":"0.3","mem":"1.7"},"29":{"cpu":"0.0","mem":"0.0"},"290":{"cpu":"0.3","mem":"1.7"},"30":{"cpu":"0.0","mem":"0.0"},"302":{"cpu":"0.3","mem":"1.7"},"303":{"cpu":"0.0","mem":"0.2"},"304":{"cpu":"0.3","mem":"1.8"},"305":{"cpu":"0.3","mem":"1.7"},"306":{"cpu":"0.0","mem":"0.2"},"307":{"cpu":"0.7","mem":"1.7"},"308":{"cpu":"0.0","mem":"1.7"},"309":{"cpu":"0.7","mem":"1.7"},"31":{"cpu":"0.0","mem":"0.0"},"310":{"cpu":"0.0","mem":"0.7"},"311":{"cpu":"0.3","mem":"1.7"},"312":{"cpu":"0.3","mem":"1.7"},"313":{"cpu":"0.0","mem":"0.7"},"314":{"cpu":"0.3","mem":"1.7"},"315":{"cpu":"0.0","mem":"0.2"},"316":{"cpu":"0.3","mem":"1.7"},"317":{"cpu":"0.3","mem":"1.7"},"318":{"cpu":"0.0","mem":"0.2"},"319":{"cpu":"0.3","mem":"1.7"},"32":{"cpu":"0.0","mem":"0.0"},"320":{"cpu":"0.3","mem":"1.7"},"321":{"cpu":"0.0","mem":"0.2"},"322":{"cpu":"1.3","mem":"1.7"},"325":{"cpu":"1.7","mem":"1.7"},"326":{"cpu":"1.7","mem":"1.7"},"327":{"cpu":"0.0","mem":"0.2"},"328":{"cpu":"3.3","mem":"0.8"},"331":{"cpu":"1.7","mem":"1.7"},"333":{"cpu":"3.0","mem":"0.7"},"334":{"cpu":"0.7","mem":"1.6"},"337":{"cpu":"0.0","mem":"0.2"},"340":{"cpu":"0.7","mem":"1.6"},"344":{"cpu":"3.3","mem":"0.7"},"345":{"cpu":"0.3","mem":"1.6"},"347":{"cpu":"0.0","mem":"0.7"},"349":{"cpu":"0.3","mem":"0.3"},"351":{"cpu":"0.7","mem":"1.6"},"354":{"cpu":"0.0","mem":"0.3"},"355":{"cpu":"0.7","mem":"1.6"},"356":{"cpu":"0.0","mem":"0.2"},"357":{"cpu":"3.7","mem":"0.5"},"358":{"cpu":"0.7","mem":"1.6"},"359":{"cpu":"3.3","mem":"0.9"},"363":{"cpu":"0.3","mem":"1.6"},"365":{"cpu":"2.0","mem":"0.6"},"367":{"cpu":"1.3","mem":"0.6"},"370":{"cpu":"0.0","mem":"0.2"},"372":{"cpu":"0.7","mem":"1.6"},"373":{"cpu":"0.3","mem":"0.3"},"381":{"cpu":"0.3","mem":"1.6"},"383":{"cpu":"1.3","mem":"0.6"},"386":{"cpu":"1.0","mem":"0.6"},"387":{"cpu":"2.0","mem":"0.5"},"388":{"cpu":"1.7","mem":"0.6"},"389":{"cpu":"0.0","mem":"0.2"},"390":{"cpu":"0.7","mem":"1.6"},"391":{"cpu":"0.3","mem":"0.3"},"392":{"cpu":"1.0","mem":"0.6"},"394":{"cpu":"0.3","mem":"1.6"},"401":{"cpu":"0.0","mem":"0.2"},"404":{"cpu":"0.7","mem":"1.6"},"406":{"cpu":"0.0","mem":"0.2"},"407":{"cpu":"0.7","mem":"0.6"},"409":{"cpu":"0.7","mem":"0.7"},"41":{"cpu":"0.0","mem":"0.0"},"410":{"cpu":"1.3","mem":"0.5"},"416":{"cpu":"1.3","mem":"0.6"},"419":{"cpu":"1.0","mem":"0.6"},"42":{"cpu":"0.0","mem":"0.0"},"78":{"cpu":"0.0","mem":"0.0"},"81":{"cpu":"0.0","mem":"0.0"},"82":{"cpu":"0.0","mem":"0.0"},"92":{"cpu":"0.0","mem":"0.3"},"MiB":{"cpu":"245.8","mem":"avail"},"PID":{"cpu":"%CPU","mem":"%MEM"},"Tasks:":{"cpu":"stopped,","mem":"0"},"top":{"cpu":"users,","mem":"load"}},"detection_fps":0.0,"detectors":{"coral":{"detection_start":0.0,"inference_speed":7.59,"pid":282}},"service":{"last_updated":1694810653,"latest_version":"0.12.1","storage":{"/dev/shm":{"free":187.0,"mount_type":"tmpfs","total":218.1,"used":31.1},"/media/frigate/clips":{"free":3829876.4,"mount_type":"zfs","total":3861707.9,"used":31831.5},"/media/frigate/recordings":{"free":3829876.4,"mount_type":"zfs","total":3861707.9,"used":31831.5},"/tmp/cache":{"free":15513.2,"mount_type":"overlay","total":20957.4,"used":4353.7}},"temperatures":{"apex_0":36.8},"uptime":5228,"version":"0.12.1-367d724"}}

Operating system

HassOS

Install method

Docker Compose

Coral version

PCIe

Network connection

Wired

Camera make and model

Dahua

Any other information that may be helpful

Screenshot_348 snapshot (1)

NickM-27 commented 1 year ago

Please read the docs https://docs.frigate.video/configuration/masks

Motion masks will not stop objects from being detected. Motion masks are meant to block things like trees, skylines, timestamps, etc. where motion will occur often but not due to actual objects. Required zones should be used to limit events to areas of interest.