Local realtime person detection for RTSP cameras

See updated readme sensor example here: https://github.com/blakeblackshear/frigate/tree/dev#integration-with-homeassistant

Post your lxc.conf file and your docker run command. I compare it against mine to see any difference.

Your lxc container is running as privileged right?

I have below settings for docker to run in a LXC container too:

lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:

more info on above here

can someone explain this please:

input: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2

what is viewer and the password? Is it the camera logging password? Is this change since last update?

yes login & password. Either you hardcode the pass in config.xml or you set as env var in the docker command.

ok, I tried this on existing LXC and it broke my docker. Will have closer look later :slight_smile:
thanks

input: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=2

Is this correct? But getting errors “server denied”

How do you revert to previous version in docker?

try to validate the url using VLC first.

works fine…

I loaded up 0.7.0-rc1.

Nice CPU reduction! I’d guess that’s from eliminating the conversion from yuv420p to rgb24.

My PCIe Coral was not detected as the default config is for only USB now. I figured out that the option needed was “device: pci”.

Working good thanks @blakeblackshear !

I would go ahead and update to rc2.

works better thanks. It seems running privileged is a must. I had tried nesting, seen many tutorials doing this, but did not work with USB forwarding.
Now getting inference speeds lower than 10ms. Will switch to latest RC, because CPU is around 25% with 3cams (20fps total, FullHD)

when starting the container I get this error: Fontconfig error: Cannot load default config file.
but the processes continue and everything seems to be working correctly, is this normal?
this happens with rc1 and rc2, so far I was using the stable version
Greetings

That error is expected at the moment. Just disregard.

1 Like

If you can provide more detailed information, it would be great to add it to the docs.

may sound stupid (since in docker run command), but just need to run a privileged container.
I have tried unprivileged, especially using trick detailled here: https://discuss.linuxcontainers.org/t/usb-camera-passthrough-to-unprivileged-lxc/2191/3
Not success so far, because getting wrong owner/group mapping when mounting usb TPU device, then cannot use it.

Running -rc2, not seeing a big difference in CPU load of the LXC (moved from 16% avg to 14% avg)

thanks for this great program!

So your issue was running frigate inside unprivileged lxc container right?

What’s your host setup? How many cams and what resolution? Did you pass through and enable hardware acceleration device too?

Would b great to know what performance you people are getting from different kinds of hardware.

Host setup: NUC7i5 32GB RAM running Proxmox 6.2
I tried to run Docker inside VM, this way I could use HW acceleration (thru graphics card virtualization GVT-g). But was unable to get good usage of Coral USB.
Moved to LXC Docker, with parameters above, and now getting avg inference speed of 8.4ms over the past 12 hours when in idle. When object detected, jumping to around 20ms.
Using 400MB of ram and 15% CPU avg.
Running 3 cams in SW decode only: 2 cams 1080p@5fps, 1 cam 1080p@15fps.

Hey @blakeblackshear, I updated to 0.7.0-rc2 a few minutes ago and it’s working well (with less CPU too! thanks!) - though I did notice a little different behavior. I have a min_area set for person for one of my cameras, but I’m seeing a person (it’s actually a hose reel hanging on the neighbor’s house) being detected every couple of seconds in the debug mjpeg stream that’s smaller than my set min_area. Not sure if it makes a difference, but the “person” does happen to appear inside of another green detection box for a car that is stationary in the driveway. Frigate does not seem to be publishing an ON value for my Home Assistant “Driveway person” sensor (which is good), but my Driveway camera FPS graph now shows higher values than it used to on 0.6.x. I don’t mind what it’s doing as it’s not negatively affecting anything, but is this expected behavior or a new bug introduced on 0.7.x?

What level do you have min_area set for? Global, camera, or zone? Note that the global and camera level filters are no longer merged. If you have camera level filters, they replace the global filters.

Ah yes, that would be it. I missed that in your release notes. Thanks for clarifying, all is good now after reworking the filters in my config.