Local realtime person detection for RTSP cameras

You can also pull it from the API

1 Like

Thank you <3

Hello friends. Help to check the configuration. Instead of defining a Person, errors often occur as in the photo. Thank you for your help!

  camera_4: # <------ Name the camera
    mqtt:
      crop: True
      height: 500
    rtmp:
      enabled: false
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/1 # <----- Update for your camera
          roles:
            - detect
            - record
            - clips
    detect:
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
      fps: 14
    objects:
      track:
        - person
        - car
        - bird
        - cat
        - dog
      filters:
        person:
          min_score: 0.8 # min score for object to initiate tracking (default: 0.5
          threshold: 0.7 # min decimal percentage for tracked object's computed score to be considered a true positive (default: 0.7)
        car:
          min_score: 0.8 # min score for object to initiate tracking (default: 0.5
          threshold: 0.7
        bird:
          min_score: 0.8 # min score for object to initiate tracking (default: 0.5
          threshold: 0.7 # min decimal percentage for tracked object's computed score to be considered a true positive (default: 0.7)
        cat:
          min_score: 0.8 # min score for object to initiate tracking (default: 0.5
          threshold: 0.7
        dog:
          min_score: 0.8 # min score for object to initiate tracking (default: 0.5
          threshold: 0.7 # min decimal percentage for tracked object's computed score to be considered a true positive (default: 0.7)
    record:
      enabled: True
      retain:
        days: 3
        mode: motion
      events:
        pre_capture: 15
        post_capture: 15
        objects:
          - person
          - bird
          - cat
          - dog
        retain:
            default: 10
            mode: motion

play with the size of objects make birds have a max size for starters. Or don’t track birds, it’s fun to see it work, but do you actually want info on birds?

cute little bird you have there xD ahaha

Sometimes rare and interesting bird species arrive that you want to photograph. The system rarely confuses birds, cats, person. But I want it to work without errors.

1 Like

Thanks )))))

1 Like

If frigate wasn’t told to look for the birds it would probably say cat 79% or something.

1 Like

@blakeblackshear testing the latest stable i am getting ERROR : Unable to poll intel GPU stats: Failed to initialize PMU! (Operation not permitted)

no matter what i set here:
hwaccel_args: preset-vaapi
hwaccel_args: preset-intel-qsv-h264
hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p

does the HW acceleration work or not? ffmpeg cpu load is 3% for 1 single camera.
Intel CPU and testing the docker on port 5000, without any home assistant

hardware acceleration is working fine, just the GPU stats are not working. You should read Hardware Acceleration | Frigate

ok perfect, thanks

Network storage update!!!

How do you configure Frigate to leverage the new storage options?

You add a media storage volume with the name of frigate

1 Like

Hi, i have made an node red flow to send a snapshot to my telegram bot when there is motion detected on the cameras in Frigate. only the snapshots are in some loop. I am getting randomly sent snapshots throughout the day in my Telegram bot. I just don’t see what’s going wrong now. can someone help me? the only thing i want a snapshot to be sent when motion is detected.

[{"id":"c603f6acd41a2efd","type":"api-call-service","z":"4cd060584d63b973","name":"","server":"2ac5e9467e57d943","version":5,"debugenabled":false,"domain":"telegram_bot","service":"send_photo","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"file\": \"/media/frigate/snapshots/snapshot.jpg\",\t    \"caption\": \"Iemand bij de achterdeur!\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1310,"y":960,"wires":[[]]},{"id":"e183da5b77fdda2f","type":"debug","z":"4cd060584d63b973","name":"debug 8","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1160,"y":1080,"wires":[]},{"id":"13ea5100041039b6","type":"server-state-changed","z":"4cd060584d63b973","name":"Iemand bij de achtedeur?","server":"2ac5e9467e57d943","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.achterdeur_person_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":820,"wires":[["d76f3ea585531af0"],[]]},{"id":"f9b3eae4.f1dcd","type":"http request","z":"4cd060584d63b973","name":"Get Event IDs","method":"GET","ret":"txt","paytoqs":false,"url":"http://ccab4aaf-frigate:5000/api/events","tls":"","persist":false,"proxy":"","authType":"","x":360,"y":960,"wires":[["f10e8225.9924c","e183da5b77fdda2f"]]},{"id":"f10e8225.9924c","type":"function","z":"4cd060584d63b973","name":"Extract Event ID","func":"const events = JSON.parse(msg.payload);\n\nif (events.length > 0) {\n    const eventId = events[0].id;\n    msg.eventId = eventId;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":960,"wires":[["7460a7a5.4ed93"]]},{"id":"7460a7a5.4ed93","type":"http request","z":"4cd060584d63b973","name":"Get Snapshot","method":"GET","ret":"bin","paytoqs":false,"url":"http://ccab4aaf-frigate:5000/api/events/{{eventId}}/snapshot.jpg","tls":"","persist":false,"proxy":"","authType":"","x":780,"y":960,"wires":[["86e53f2b.8a2af8"]]},{"id":"86e53f2b.8a2af8","type":"file","z":"4cd060584d63b973","name":"Save Snapshot","filename":"/media/frigate/snapshots/snapshot.jpg","filenameType":"str","appendNewline":false,"createDir":true,"overwriteFile":"true","encoding":"none","x":980,"y":960,"wires":[["c603f6acd41a2efd"]]},{"id":"09e26e88157b43c2","type":"server-state-changed","z":"4cd060584d63b973","name":"Iemand op de oprit?","server":"2ac5e9467e57d943","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.oprit_person_occupancy_2","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":90,"y":1060,"wires":[["f9b3eae4.f1dcd"],[]]},{"id":"414015b1d3e7efc8","type":"api-current-state","z":"4cd060584d63b973","name":"Willem weg","server":"2ac5e9467e57d943","version":3,"outputs":2,"halt_if":"not_home","halt_if_type":"str","halt_if_compare":"is","entity_id":"person.willem","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":150,"y":960,"wires":[["f9b3eae4.f1dcd"],[]]},{"id":"d76f3ea585531af0","type":"api-current-state","z":"4cd060584d63b973","name":"Petra weg","server":"2ac5e9467e57d943","version":3,"outputs":2,"halt_if":"not_home","halt_if_type":"str","halt_if_compare":"is","entity_id":"person.petra","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":140,"y":900,"wires":[["414015b1d3e7efc8"],[]]},{"id":"2ac5e9467e57d943","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":": ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"default","statusTimeFormat":"h:m","enableGlobalContextStore":false}]

Does anyone have an example of a driveway? I have my car parked there and i understand if its still “in progress” that doesn’t mean it records longer so that is good.

I have 2 zones, 1 for the road and 1 for the parking space. But the parking space people can walk by. I want to record people from the parking space but not from the road. Then i also don’t want every car to be recorded, just the car that passed from the driveway onto the parking space. I know there is a stationary url on frigate but that only does part of the question. Any tips/pointers will help. Thanks!

For the most efficient CPU utilization, should my detect resolution match my substream resolution?

yes it should

1 Like

Your question is obviously lost here in this vast chasm of answers. You should start a new thread since I only found 3 questions about Lumus (2 by you) and NO answers. If you’re still monitoring it though, can you tell me what you used for the RTSP stream in VLC?rtsp://admin:[email protected]:8554/front_door/h264Preview_01_sub doesn’t work for me.

So I finally upgraded a few things today…one of them frigate. I went from 11 to 12.1.
Had a few things that were out of spec, but after a few edits it looks like everything is working. No more errors in the log.
But…it wasn’t all working. I took a test walk around and I’m now getting zero detection on one camera while another works just fine like it did before the upgrade.
EDIT------------------
Okay so I wasn’t trying to test anymore and walked down the driveway and got a notification!! It works, but nowhere near as well as it did in version 11. The detection is horrible now. Used to work when my side door opened and a person was standing in it…now I have to be 30 feet closer to the camera before motion is detected!
Are there some settings I can try to adjust for this?

Any suggestions?

Thanks