frigate
frigate copied to clipboard
[Config Support]: v13 and stationary objects
Describe the problem you are having
Running Frigate on Truenas Scale. I upgraded to v13.1 and noticed the processor utilization had immediately gone way up (previously 3-5%, now 20+%). Digging into it, I noticed that Frigate is now constantly detecting the car parked in my driveway and recording it as an event (the car is not moving). The same car was parked in the same place before I did the upgrade and Frigate didn't do this - Frigate has worked perfectly with detecting motion (cars and people) on the camera in question up until the upgrade.
Looking at the debug screen, it seems like every time a car drives by in the street (creating motion in the frame) Frigate re-detects the car in the driveway and records a new event. This can be every few minutes (every time a car passes) and creates so many events that anything that would be of actual interest is buried in hundreds of these false positives. I have a motion filter screening the street area, but motion there still causes the car in the driveway to be 'rediscovered' and Frigate doesn't seem to remember that it's there.
I'm assuming it's a configuration issue of some sort with the changes made to v13.1, so I'm hoping for some guidance on how to improve the recognition/retention of stationary objects.
Thanks in advance, and thanks for a great piece of software!
Version
13
Frigate config file
mqtt:
enabled: true
host: 192.168.1.xx
user: xxxxx
password: xxxxx
birdseye:
enabled: true
mode: continuous
objects:
track:
- person
- car
go2rtc:
streams:
Driveway:
- "ffmpeg:http://192.168.1.94/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=xxxxx"
DrivewaySub:
- "ffmpeg:http://192.168.1.94/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=xxxxx"
Porch:
- "ffmpeg:http://192.168.1.92/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=xxxxx"
PorchSub:
- "ffmpeg:http://192.168.1.92/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=xxxxx"
EastYard:
- "ffmpeg:http://192.168.1.93/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=xxxxx"
EastYardSub:
- "ffmpeg:http://192.168.1.93/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=xxxxx"
MainDeck:
- rtsp://admin:m@[email protected]/cam/realmonitor?channel=1&subtype=00&authbasic=YWRtaW46YWRtaW4=
MainDeckSub:
- rtsp://admin:m@[email protected]/cam/realmonitor?channel=1&subtype=01&authbasic=YWRtaW46YWRtaW4=
LivingRoom:
- rtsp://admin:[email protected]:554/h264Preview_01_main
LivingRoomSub:
- rtsp://admin:[email protected]:554/h264Preview_01_sub
cameras:
Porch:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Porch
input_args: preset-rtsp-restream
hwaccel_args: preset-vaapi
roles:
- record
- path: rtsp://127.0.0.1:8554/PorchSub
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: True
width: 640
height: 360
fps: 5
record:
enabled: True
retain:
days: 5
mode: motion
events:
retain:
mode: active_objects
default: 10
birdseye:
enabled: True
mode: objects
live:
stream_name: Porch
Driveway:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Driveway?video=copy
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/DrivewaySub?video=copy
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: True
width: 640
height: 360
fps: 5
objects:
track:
- person
- car
motion:
mask:
- 0,0,640,0,640,140,0,171
record:
enabled: True
retain:
days: 5
mode: motion
events:
retain:
mode: active_objects
default: 10
live:
stream_name: Driveway
birdseye:
enabled: True
mode: objects
EastYard:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/EastYard?video=copy&audio=aac
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/EastYardSub?video=copy
input_args: preset-rtsp-restream
roles:
- detect
objects:
track:
- person
live:
stream_name: EastYard
detect:
enabled: True
width: 640
height: 360
fps: 5
record:
enabled: True
retain:
days: 5
mode: motion
events:
retain:
mode: active_objects
default: 10
birdseye:
enabled: True
mode: objects
LivingRoom:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/LivingRoom?video=copy&audio=aac
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/LivingRoomSub?video=copy
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: True
width: 640
height: 480
fps: 5
objects:
track:
- person
record:
enabled: true
retain:
days: 5
mode: motion
events:
retain:
mode: active_objects
default: 10
birdseye:
enabled: True
mode: objects
live:
stream_name: LivingRoom
MainDeck:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/MainDeck
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/MainDeckSub
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: True
width: 640
height: 480
fps: 5
objects:
track:
- person
record:
enabled: True
retain:
days: 5
mode: motion
events:
retain:
mode: active_objects
default: 10
birdseye:
enabled: True
mode: objects
live:
stream_name: MainDeck
detectors:
ov:
type: openvino
device: AUTO
model:
path: /openvino-model/ssdlite_mobilenet_v2.xml
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
ui:
timezone: America/New_York
Relevant log output
n/a
Frigate stats
No response
Operating system
Other
Install method
Docker CLI
Coral version
CPU (no coral)
Any other information that may be helpful
Truenas Scale, AMD Ryzen 5 1600, 48 GB RAM. No GPU or coral.
There are some inefficiencies in your config:
- you are using the reolink ext stream. This actually has a resolution of 896x672 or similar, so if you changed your detect width/height (or removed them) then that would actually improve the resolution used for detection. Keep in mind that zones and masks need to be remade if this is done.
- I'd also suggest using the debug live view to see what is detected as motion, it is possible that the current motion detection is a bit too sensitive
oh and also using motion masks to block out the street is not how motion masks should be used. You should be using required zones for that.
Thanks @NickM-27 ...I didn't know the ext stream was different from the sub stream...I will change that. I have looked in the debug view, and I have tuned the motion down a bit - it seems like the cars passing in the street (which is motion-masked) were reflecting in the back window of the car parked in the driveway and that was registering as motion, which triggered re-detection of the car parked in the driveway and created an event (based on the parked car). My question is, was the re-detection of the car caused because the reflection (and therefore motion) was within the bounding box of the car? Or, would any motion, anywhere in the frame, cause redection of the car - in other words does frigate remember the car but detect it as moving, or is it forgetting the car each time?
I will look into zones - thanks for the tip on that. Is it possible to define a zone where nothing is allowed to be detected?
Thanks again for the help, and sorry to ask so many questions.
if there are separate car events then that means the car was lost (not detected over many frames) and then motion that was detected caused frigate to look for objects and the car was seen again. The improved resolution may help with this.
Is it possible to define a zone where nothing is allowed to be detected?
you are thinking about it the wrong way. You create zones where you want things to have events created
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.