question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Support]: Zone Defined Object Threshold Filter - Unexpected Behavior

See original GitHub issue

Describe the problem you are having

Hello! Thanks for this amazing project!

I have Frigate monitoring a camera with a number of zones. I have one zone which has an object which keeps being detected as a person. So far the best way I found to deal with this recurrent detection is to increase the person detection threshold for that zone only.

When I define the unique threshold for the object/zone, the object is still detected and listed in the events page despite not meeting my defined threshold, but strangely it lacks a zone as soon as I save and reload the config for Frigate. I (hopefully) attached a screenshot from the events page showing this.

Is that expected behavior that it still shows up on the events page?

image

Version

0.10.0-DB1255A

Frigate config file

mqtt:
  host: removed
  topic_prefix: frigate-coral
  client_id: frigate-coral

detectors:
  coral:
    type: edgetpu
    device: usb

cameras:
  outside-patio-slider:
    detect:
      width: 1024
      height: 576
      fps: 5
      max_disappeared: 50
    objects:
      track:
        - person
    ffmpeg:
      inputs:
        - path: rtsp://user:password@host/axis-media/media.amp?camera=2&streamprofile=motion
          roles:
            - detect
            - record
    zones:
      C-Patio:
        coordinates: 157,576,875,576,622,232,404,235
      N-Patio:
        coordinates: 803,260,1024,379,1024,576,874,576,624,232
        filters:
          person:
            threshold: 0.81
      N-Back-Yard:
        coordinates: 1024,317,861,242,821,256,801,264,1024,386
      S-Patio:
        coordinates: 0,576,0,359,126,264,300,284,406,229,165,576
      SE-Back-Yard:
        coordinates: 137,266,0,350,0,306,166,196,277,192,301,281
      Deck-Stairs:
        coordinates: 595,66,268,72,273,162,278,240,302,286
      C-Back-Yard:
        coordinates: 504,227,615,223,641,263,689,112,563,79,371,229
      NE-Back-Yard:
        coordinates: 659,237,673,166,793,200,850,235,797,252
    record:
      enabled: true
      retain:
        days: 0      
      events:
        retain:
          default: 14
          mode: motion
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
    rtmp:
      enabled: False

  outside-garage-eave:
    detect:
      width: 704
      height: 480
      fps: 5
      max_disappeared: 50
    objects:
      track:
        - person
        - car
        - dog
    ffmpeg:
      inputs:
        - path: rtsp://user:password@host/cam/realmonitor?channel=1&subtype=1
          roles:
            - detect
            - record
    motion:
      mask:
        - 173,480,189,396,173,307,129,223,97,144,109,55,51,49,0,172,0,480
        - 278,0,454,0,704,0,704,160,517,96,351,70,99,83,0,99,0,0
    zones:
      Driveway:
        coordinates: 704,480,312,480,303,286,301,144,392,68,521,93,589,150,704,270
      NE-Yard:
        coordinates: 217,71,44,91,0,200,0,480,300,480,293,282,287,155,373,71
      SE-Yard:
        coordinates: 676,230,704,248,704,160,534,95
    record:
      enabled: true
      retain:
        days: 0 
      events:
        retain:
          default: 14
          mode: motion
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
    rtmp:
      enabled: False

  outside-porch-eave:
    detect:
      width: 704
      height: 480
      fps: 5
    objects:
      track:
        - person
        - dog
    ffmpeg:
      inputs:
        - path: rtsp://user:password@host/cam/realmonitor?channel=1&subtype=2&unicast=true
          roles:
            - detect
            - record
    zones:
      Porch:
        coordinates: 164,480,476,480,332,302,92,351,35,212,0,0,0,0,0,480
      Sidewalk:
        coordinates: 96,348,47,241,21,138,87,122,149,117,182,139,255,317
      E-Yard:
        coordinates: 32,135,26,78,123,54,221,46,418,48,367,287,294,307,256,310,168,130,126,113
      N-Yard:
        coordinates: 420,57,466,74,589,145,704,241,704,480,472,480,400,395,357,332
    record:
      enabled: true
      retain:
        days: 0
      events:
        retain:
          default: 14
          mode: motion
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
    rtmp:
      enabled: False

Relevant log output

None

FFprobe output from your camera

root@3dba6717fb3d:/opt/frigate# ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-omx --enable-omx-rpi --enable-mmal --enable-v4l2_m2m --enable-neon --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, rtsp, from 'rtsp://user:password@host/axis-media/media.amp?camera=2':
  Metadata:
    title           : Session streamed with GStreamer
    comment         : rtsp-server
  Duration: N/A, start: 0.200233, bitrate: N/A
    Stream #0:0: Video: h264, yuvj420p(pc, bt709, progressive), 1024x576, 30 fps, 29.97 tbr, 90k tbn, 60 tbc

Frigate stats

{
  "detection_fps": 5.0,
  "detectors": {
    "coral": {
      "detection_start": 0.0,
      "inference_speed": 15.39,
      "pid": 8256
    }
  },
  "outside-garage-eave": {
    "camera_fps": 5.1,
    "capture_pid": 230,
    "detection_fps": 0.0,
    "pid": 224,
    "process_fps": 5.1,
    "skipped_fps": 0.0
  },
  "outside-patio-slider": {
    "camera_fps": 5.0,
    "capture_pid": 228,
    "detection_fps": 5.0,
    "pid": 221,
    "process_fps": 5.1,
    "skipped_fps": 0.0
  },
  "outside-porch-eave": {
    "camera_fps": 5.1,
    "capture_pid": 231,
    "detection_fps": 0.0,
    "pid": 227,
    "process_fps": 5.1,
    "skipped_fps": 0.0
  },
  "service": {
    "storage": {
      "/dev/shm": {
        "free": 263.2,
        "mount_type": "tmpfs",
        "total": 268.4,
        "used": 5.2
      },
      "/media/frigate/clips": {
        "free": 43967.9,
        "mount_type": "ext4",
        "total": 62566.4,
        "used": 16011.9
      },
      "/media/frigate/recordings": {
        "free": 43967.9,
        "mount_type": "ext4",
        "total": 62566.4,
        "used": 16011.9
      },
      "/tmp/cache": {
        "free": 993.9,
        "mount_type": "tmpfs",
        "total": 1000.0,
        "used": 6.1
      }
    },
    "temperatures": {},
    "uptime": 7471,
    "version": "0.10.0-db1255a"
  }
}

Operating system

Debian

Install method

Docker Compose

Coral version

USB

Network connection

Wired

Camera make and model

AXIS M3077-PLVE

Any other information that may be helpful

Not camera specific, I recently upgraded cameras and the same thing happens between to different make/model cameras.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
Archer36commented, Jan 19, 2022

Thanks Nick, I initially used a mask on the person object, but it was a moving target even knowing that it triggers on the bottom center. I ended up having to make an overly large person mask for this area which was counterproductive since I need to know if a person is in that area. That is why I decided to up the threshold for that zone and for people objects only, since the misidentified object frequently has a low identification confidence.

The odd part to me is that when the threshold filter is applied, instead of being excluded from the events page as I would expect since its below the configured threshold for the zone, it appears but now lacking a zone.

0reactions
Archer36commented, Jan 20, 2022

Seems to be working well, assuming all of this is intended behavior I’ll close it out. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Looker error catalog | Google Cloud
A filter's value is referenced inside another LookML dashboard filter. ... that has access filters. Persisting this table may result in unexpected behavior....
Read more >
Create a new alert rule - Azure Monitor - Microsoft Learn
A static threshold evaluates the rule by using the threshold value that you configure. Dynamic thresholds use machine learning algorithms to ...
Read more >
Troubleshoot Ad Manager line item delivery - Google Support
Navigate to Delivery and then Line items. Use filters to find and select the line item that isn't delivering. Select the line item's...
Read more >
Intro to basic Motion behaviors - Apple Support
Basic Motion behaviors animate specific parameters of the object to which they're ... or after the Camera Framing behavior can create unexpected results....
Read more >
What is the git clone --filter option's syntax? - Stack Overflow
The format for filter-spec is defined in the options section of git rev-list --help . You can also see it on github.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found