-
Having some trouble detecting people. New camera on the drive. covers porch & the drive so it should capture people leaving the house or the postman walking down the drive towards camera and putting post through the door... Camera is question in the last camera in the config the 'HOUSE_FRONT_2' It's got 2x zones to stop notifications of the car being on the drive. Instead it detects if a car is leaving or entering the drive. Any pointers in how to best set up people detection? Do I need to move the camera? It doesn't detect some people but it's very inconsistent. This is a new camera so trying to pinpoint if its a camera issue or my config needs tweaking. # Configuration File
# Used https://docs.frigate.video/configuration/#vscode-configuration-schema
mqtt:
enabled: true
host: 192.168.22.2
port: 1883
# Optional: topic prefix (default: shown below)
# WARNING: must be unique if you are running multiple instances
topic_prefix: frigate
# Optional: client id (default: shown below)
# WARNING: must be unique if you are running multiple instances
client_id: frigate
# Optional: user
user:
# Optional: password
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
# eg. password: '{FRIGATE_MQTT_PASSWORD}'
password:
# Optional: interval in seconds for publishing stats (default: shown below)
stats_interval: 60
# Optional: Restream configuration
# Uses https://github.com/AlexxIT/go2rtc (v1.2.0)
go2rtc:
streams:
barn HQ:
- rtsp://MPG7QbYQ:ICRGvtBU2xo3DxMy@192.168.22.202:554/live/ch0
#barn SQ:
# - rtsp:https://MPG7QbYQ:[email protected]:554/live/ch1
bird HQ:
- rtsp://pSrUq7TZ:4ua2cFC2dq2UNEXx@192.168.22.201:554/live/ch0
#bird SQ:
# - rtsp:https://pSrUq7TZ:[email protected]:554/live/ch1
house_front HQ:
- rtsp://EWLHSHKY:XGEJzBByF2IE3c@192.168.44.5:554/live/ch0
house_front_2 HQ:
- rtsp://admin:annke2023@192.168.44.6:554/H265/ch1/main/av_stream
#house_front SQ:
# - rtsp:https://EWLHSHKY:[email protected]:554/live/ch1
#wyze:
#- rtsp:https://admin:[email protected]:8554/live/ch0
# Optional: ffmpeg configuration
# More information about presets at https://docs.frigate.video/configuration/ffmpeg_presets
ffmpeg:
# Optional: global ffmpeg args (default: shown below)
global_args: -hide_banner -loglevel warning -threads 16
# Optional: global hwaccel args (default: shown below)
# NOTE: See hardware acceleration docs for your specific device
hwaccel_args: preset-vaapi
# Optional: global input args (default: shown below)
input_args: preset-rtsp-generic-audio-aac
# Optional: global output args
output_args:
# Optional: output args for detect streams (default: shown below)
detect: -threads 16 -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
record: preset-record-generic-audio-aac
# Optional: output args for rtmp streams (default: shown below)
rtmp: preset-rtmp-generic
detectors:
coral:
type: edgetpu
device: usb
# Optional: Detect configuration
# NOTE: Can be overridden at the camera level
detect:
# Optional: width of the frame for the input with the detect role (default: shown below)
#width: 1280
# Optional: height of the frame for the input with the detect role (default: shown below)
#height: 720
# Optional: desired fps for your camera for the input with the detect role (default: shown below)
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
#fps: 5
# Optional: enables detection for the camera (default: True)
enabled: true
# Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared: 75
# Optional: Configuration for stationary object tracking
stationary:
# Optional: Frequency for confirming stationary objects (default: shown below)
# When set to 0, object detection will not confirm stationary objects until movement is detected.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
interval: 10
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 10
# Optional: Motion configuration
# NOTE: Can be overridden at the camera level
motion:
# Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
# Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
# The value should be between 1 and 255.
threshold: 20
# Optional: Minimum size in pixels in the resized motion image that counts as motion (default: 30)
# Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
# make motion detection more sensitive to smaller moving objects.
# As a rule of thumb:
# - 15 - high sensitivity
# - 30 - medium sensitivity
# - 50 - low sensitivity
contour_area: 20
# Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)
# Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
# Too low and a fast moving person wont be detected as motion.
delta_alpha: 0.3
# Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
# Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
# Low values will cause things like moving shadows to be detected as motion for longer.
# https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
frame_alpha: 0.3
# Optional: Height of the resized motion frame (default: 50)
# This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense
# of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion.
frame_height: 50
# Optional: improve contrast (default: shown below)
# Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive
# for daytime.
improve_contrast: true
cameras:
barn: # 1 - BARN - cam name - Brand: Wansview - Quality:1080p
snapshots:
enabled: true
bounding_box: true
quality: 99
#
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
hwaccel_args: preset-vaapi
inputs:
- path: rtsp://MPG7QbYQ:ICRGvtBU2xo3DxMy@192.168.22.202:554/live/ch1 # SD Link
input_args: preset-rtsp-generic
roles:
- detect
- path: rtsp://192.168.22.2:8554/barn%20HQ?mp4 # HD Link
input_args: preset-rtsp-restream
roles:
- record
detect:
width: 768
height: 432
fps: 5
stationary:
interval: 0
threshold: 70
motion:
mask:
- 768,0,768,24,524,24,524,0
objects:
track:
- person
- cat
- suitcase
filters:
#
person:
min_area: 2000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
#
cat:
min_area: 2000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
record:
enabled: true
retain:
days: 7
mode: motion
events:
pre_capture: 5
post_capture: 5
retain:
default: 28
mode: active_objects
house_front: # no3 - HOUSE_FRONT - Cam name - Brand: Wansview - Quality:1080p
snapshots:
enabled: true
bounding_box: true
quality: 99
#
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
hwaccel_args: preset-vaapi
inputs:
- path: rtsp://EWLHSHKY:XGEJzBByF2IE3c@192.168.44.5:554/live/ch1 # SD Link
input_args: preset-rtsp-generic
roles:
- detect
- path: rtsp://192.168.22.2:8554/house_front%20HQ?mp4 # HD Link
input_args: preset-rtsp-restream
roles:
- record
detect:
width: 768
height: 432
fps: 7
stationary:
interval: 0
threshold: 70
motion:
mask:
- 768,450,768,325,724,317,653,288,614,294,606,260,596,224,518,205,414,233,371,299,332,407,444,450
- 496,0,768,0,768,159,657,126,567,100,504,125,434,129,386,142,332,98,175,85,0,83,0,0,335,0
- 0,215,0,296,69,305,127,265,141,225,110,167,64,136
objects:
track:
- person
- car
- dog
- cat
- bicycle
- motorcycle
filters:
#
car:
min_area: 2000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
#
person:
min_area: 2000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
#
dog:
min_area: 1000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
#
cat:
min_area: 1000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
#
bicycle:
min_area: 2000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
#
motorcycle:
min_area: 2000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
record:
enabled: true
retain:
days: 7
mode: motion
events:
pre_capture: 5
post_capture: 5
objects:
- person
- car
- dog
- cat
- bicycle
- motorcycle
retain:
default: 28
mode: active_objects
house_front_2: # no4 - HOUSE_FRONT_2 - Cam name - Brand: Annke - Quality:3k
snapshots:
enabled: true
bounding_box: true
quality: 99
#
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
hwaccel_args: preset-vaapi
inputs:
- path: rtsp://admin:annke2023@192.168.44.6:554/Streaming/Channels/102 # SQ Link
input_args: preset-rtsp-generic
roles:
- detect
- path: rtsp://192.168.22.2:8554/house_front_2%20HQ?mp4 # HQ Link
input_args: preset-rtsp-restream
roles:
- record
detect:
width: 640
height: 480
fps: 7
stationary:
interval: 0
threshold: 70
motion:
mask:
- 189,0,189,23,0,23,0,0,0,0,0,0
- 640,480,640,221,608,173,503,169,408,386,378,480
- 334,106,505,111,527,0,330,0
zones:
zone_0:
coordinates: 329,62,329,179,515,189,514,210,410,480,0,480,0,31
objects:
- person
- cat
- dog
zone_1:
coordinates: 325,176,578,183,584,0,323,0
objects:
- car
- person
- cat
- dog
objects:
track:
- person
- car
- dog
- cat
filters:
#
car:
mask:
- 331,329,538,311,532,194,328,183
min_area: 2000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
#
person:
min_area: 2000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.4
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.6
#
dog:
min_area: 1000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
#
cat:
min_area: 1000
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
record:
enabled: true
retain:
days: 7
mode: motion
events:
pre_capture: 7
post_capture: 7
objects:
- person
- car
- dog
- cat
retain:
default: 28
mode: active_objects
# Optional: Telemetry configuration
telemetry:
# Optional: Enable the latest version outbound check (default: shown below)
# NOTE: If you use the HomeAssistant integration, disabling this will prevent it from reporting new versions
version_check: True |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
if you are having trouble detecting people, I would definitely suggest removing your filters |
Beta Was this translation helpful? Give feedback.
-
Same filters are working on the other cameras fine. Will redo the zone0 to include the full frame as I think it might be cutting people off as when they get close to the camera they will be much bigger in the frame. |
Beta Was this translation helpful? Give feedback.
-
Thanks have removed the person filters. Have another question about different camera covering house facing a road.. what's the best way to avoid hour long recordings of parked cars outside the house... I thought about changing it to only track people. As a possible solution. To track people, cats & dogs should then catch any cars as a by product of the recording itself? |
Beta Was this translation helpful? Give feedback.
-
Lovely stuff its captured the amazon delivery nicely so thanks for the help. Can I get some help with my record settings? record:
enabled: true
retain:
days: 7
mode: active_objects
events:
pre_capture: 5
post_capture: 3
objects:
- person
- car
- dog
- cat
retain:
default: 28
mode: active_objects |
Beta Was this translation helpful? Give feedback.
if you are having trouble detecting people, I would definitely suggest removing your filters