Local realtime person detection for RTSP cameras

I just tried running 4k H265 lorex 3 camera at 14 fps.

There are also a lot more false positive at 4k. It will detect pots and seesaw as person with 60-80 percent accuracy. There really needs to be a better trained model. I am also getting a lot of skipped frames with shm size set to 4g. My setup is i7-4470k ubuntu w/ docker and coral.

This is what I had set, but i ultimately ended up abandoning portainer in favor to manage it manually because of the memory arg (shm_size) that needed to be set, and I don’t think you can set it with portainer.

Heres what my docker-compose ended up looking like

frigate:
  container_name: frigate
  restart: unless-stopped
  privileged: true
  shm_size: '1g'
  image: blakeblackshear/frigate:stable
  volumes:
    - /dev/bus/usb:/dev/bus/usb
    - /etc/localtime:/etc/localtime:ro
    - /usr/share/frigate:/config
  ports:
    - "5000:5000"
  env_file:
    - ./.env

Hey, thanks :slight_smile: can you limit fps on frigate? The reason I ask is because I use unifi video, and it has hard set resolutions for high (1080p), medium (576p), low (360p), I’m currently recording the high, so I can’t reduce its FPS, the medium is being used by a pi as a real time CCTV monitor, so that only leaves the low, which I’m worried will be too low a resolution. So can I tell frigate to only care about 4 frames a second on the incoming video or something like that?

Thanks!

Anything that can be set in docker compose can be set in portainer. You just need to use a stack and put your docker compose in there.

Yes I believe you can tell frigate to skip frames now. I haven’t tried it but hopefully that solves your problem.

Hold a sec, 4k cameras work as well? I’m getting this everytime i try to switch to main stream of my 4k camera :thinking::

./run.sh: line 7: 18 Bus error (core dumped) python3.7 -u detect_objects.py

Use the

take_frame: 2

option for each camera to skip every other frame. Useful if you can’t reduce the frame rate on the camera! The higher the number, the more frames that are skipped.

Just to give you a rough idea for comparison, I have 5 cameras running on a Pi 4 and it manages just fine. I usually get a notification before I’ve even fully stepped out of the door.

Four of my streams are 640x480 @ 4fps. One cannot be changed so I’m using the skip frames option to bring it down to 5. Htop suggests it’s only utilizing about half of the CPU on average. I record to my Synology NAS 24/7 at full resolution. The low res stream works flawlessly for the purpose of notifications, at least in my case.

For some reason my detection fps is always: 0

Is that normal?

You’ve got a lot of skipped frames though.

Those skipped frames are from the camera where he has frigate configured to skip frames intentionally. Those are counted as skipped frames too. The other cameras at 4fps don’t have many skipped frames.

1 Like

So now that 0.5.1 is running pretty stable, has anyone got it working inside Unraid?

It’s interesting your max frame rate is less than half mine which often hits 80 with less cameras than you. I suspect you must have no trees casting shadows?

How are you getting on with esxi? I went through the thread and saw some people were having problems with usb pass through, but all working fine for you?

Hey ! I’m unable to find a website where the Google Coral can be shipped to France!
Does anybody has a solution?

Have you tried the website mouser.fr . I got the coral usb from Mouser.uk so is a reputable site.

Did you try these guys? https://www.mouser.fr/

Hello, yes I tried on mouser.fr and “Mouser does not presently sell this product.” on the .fr website.
When I go on the eu.mouser.com , the stock is available, but once i add my french delivery address, it says that i’m not on the right website …

As long as you do true usb pass through (amd iommu or intel vt-d) everything works great. Im running 2 coral devices, with 2 seperate pci-e usb controllers passed through to 2 vms and has been running great.

Yepp, mine is working great running inside Unraid. Let me know if you have any issues setting it up!

1 Like