blakeblackshear / frigate

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

[Support]: Stuff detected as person in garage #5391

Closed frakman1 closed 1 year ago

frakman1 commented 1 year ago

Describe the problem you are having

The following image keeps getting detected as a person.

image

image

I'm using default everything with just CPU as my processor/detector. I have frigate running in docker on my UNRAID server and using docker-wyze-bridge as the go between to my Wyze cams providing an RTSP feed.

Version

0.12.0-66881eb Docker: ghcr.io/blakeblackshear/frigate:0.12.0-beta7

Frigate config file

mqtt:
  host: *****

# Optional: Object configuration
# NOTE: Can be overridden at the camera level
objects:
  track:
    - person
    - car
    - bicycle

# Optional: Configuration for the jpg snapshots written to the clips directory for each event
# NOTE: Can be overridden at the camera level
snapshots:
  # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True
  # Optional: save a clean PNG copy of the snapshot image (default: shown below)
  clean_copy: True
  # Optional: print a timestamp on the snapshots (default: shown below)
  timestamp: True
  # Optional: draw bounding box on the snapshots (default: shown below)
  bounding_box: True
  # Optional: crop the snapshot (default: shown below)
  crop: False
  # Optional: height to resize the snapshot to (default: original size)
  height: 175
  # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
  required_zones: []
  # Optional: Camera override for retention settings (default: global values)
  retain:
    # Required: Default retention days (default: shown below)
    default: 2
    # Optional: Per object retention days
    objects:
      person: 3

record:
  enabled: True
  events:
    retain:
      default: 3

cameras:
  garage_wyze:
    ffmpeg:
      inputs:
        - path: rtsp://****:8554/garage-cam
          roles:
            - detect
            - rtmp
            - record
    detect:
      width: 1280
      height: 720
      fps: 5

  livingroom_wyze:
    ffmpeg:
      inputs:
        - path: rtsp://****:8554/living-room-cam
          roles:
            - detect
            - rtmp
            - record
    detect:
      width: 1280
      height: 720
      fps: 5

Relevant log output

I don't see any relevant logs

FFprobe output from your camera

# ffprobe rtsp://****:8554/garage-cam
ffprobe version n5.1-2-g915ef932a3-20220731 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20220731
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[rtsp @ 0x563ae373e140] method SETUP failed: 461 Unsupported Transport
Input #0, rtsp, from 'rtsp://****:8554/garage-cam':
  Metadata:
    title           : Stream
  Duration: N/A, start: 0.266844, bitrate: N/A
  Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn

Frigate stats

{"cpu_usages":{"%Cpu(s):":{"cpu":"id,","mem":"0.1"},"1":{"cpu":"0.0","mem":"0.0"},"112":{"cpu":"0.0","mem":"0.0"},"128":{"cpu":"0.0","mem":"0.0"},"129":{"cpu":"0.0","mem":"0.0"},"130":{"cpu":"0.0","mem":"0.0"},"131":{"cpu":"0.0","mem":"0.0"},"137":{"cpu":"0.0","mem":"0.0"},"146":{"cpu":"0.0","mem":"0.0"},"15":{"cpu":"0.0","mem":"0.0"},"162":{"cpu":"0.0","mem":"0.0"},"17":{"cpu":"0.0","mem":"0.0"},"188":{"cpu":"0.0","mem":"0.0"},"1933":{"cpu":"22.3","mem":"0.2"},"216":{"cpu":"0.0","mem":"0.0"},"238":{"cpu":"0.0","mem":"0.0"},"2384":{"cpu":"0.0","mem":"0.0"},"2398":{"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"},"268":{"cpu":"0.0","mem":"0.0"},"27":{"cpu":"0.0","mem":"0.0"},"28":{"cpu":"0.0","mem":"0.0"},"29":{"cpu":"0.0","mem":"0.0"},"2906":{"cpu":"0.0","mem":"0.0"},"2996":{"cpu":"0.0","mem":"0.0"},"30":{"cpu":"0.0","mem":"0.0"},"305":{"cpu":"0.0","mem":"0.0"},"3097":{"cpu":"0.0","mem":"0.0"},"31":{"cpu":"0.0","mem":"0.0"},"3104":{"cpu":"0.0","mem":"0.0"},"339":{"cpu":"0.0","mem":"0.0"},"363":{"cpu":"0.0","mem":"0.0"},"40":{"cpu":"0.0","mem":"0.0"},"400":{"cpu":"0.0","mem":"0.0"},"41":{"cpu":"0.0","mem":"0.0"},"447":{"cpu":"0.0","mem":"0.0"},"492":{"cpu":"0.0","mem":"0.0"},"539":{"cpu":"0.0","mem":"0.0"},"606":{"cpu":"0.0","mem":"0.0"},"649":{"cpu":"0.0","mem":"0.0"},"692":{"cpu":"0.0","mem":"0.0"},"735":{"cpu":"0.0","mem":"0.0"},"786":{"cpu":"0.0","mem":"0.0"},"79":{"cpu":"0.0","mem":"0.0"},"80":{"cpu":"0.0","mem":"0.0"},"81":{"cpu":"0.0","mem":"0.0"},"818":{"cpu":"0.0","mem":"0.0"},"88":{"cpu":"0.0","mem":"0.0"},"93":{"cpu":"4.7","mem":"0.2"},"972":{"cpu":"0.0","mem":"0.1"},"978":{"cpu":"0.3","mem":"0.0"},"979":{"cpu":"158.0","mem":"0.1"},"981":{"cpu":"0.7","mem":"0.1"},"984":{"cpu":"0.3","mem":"0.1"},"985":{"cpu":"0.0","mem":"0.1"},"986":{"cpu":"18.0","mem":"0.1"},"987":{"cpu":"2.3","mem":"0.1"},"988":{"cpu":"0.0","mem":"0.1"},"991":{"cpu":"1.7","mem":"0.1"},"993":{"cpu":"0.0","mem":"0.1"},"997":{"cpu":"17.3","mem":"0.2"},"MiB":{"cpu":"53172.7","mem":"avail"},"PID":{"cpu":"%CPU","mem":"%MEM"},"Tasks:":{"cpu":"stopped,","mem":"0"},"top":{"cpu":"users,","mem":"load"}},"detection_fps":4.5,"detectors":{"cpu":{"detection_start":1675629863.334006,"inference_speed":108.49,"pid":979}},"garage_wyze":{"camera_fps":4.9,"capture_pid":987,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":1933,"pid":984,"process_fps":4.9,"skipped_fps":0.0},"livingroom_wyze":{"camera_fps":4.9,"capture_pid":991,"detection_enabled":1,"detection_fps":4.5,"ffmpeg_pid":997,"pid":986,"process_fps":4.9,"skipped_fps":0.0},"service":{"last_updated":1675629866,"latest_version":"0.11.1","storage":{"/dev/shm":{"free":264.5,"mount_type":"tmpfs","total":268.4,"used":4.0},"/media/frigate/clips":{"free":8997047.3,"mount_type":"fuse.shfs","total":11998001.6,"used":3000954.3},"/media/frigate/recordings":{"free":8997047.3,"mount_type":"fuse.shfs","total":11998001.6,"used":3000954.3},"/tmp/cache":{"free":97.5,"mount_type":"tmpfs","total":100.0,"used":2.5}},"temperatures":{},"uptime":2040,"version":"0.12.0-66881eb"}}

Operating system

Debian

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Mixed

Camera make and model

Wyze via docker-wyze-bridge

Any other information that may be helpful

I just set this up today so am open to any suggestions for improvement.

NickM-27 commented 1 year ago

I'd suggest using a max_ratio filter since a person wouldn't be that wide. Object ratios are calculated as width / height in pixels.

frakman1 commented 1 year ago

@NickM-27

Thanks. What value do you recommend for max_ratio? I see the default is 2

# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
      max_ratio: 2.0
NickM-27 commented 1 year ago

@NickM-27

Thanks. What value do you recommend for max_ratio? I see the default is 2

# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
      max_ratio: 2.0

No, the default is 2400000 (as it says in the comment). 2 is there as a reasonable example

I'd recommend 1 so basically nothing wider than a square

frakman1 commented 1 year ago

Oh Ok. I was wondering why the values were SO different. I'll try 1. Thanks again.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

frakman1 commented 1 year ago

That didn't really work because it would break person detection. I ended up just moving the plants out of view.

my-umd commented 1 year ago

IMG_20230326_165950 IMG_20230326_170100 I have two funny false positives as well. The first one might look like a person's head with long hair, but it was a flying bumble bee. The second one (bottom right, boxed) might look like a lady with long skirt, but it is a piece of dried fallen branch. Need to do some spring cleaning yard work :) But is there any way to reduce these kind of false positives? BTW, on 0.12.0-rc1 using OpenVINO.