Local realtime person detection for RTSP cameras

It started up fine, I cant tell a difference yet. I did look at debug again before I killed it and It was back down to 3.2. Right now it is showing 10. Ill report back once it gets busier outside and they start doing some work. One thing I noticed though, it use to always have a box around my car when it is in the garage and its not doing that now…I did walk in front of the driveway cam and it boxed me:)

da@deep:/opt/frigate$ nvidia-smi
Thu Apr  9 10:11:15 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64.00    Driver Version: 440.64.00    CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 2080    On   | 00000000:07:00.0 Off |                  N/A |
| 24%   25C    P8     4W / 245W |    749MiB /  7973MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1620      G   /usr/lib/xorg/Xorg                            38MiB |
|    0      1880      G   /usr/bin/gnome-shell                          17MiB |
|    0     32495      C   python3                                      681MiB |
+-----------------------------------------------------------------------------+

EDIT:


sudo sudo docker run --rm \
--gpus all \
--privileged \
--shm-size=1024m \
-e TRT_FLOAT_PRECISION=16 \
-v /opt/frigate:/config:ro \
-v /etc/localtime:/etc/localtime:ro \
-p 5000:5000 \
frigate-gpu

Car just drove by that really goes through both drive and front cams…i quickly checked debug and it was at 2.49…maybe it reports 10 when idle? wild ass guess

Here ya go

I’ll watch around 5pm tonight

I guess so. I recall mine was also 10.0, when there were no motion.

Unless you changed it in your branch, the inference speed is not the sum from all cameras.

It starts at 10 as a default value and computes a rolling average. If your speeds are less it will need to run inference several times to come down to the actual time.

Hey thanks for the continued work on this project. So sweet.

The cameras got a little busier and I just looked through the debug stats history. At 5:20:21 it hit 80fps with 2.18ms. (I believe those are ms)

1 Like

So we had an intruder in our back yard last night, so I’ve rolled back to 0.2-beta because I need it to stay up longer than a few days… I will try testing again when there are potential fixes for the fmpeg_process didnt return any bytes issue.

What seems to be happening for me is coral inference is low for ages then eventually ends up in the 400’s

Here’s a clear pic. Highest it hit is 124fps and 2.11ms.

1 Like

Hey! So it looks like you’ve done a ton of work in the last year! I recently updating the docker package to the latest and well, it’s completely broken now. Is there any way you could add any additional information needed to migrate?

I read your github, updated my config to match your latest config type. But I don’t know if there are more steps? Do I need to add ffmpeg to my directory now? Do you have a changelog somewhere?

Here is my current error

File “detect_objects.py”, line 79, in main
cameras[name] = Camera(name, FFMPEG_DEFAULT_CONFIG, GLOBAL_OBJECT_CONFIG, config, prepped_frame_queue, client, MQTT_TOPIC_PREFIX)
On connect called
File “/opt/frigate/frigate/video.py”, line 131, in init
self.regions = self.config[‘regions’]
KeyError: ‘regions’

Still on Unraid?

Yes I am…

Can you post your config?

Well… I really liked this, but after 1 to 2 days it gives the same error as the other ones. And I need to restart the container. :frowning:

not easily it seems

error about regions suggest that you are not using latest version of code?
as it does not use regions anymore.
i dont have any knowledge about unraid, but make sure that you are running latest release.
latest release image shoud be blakeblackshear/frigate:0.5.0, or prerelease images 0.5.1-rc2.

Same here, i really like it but it’s failing after few hours…
For now im recreating frigate from cron.d every 4 hours:

#/etc/cron.d/frigate-restart
14 */4 * * * root /usr/bin/docker-compose --file /docker/frigate/docker-compose.yaml up -d --force-recreate frigate

so it was set to blakeblackshear/frigate:latest, setting it to 0.5.0 clears the error, but not it never connects to the coral.

That logs also have lots of these

Terminating the existing ffmpeg process…
Waiting for ffmpeg to exit gracefully…
Creating ffmpeg process…

I went back to .4 beta and things and been running flawlessly.I think the new versions with the auto regions are going to be awesome once a bit more stable. For me I already had the regions setup and its been rock solid.

First off, awesome work!

I am testing out the frigate-gpu image and have it working amazingly well on a GTX1060.

My cams produce 2x streams (both 20fps)…a low-res h.264 (640x360) and full res (6Mp) H.265…this works for both!

The problem is things are being missed on the low res stream, so I thought I could use the full res stream and just change the resolution within the config.yml.

However when I try to drop the height + width of the stream in the config.yml the stream starts but I just get static on the debug stream and nothing is detected.

Also - is there a way of reducing the running CPU overhead - its causing my i5 8400 to run at 20 - 30% constantly on the h.265 stream and 15 - 20% on the h.264 stream. I currently have the FPS set to 5 for 2 cameras and the ‘take_frame’ to 1.

The GPU running at ~20% when persons are detected which is totally acceptable.

Thanks in advance.

1 Like