Local realtime person detection for RTSP cameras

I would pull the containers from my docker hub account rather than building your own. The config entry is a recent change: https://github.com/blakeblackshear/frigate/blob/6e79a5402e8eca31d5ee1badc1931092321a376b/config/config.example.yml#L112-L118

I think I am running 0.6.0 code from github…I built my own as I wanted to change the thresholding in motion detection (I cut it down from 25 to 5 as I was having trouble detecting motion reliably on a low res camera), I am running on a pi4…

The code on 0.6.0 still takes take_frame, is it possible to download the corresponding code to the new fps?

Thanks

just a side note, i mostly run Hikvision cams and some having variable fps, not sure its china firmware bug or feature or what but i also noticed even a restart /power cycle of the cam set back the fps to default 25 from lets say 4fps. Too bad, i even loaded different cam firmware doesnt help. Bottom line is, you need to build your system to cope with this scenario. This means once such happen fps on Coral jumps up and for that i use big heatsink attached to the Coral and thats it. I must say this fps bug or feature happens on a few cams only, so no big issue at all.

It’s in master now, so you should be able to make the same changes again.

Thanks Blake, much appreciated…

can someone help me with cfg ?

web_port: 5000
tensorflow_device: usb
mqtt:
  host: 192.168.1.23
  topic_prefix: frigate
save_clips:
  max_seconds: 300
  ffmpeg:
    global_args:
      - -hide_banner
      - -loglevel
      - info
objects:
  track:
    - person
    - car
    - truck
  filters:
    person:
      min_area: 5000
      max_area: 100000
      min_score: 0.5
      threshold: 0.85
    car:
      min_area: 5000
      max_area: 100000
      threshold: 0.5
cameras:
  garaz:
    ffmpeg:
      input: rtsp://192.168.1.180/cam/realmonitor?channel=1&subtype=1
    take_frame: 1
    width: 1280
    zones:
      front_steps:
        coordinates:
          - 2209,238
          - 129,1105
          - 1312,946
        filters:
          person:
            min_area: 5000
            max_area: 100000
            threshold: 0.8
    save_clips:
      enabled: False
      pre_capture: 30
    snapshots:
      show_timestamp: False
      draw_zones: True
    objects:
      track:
        - person
        - car
    regions:
      - size: 1929
        x_offset: 0
        y_offset: 0

how to draw helper line ? and why car it’s not found Screenshot from 2020-09-18 14-00-21 also why http://${localIP}:5000/garaz it’s too small it;s normal ?
docker image: blakeblackshear/frigate:v0.6.0-rc2

I forgot to indicate that I even tried separate usb powered hub but the restarting messages still remained.

If you find a solution, please do post.

Thanks for sharing your experiences. I was also contemplating buying an additional USB 3.0 card but will now reconsider this solution…

Just curious, were you ever able to get the Coral working at all on your computer? (e.g. with their bird detection sample classify_image.py on their website?). I tried to do it last night outside of Docker (on Ubuntu 18.04) but was unsuccessful… Got this error message: “illegal instruction (core dumped)”

When I run dmesg after this, I see the same error message I got when I was trying to run frigate.

I am now wondering if it’s because I’m running on old hardware (using amd phenom x4 9650 cpu)… might need to upgrade to something newer.

Hi Blake, as discussed, i want to give you a camera record in which frigate missed again a car detection in this case it was close and still missed it. Too bad, we really need to improve it. So, please let me know where i can send you the dropbox link with the video.

You can send me a link in a private message here.

@blakeblackshear 1st of all, thank you for creating such amazing project.

I have used your project to setup human detection outside my office. Its been running fine but sometimes it will catch some false positives when a cat decides to take a walk in the detection area.

I’m currently running docker image 0.6.0-rc2 with below settings for all camera:

min_area: 5000
max_area: 100000
threshold: 0.6

the offending cat:

I am going to try to use the min_score to see if I can filter out this cat from triggering my detection.

Do you have any suggestion? I will now enable the recording, should you need video for testing i could send it to you.

thanks again.

A threshold of 0.6 is actually very low. You will certainly get many false positives that way. I would suggest 0.85 as a starting point. You may also want to set a min_area in the zone. You could also break the zone into multiple parts so you can be even more specific with min_area.

you can order the usb version from amazon. they ship to australia.

I just updated to 0.6.0 from 0.5.1 which worked great and now im getting a constant stream of error messages “stating frame 1600711741.614265 is not in memory store”. Any ideas on a good place to start troubleshooting?

That was probably happening before, but silently ignored. That happens when the memory store is full and a frame is dropped. Is it working otherwise?

For the most part yes. I am seeing a bit higher cpu usage.

I have 2 cameras that are reporting much higher frame rates than what they are actually set at. Those cameras are also the ones that appear in the “stating frame 1600711741.614265 is not in memory store”. messages that I am receiving.

Check the new example config for the fps parameter. You need to set it on cameras where ffmpeg can’t determine the fps reliability.

Has anybody tried the “clips” functionality with the new Media browser model in HA 0.115?

I can imagine getting a media browser with all of the clips recorded by Frigate could be very useful?

The first immediate question is that I have no idea how to expose the clip folder into HA’s Supervised Docker setup?

its super useful to view back my detection clips right from HA interface.

Supervised setup should be to bind your frigate /clips folder to your HA /media/clips folder.

Eg. assuming your frigate container /clips folder is map to your host /opt/frigate/clips, then map your HA container /media/clips to /opt/frigate/clips

1 Like

Have you had any chance to check my video? I could send you every day a test video showing there are trucks and cars missed. Right now even a large concrete mixed truck was not detected. Something really not good. Please advice what to do. Do you see the same issue with your latest version with 7 cams?