Local realtime person detection for RTSP cameras

Hey any chance you could share how? Thank you.

Well I found a little mention in the gut hub that mentions changing a variable on line 291 in the video. Py file. And then adding that variable in the config file. But thatā€™s not working or Iā€™m missing something. Iā€™ll try the model you mentioned and keep hunting. Thanks for explaining that.

Iā€™ve just finished reading through this entire thread ā€” needless to say Iā€™m very excited to try. You mention that youā€™ve now got a RPi4 with Coral. What is your experience?

Iā€™ve got 4x Dahua cameras and 1x Hikvision. Would an RPi4 be sufficient?

With low enough frame rates, 720p feeds, and a limited number of regions, you can make an RPi4 work.

Iā€™m using an RPI4 with one Dahua camera. I use the secondary channel (Sub Stream1) which is set to h264, 704x480 resolution and 5 FPS. Reducing the frame rate on the camera from 15 to 5 made a significant difference in CPU usage, as did these ffmpeg options to filter duplicate frames.

My load averages stay pretty low:

$ uptime
 17:45:39 up 35 days, 23 min,  4 users,  load average: 0.21, 0.25, 0.26

Person detection via MQTT is nearly instantaneous in this setup.

1 Like

I would like to run this in a Proxmox LXC, so I can not use a docker container.
Following the Dockerfile to build the LXContainer would be my path to install.

Before attempting this, can some one please let me know if there still exists a CPU version?
Readme.md states :
Note: This version requires the use of a Google Coral USB Accelerator

So which version should I go for, since I want a non-Coral version?

I have the original CPU release on Git running in LXC on Proxmox, no problem.

which version is that pls ? URL ?

the original!
check out the git page releases tab

CPU version still exists (and works well if you are willing to use up a good cpu for it), you just have to go back to one of the old versions. I asked this question earlier in the thread so you should be able to search CPU and scstraus and find it.

so release 0.0.1 is the only CPU version,
but there have been dozens of commits since then ?

@scstraus are you using 0.0.1 ?

@blakeblackshear, any chance we can get the status of frigate itself as a sensor in home assistant? Right now tensorflow fails after about 45 days and needs restarted. Iā€™d be great to get that on the dashboard so I know when to do it.

1 Like

I havenā€™t had any failures. What is happening? I would rather just detect the failure and have it fix itself. If I can detect it and report it as a sensor to homeassistant, then it can probably fix itself.

1 Like

In order to track that down I need to know when it happens. Right now the only way to check is to bring up the live view every few days or check the logs.

Please note: I think this is a hardware failure as simply resetting the coral fixes the issue.

I did observe that the coral can become unresponsive if the power supply is not adequate. For a Pi I recommend using a power supply which can supply 3 Amps. The standard pi supply delivers 2.5 Amps

ā€¦ after a month and a half?

So the solution is to unplug and replug the coral? Restarting the container doesnā€™t fix it?

So far thatā€™s what iā€™ve come up with. It throws the ā€œFailed to allocate tensorsā€ message and stops processing. Restart throws the same error. Unplug and replug coral and restart frigate works every time. Iā€™ll capture logs when it gets to that state again.

Thatā€™s unfortunate. I want to implement a stats endpoint that reports fps, etc. That should work for your use case. I have been really busy at work for the past few months, so I havenā€™t had time to work on things much.

1 Like

I have used it in the past and it works wellā€¦ but I needed a whole i7 for 4 cameras. Now Iā€™m on the Coral version and itā€™s only using 40% CPU on my synologyā€™s wimpy CPU for the same, and I could reduce that further with a bit of effort.