Local realtime person detection for RTSP cameras

You want a single system to do over 100 cameras and want to provide this for free?
You might be able to do this computationally, but this is likely going to be a very expensive system.
I would say that your idea of VMs for each unit would be a good way to go design wise if you choose a traditional server appliance. As for the specs of the computer…lots of RAM, lots of cores, multiple video cards to decode that many streams, AI cards to help with the inference.
I haven’t kept up with frigate close enough to know if they ever got inference working on the GPU like deepstack and others…last I knew it was only video decode that a GPU helped with.
On the other hand…
I wonder what synology surveillance station would cost with 100 licenses and how many (NAS devices) you would need to do 100 cameras. Likely cheaper and better supported in the long run.

From time to time my system gets into a point where I get repeated notification of same person detection to my telegram account. I get same detection every minute. For now I found out that two things stops this recurring notification:

  1. Restarting frigate
  2. A new different detection

Any idea what causing this recurring event?

I think it happened when event is in progress status and because of it notifications are triggered multiple times. It happened to me as well, but how to avoid it or how to change automation I don’t know.

Somtime for me happens that the siren that i have on frigate automation will trigger out of nowhere. When i check what did trigger it and i see box with nobody inside and written person. It is triggering until i restart frigate. I’ve got used to it and just restart frigate time to time…

Do you know if this was added ? Keen to order a coral but Iim on dsm7 (running home assistant super on vmm and Frigate add on) .

1 Like

I use this branch on my ds220+ to install frigate in docker.
My HA instance is on a seperate NUC. And the add on pulls in the remote frigate data.

1 Like

Sweet. It didn’t take me long to setup frigate and I could set it up faster again now. If coral doesn’t work in my 1019+ dsm7 I’ll move frigate to docker and use this branch. Thanks for the info

Yeah, as far as I know this hasn’t been added to the main add on release. Probably could be at some point.

Is there a way to disable all cameras (and not by stoping frigate)?

I am using privacy mask from cam manufacturer

        cam9pm:
            command_on: 'curl --digest --globoff "http://LOGIN:PASSWORD@CAMIP/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].Covers[0].EncodeBlend=true"'
            command_off: 'curl --digest --globoff "http://LOGIN:PASSWORD@CAMIP/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].Covers[0].EncodeBlend=false"'
            command_state: 'curl -s --digest --globoff "http://LOGIN:PASSWORD@CAMIP/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget[0].Covers[0].EncodeBlend" | grep -q true'

Hi guys

Does anyone have any success with detecting cars. I would like to trigger a notification when one of the two cars leave or arrive?

Hello,

I have my HA and frigate running on docker on a weak NUC PC that is dedicated for that purpose.
When I enable detection it clogs up all of the CPU and I would like to avoid that without buying a Coral.
I also have a pretty powerful desktop PC with Windows, and my question is can I use the computing power of the desktop PC to do all of the AI jobs from my cameras?

Thanks

If you install frigate on the computer, sure.

I would also like to use the output of the AI for some automations in HA.
So just to map the heavy lifting to the PC… I hope it makes sense :grin:

I dont think you can do that without a cluster.
But i think that you may limit cpu usage in docker. I think you can limit cpu usage per container. So limiting frigate cpu usage may do the trick.
I never done this but was considering.

Thanks for your reply.
I don’t know if I want to limit his usage because then he might not do his job correctly…

Did anybody succeed with usage of custom trained models with Frigate?
Standard dataset is so poor in terms of accuracy.

You can install frigate on a different computer and still use it within HA for automations.

1 Like

You can check PC bios and make sure it set for performance and not power save profile. This greatly throttles cpu.

Docker allows limit cpu core use. It’s easiest to do in portainer. You can set memory and cpu usage as required. If you do not have enough cpu you will start missing detections. Limiting frame rate would help but at some point it becomes useless depending on your needs

1 Like

Has anyone had any luck getting frigate running on Synology DSM V7?

I had it running fine on v6 and finally took the risk of upgrading and realized that Frigate can no longer see my Coral. I tried a guide to install USB drivers but it hasn’t changed anything.

Has anyone gotten this to work?

My logs look like this, is it USB or inability to load the library?



[2022-09-06 10:15:29] frigate.app                    INFO    : Camera processor started for right: 228


[2022-09-06 10:15:29] frigate.app                    INFO    : Camera processor started for left: 229


[2022-09-06 10:15:29] frigate.app                    INFO    : Camera processor started for front: 231


[2022-09-06 10:15:29] frigate.app                    INFO    : Camera processor started for back: 232


[2022-09-06 10:15:29] frigate.app                    INFO    : Capture process started for right: 235


[2022-09-06 10:15:29] frigate.app                    INFO    : Capture process started for left: 236


[2022-09-06 10:15:29] frigate.app                    INFO    : Capture process started for front: 238


[2022-09-06 10:15:29] frigate.app                    INFO    : Capture process started for back: 239


[2022-09-06 10:15:29] ws4py                          INFO    : Using epoll


[2022-09-06 10:15:49] frigate.watchdog               INFO    : Detection appears to have stopped. Exiting frigate...


[cont-finish.d] executing container finish scripts...


[cont-finish.d] done.


[s6-finish] waiting for services.


[2022-09-06 10:15:49] frigate.video                  INFO    : left: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures


[2022-09-06 10:15:49] frigate.video                  INFO    : left: ffmpeg process is not running. exiting capture thread...


[2022-09-06 10:15:49] frigate.video                  INFO    : right: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures


[2022-09-06 10:15:49] frigate.video                  INFO    : right: ffmpeg process is not running. exiting capture thread...


[s6-finish] sending all processes the TERM signal.


[s6-finish] sending all processes the KILL signal and exiting.


[s6-init] making user provided files available at /var/run/s6/etc...exited 0.


[s6-init] ensuring user provided files have correct perms...exited 0.


[fix-attrs.d] applying ownership & permissions fixes...


[fix-attrs.d] done.


[cont-init.d] executing container initialization scripts...


[cont-init.d] done.


[services.d] starting services


[services.d] done.


[2022-09-06 10:15:59] frigate.app                    INFO    : Starting Frigate (0.9.4-26ae608)


Starting migrations


[2022-09-06 10:16:00] peewee_migrate                 INFO    : Starting migrations


There is nothing to migrate


[2022-09-06 10:16:00] peewee_migrate                 INFO    : There is nothing to migrate


[2022-09-06 10:16:00] frigate.mqtt                   INFO    : MQTT connected


[2022-09-06 10:16:00] frigate.app                    INFO    : Output process started: 220


[2022-09-06 10:16:00] detector.coral                 INFO    : Starting detection process: 219


[2022-09-06 10:16:00] frigate.edgetpu                INFO    : Attempting to load TPU as usb


[2022-09-06 10:16:00] frigate.edgetpu                ERROR   : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.


Process detector:coral:


Traceback (most recent call last):


  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate


    delegate = Delegate(library, options)


  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__


    raise ValueError(capture.message)


ValueError



During handling of the above exception, another exception occurred:



Traceback (most recent call last):


  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap


    self.run()


  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run


    self._target(*self._args, **self._kwargs)


  File "/opt/frigate/frigate/edgetpu.py", line 156, in run_detector


    object_detector = LocalObjectDetector(


  File "/opt/frigate/frigate/edgetpu.py", line 64, in __init__


    edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)


  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate


    raise ValueError('Failed to load delegate from {}\n{}'.format(


ValueError: Failed to load delegate from libedgetpu.so.1.0