Tweaking Frigate to get the best results
Frigate uses AI to detect people and other objects in your IP camera streams without sending any of your data or video footage to the cloud.
In this video I show you how I have set up Frigate to reliably detect people, dogs and cats in my camera streams. I've achieved this by tweaking the Frigate configuration file to get the best results.
Here is my full Frigate config.yaml file.
mqtt:
host: 192.168.1.3
user: user
password: <PASSWORD>
ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -an
rtmp:
# Optional: Enable the RTMP stream (default: True)
enabled: True
detectors:
coral:
type: edgetpu
device: usb
#Global Object Settings
objects:
track:
- person
filters:
person:
min_area: 5000
max_area: 100000
cameras:
FrontCam:
ffmpeg:
inputs:
# High Resolution Stream
- path: <PATHTOSTREAM>
roles:
- record
# Low Resolution Stream
- path: <PATHTOSTREAM>
roles:
- detect
- rtmp
detect:
width: 1280
height: 720
fps: 24
snapshots:
enabled: True
required_zones:
- Front_Patio
- Front_Steps
record:
enabled: True
retain:
days: 5
events:
retain:
default: 10
required_zones:
- Front_Patio
- Front_Steps
mqtt:
required_zones:
- Front_Patio
- Front_Steps
zones:
Front_Patio:
coordinates: 19,22,33,44,55,66,77
objects:
- person
- umbrella
filters:
person:
min_area: 5000
max_area: 100000
threshold: 0.7
Front_Steps:
coordinates: 19,22,33,44,55,66,77
objects:
- person
- umbrella
filters:
person:
min_area: 5000
max_area: 100000
threshold: 0.7
motion:
mask:
- 19,22,33,44,55,66,77
BackCam:
ffmpeg:
inputs:
# High Resolution Stream
- path: <PATHTOSTREAM>
roles:
- record
# Low Resolution Stream
- path: <PATHTOSTREAM>
roles:
- detect
- rtmp
detect:
width: 1280
height: 720
fps: 24
objects:
track:
- person
- dog
- cat
filters:
person:
threshold: 0.8
min_area: 5000
max_area: 100000
snapshots:
enabled: True
record:
enabled: True
retain:
days: 5
events:
retain:
default: 10
motion:
mask:
- 19,22,33,44,55,66,77