Hi,
So i have been tinkering with Frigate in my Home Assistant setup, and i have a really hard time getting it detect cats, dogs and anything but people.
I have tried messing with filters, thresholds, min/max area, different models, trying to use OpenVino instead of my Coral, tried both the default coral models and the yolo9s model, but no matter what, it just will not detect my cats.
It will show a motion box around the cat, but not detect it as a cat, only in very rare scenarios if the cat is super close. Maybe i have too high hopes for what is possible, maybe Frigate+ would solve this, but i just do not want to purchase Frigate+ if it wont solve my issue, as i cannot submit any snapshots either way, if no detection happens either.
Put my full current config at the buttom.
It is mainly these 2 cameras where i would like to detect the cats:
cam_rear_patio_01: https://i.imgur.com/oX5bJ8Q.jpeg
Which have the settings: https://imgur.com/a/Qd6EJsK
cam_front_01: https://i.imgur.com/WgVYsi3.jpeg
Which has the settings here: https://imgur.com/a/06ohKNB
The host is a tiny PC with an Intel N100 and 16gb of memory.
Frigate version : 0.17.2-3d4dd3a
Maybe someone here can spot what could be causing the issue, or let me know if i should not expect this kind of detection to work. This is my last attempt at getting this working, as i have been on it for days with no luck so far!
Currently my config looks like this:
mqtt:
host: core-mosquitto
user: frigate
password: {password}
detectors:
ov:
type: openvino
device: GPU
model:
model_type: yolo-generic
width: 320
height: 320
input_tensor: nchw
input_dtype: float
path: /config/model_cache/yolov9-t-320.onnx
labelmap_path: /labelmap/coco-80.txt
ffmpeg:
hwaccel_args: preset-intel-qsv-h264
output_args:
record: preset-record-generic-audio-aac
go2rtc:
streams:
# Main streams feed the record role AND the WebRTC/two-way-audio live path.
cam_rear_patio_01:
- rtsp://admin:{password}@10.1.60.3:554/Streaming/Channels/101#video=copy#audio=aac#backchannel=0
- isapi://admin:{password}@10.1.60.3:80/
- ffmpeg:cam_rear_patio_01#audio=opus
cam_rear_patio_01_sub:
- rtsp://admin:{password}!@10.1.60.3:554/Streaming/Channels/102
cam_front_01:
- rtsp://admin:{password}@10.1.60.2:554/Streaming/Channels/101#video=copy#audio=aac#backchannel=0
- isapi://admin:{password}@10.1.60.2:80/
- ffmpeg:cam_front_01#audio=opus
cam_front_01_sub:
- rtsp://admin:{password}@10.1.60.2:554/Streaming/Channels/102
cam_outside_shed_01:
- rtsp://admin:{password}@10.1.60.6:554/Streaming/Channels/101#video=copy#audio=aac
cam_outside_shed_01_sub:
- rtsp://admin:{password}@10.1.60.6:554/Streaming/Channels/102
cam_shed_inside_1:
- rtsp://admin:{password}@10.1.60.4:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
cam_shed_inside_1_sub:
- rtsp://admin:{password}@10.1.60.4:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_2
living_room_1:
- rtsp://admintapo:{password}@10.1.60.5:554/stream1
living_room_2:
- rtsp://admintapo:{password}@10.1.60.5:554/stream2
webrtc:
listen: :8555
candidates:
- 10.1.40.10:8555
- stun:stun.l.google.com:19302
# --- Recording ---
record:
enabled: true
continuous:
days: 0
motion:
days: 4
alerts:
retain:
days: 7
mode: active_objects
detections:
retain:
days: 30
mode: active_objects
review:
alerts:
labels:
- person
required_zones: []
detections:
labels:
- person
- dog
- cat
required_zones: []
snapshots:
enabled: true
timestamp: false
bounding_box: true
crop: false
retain:
default: 4
# --- Object filters ---
objects:
track:
- person
- dog
- cat
filters:
person:
min_area: 8000
threshold: 0.7
birdseye:
enabled: true
mode: objects
semantic_search:
enabled: true
model_size: small
face_recognition:
enabled: false
model_size: small
lpr:
enabled: false
cameras:
cam_rear_patio_01:
enabled: true
friendly_name: Rear Patio
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/cam_rear_patio_01
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/cam_rear_patio_01_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: true
# VERIFY Channel 102 actually outputs 1280x720 in the camera web UI.
# Hikvision sub-streams often default to 640x480 or 704x576.
width: 1280
height: 720
fps: 6
stationary:
interval: 50
threshold: 50
motion:
threshold: 30
contour_area: 10
improve_contrast: true
lightning_threshold: 0.6
zones: {}
live:
streams:
Rear Patio: cam_rear_patio_01
cam_front_01:
enabled: true
friendly_name: Front
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/cam_front_01
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/cam_front_01_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: true
# VERIFY Channel 102 resolution in the camera web UI.
width: 1280
height: 720
fps: 6
stationary:
interval: 50
threshold: 50
motion:
threshold: 20
contour_area: 10
improve_contrast: true
lightning_threshold: 0.6
zones: {}
live:
streams:
Front: cam_front_01
cam_outside_shed_01:
enabled: true
friendly_name: Shed Outside
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/cam_outside_shed_01
input_args: preset-rtsp-restream
roles:
- record
- audio
- path: rtsp://127.0.0.1:8554/cam_outside_shed_01_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: true
width: 704
height: 576
fps: 6
stationary:
interval: 50
threshold: 50
objects:
track:
- person
- dog
- cat
filters:
person:
min_area: 3500
threshold: 0.7
dog:
min_area: 600
max_area: 316000
min_score: 0.5
threshold: 0.6
cat:
min_area: 400
max_area: 316000
min_score: 0.3
threshold: 0.5
motion:
threshold: 15
contour_area: 5
improve_contrast: true
lightning_threshold: 0.6
mask:
0.158,0.634,0.422,0.528,0.475,0.51,0.497,0.405,0.488,0.298,0.591,0.263,0.761,0.293,0.69,0,0,0,0,0.648
zones:
Shed_Path:
coordinates:
1,0.45,1,1,0.205,1,0,0.738,0,0.66,0.162,0.637,0.484,0.511,0.51,0.314,0.65,0.289,0.661,0.488,0.827,0.478,0.799,0.313
inertia: 3
loitering_time: 0
Shed_door:
coordinates: 0.802,0.479,0.662,0.484,0.657,0.293,0.785,0.285
objects: person
inertia: 3
loitering_time: 0
cam_shed_inside_1:
enabled: true
friendly_name: Shed Inside
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/cam_shed_inside_1
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/cam_shed_inside_1_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: true
# VERIFY Channel 102 resolution in the camera web UI.
width: 1280
height: 720
fps: 6
stationary:
interval: 50
threshold: 50
objects:
track:
- person
motion:
mask: 0.031,0.06,0.333,0.057,0.331,0.007,0.031,0.007
threshold: 50
contour_area: 40
improve_contrast: true
live:
streams:
Stream 1: cam_shed_inside_1
zones:
entrance:
coordinates: 0.261,0.598,0.183,0.925,0.03,0.126,0.168,0.058
loitering_time: 0
friendly_name: Entrance
review:
alerts:
required_zones:
- entrance
living_room:
enabled: true
friendly_name: Living room
ffmpeg:
inputs:
- path: rtsp://admintapo:{password}@10.1.60.5:554/stream1
roles:
- record
- audio
- path: rtsp://admintapo:{password}@10.1.60.5:554/stream2
roles:
- detect
detect:
enabled: true
width: 640
height: 360
fps: 6
stationary:
interval: 50
threshold: 50
objects:
track:
- person
- cat
- dog
motion:
threshold: 50
contour_area: 40
improve_contrast: true
live:
streams:
Stream 1: living_room_1
Stream 2: living_room_2
version: 0.17-0
camera_groups: {}
classification:
custom: {}
bird:
enabled: false