Local realtime person detection for RTSP cameras

Oh, ok. If it’s still analyzing each image for objects am I interpreting the coral frame rate incorrectly? I have a continuous 10ms inference value, but the coral frame rate sits at 0 at all times.

The frame rate for the coral will increase when motion is detected. If nothing is changing, it doesn’t waste time looking for objects in that frame.

Is it restarting the processes over and over again? Some of my cameras do that occasionally, but they seem to pick up where they left off when it restarts.

@blakeblackshear is it possible that the min_area isn’t working correctly in 0.5.0-rc2? Here is my config:

  doorbell:
    fps: 5
    ffmpeg:
      input: rtsp://user:pass@internalip:554/mpeg/media.amp
      track:
        - person
      filters:
        person:
          min_area: 10000
          max_area: 200000
          threshold: 0.75

and here is a small snapshot of the best.jpg of the camera:
image

It could also be that I don’t understand what min_area is :smiley: but I thought it wouldn’t report people that were smaller than the minimum defined?

Looks like you are missing an objects key. Update your config to be:

  doorbell:
    fps: 5
    ffmpeg:
      input: rtsp://user:pass@internalip:554/mpeg/media.amp
    objects:
      track:
        - person
      filters:
        person:
          min_area: 10000
          max_area: 200000
          threshold: 0.75

lol, im dumb. thank you man

Pushed up rc3 with a few more fixes. If you run into issues, grab the output of /debug/stats before restarting the container.

Changes:

  • Fix dictionary changed size during iteration error
  • Output stderr logs from plasma store
  • Cleanup frames from memory after finished rather than using default eviction
  • Add a few more metrics to stats

Docker image is available with docker pull blakeblackshear/frigate:0.5.0-rc3

1 Like

things are looking good with rc3 - this error was cleared up.
Is it possible to use an environment variable with the mqtt password? I’m using env vars for my cameras, but recently wanted to dump my config to github, so wanted to get rid of the hardcoded password. Here’s the stack trace I get

Traceback (most recent call last):
  File "detect_objects.py", line 246, in <module>
    main()
  File "detect_objects.py", line 118, in main
    client.connect(MQTT_HOST, MQTT_PORT, 60)
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 937, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1115, in reconnect
    return self._send_connect(self._keepalive)
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2676, in _send_connect
    self._pack_str16(packet, self._password)
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2513, in _pack_str16
    packet.extend(data)
TypeError: 'str' object cannot be interpreted as an integer

Here’s my config:

web_port: 5000

mqtt:
  host: internalip
  topic_prefix: frigate
  user: frigate
  password: {FRIGATE_MQTT_PASSWORD}

and here’s my .env file that docker is using:

FRIGATE_MQTT_PASSWORD=mqtt_passwd_redacted

Definitely. That will be easy to add.

Update: I was able to get the 1080p stream working. It did not like the 1024x576 stream.

This morning I checked my feeds and they were stopped.
They were last updated at 9:15pm (it’s currently 7:20 am)

What space is the error referring to?
I currently have 1.7 TB free on my Volume1 where the Docker images are stored.

It is referring to memory, not disk space. It doesn’t write to disk. Did you capture the output of the /debug/stats endpoint? Can you look for an error message just before the “There is not enough space to create…” messages started?

I did not.
That was a screen capture of what was shown in the Terminal view of the docker container.
Where are the logs stored so I can “docker exec …” into it and grab more info if it happens again.

I just noticed this was still in one of my browsers…

{

  • coral: {

    • fps: 0,

    • inference_speed: 10.26},

  • driveway: {

    • detection_fps: 0,

    • fps: 0.1,

    • skipped_fps: 0},

  • frontdoor: {

    • detection_fps: 0,

    • fps: 20.1,

    • skipped_fps: 0},

  • plasma_store_rc: null,

  • tracked_objects_queue: 713076

}

They are just sent to stdout/stderr and Docker handles the logs itself. It will depend on how you have logs configured in Docker. The default is /var/lib/docker/containers/[container-id]/[container-id]-json.log on your host.

That’s exactly what I was expecting. There was an error in the thread that processes tracked_objects_queue. It will normally be close to 0.

Is there something on my side I can change?

I don’t think so. I need to track down whatever caused that thread to stop.

I restarted the container this morning but the video stopped and the queue is growing again

curl http://10.0.0.20:5555/debug/stats

{“coral”:{“fps”:0.0,“inference_speed”:9.8},“driveway”:{“detection_fps”:0.0,“fps”:0.1,“skipped_fps”:0.0},“frontdoor”:{“detection_fps”:0.0,“fps”:20.0,“skipped_fps”:0.0},“plasma_store_rc”:null,“tracked_objects_queue”:190851}

How can I turn this into an attribute?
I tried the following but it doesn’t pull in anything

frigate_tracked_objects_queue:
value_template: ‘{{ states.sensor.frigate_debug.attributes[“tracked_objects_queue”] }}’

Hi @blakeblackshear any guido for install the frigate in de docker ??

thx

Can you find anything in the logs?