PTZ Camera Tracking #14538
-
Describe the problem you are havingI have 2 Dahua/EmpireTech cameras that have zoom/tracking capabilities. It's working great with people, but when cars enter our area, it doesn't seem to focus on them at all. It's recording them, but not changing the focus as the come or leave. Is there something wrong in my config or anything I can adjust to make it more sensitive to tracking? I've read and tried to follow the existing docs out there, but I'm still not having any success. I've done a recalibration as well and the camera channels are configured according to the suggestions in the documentation. In particular looking at camera Front-Right Version0.14.1-f4f3cfa Frigate config filemqtt:
enabled: false
ffmpeg:
hwaccel_args: preset-vaapi
output_args:
record: preset-record-generic-audio-aac
detectors:
# coral:
# type: edgetpu
# device: pci:0
ov:
type: openvino
device: GPU
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
path: /openvino-model/ssdlite_mobilenet_v2.xml
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
#Global Object Settings
objects:
track:
- person
- car
- dog
snapshots:
enabled: true
record:
enabled: true
retain:
days: 7
mode: all
events:
retain:
default: 30
mode: motion
birdseye:
enabled: true
mode: motion
go2rtc:
streams:
Patio_High:
- rtsp://admin:**@192.168.4.20:554/cam/realmonitor?channel=1&subtype=0
Patio_Low:
- rtsp://admin:**@192.168.4.20:554/cam/realmonitor?channel=1&subtype=2
Front_Center_High:
- rtsp://admin:**@192.168.4.25:554/cam/realmonitor?channel=1&subtype=0
Front_Center_Low:
- rtsp://admin:**@192.168.4.25:554/cam/realmonitor?channel=1&subtype=2
Front_Right_High:
- rtsp://admin:**@192.168.4.23:554/cam/realmonitor?channel=1&subtype=0
Front_Right_Low:
- rtsp://admin:**@192.168.4.23:554/cam/realmonitor?channel=1&subtype=2
Front_Left_High:
- rtsp://admin:**@192.168.4.26:554/cam/realmonitor?channel=1&subtype=0
Front_Left_Low:
- rtsp://admin:**@192.168.4.26:554/cam/realmonitor?channel=1&subtype=2
cameras:
Patio: # <--- this will be changed to your actual camera later
webui_url: https://192.168.4.20
objects:
track:
- person
- dog
- car
- deer
ffmpeg:
inputs:
## High Resolution
- path: rtsp://127.0.0.1:8554/Patio_High # subnet
roles:
- record
## Low Resolution
- path: rtsp://127.0.0.1:8554/Patio_Low # subnet
roles:
- detect
- audio
audio:
enabled: true
Front_Center: # <--- this will be changed to your actual camera later
webui_url: https://192.168.4.25
objects:
track:
- person
- dog
- car
- deer
ffmpeg:
inputs:
## High Resolution
- path: rtsp://127.0.0.1:8554/Front_Center_High # subnet
roles:
- record
## Low Resolution
- path: rtsp://127.0.0.1:8554/Front_Center_Low # subnet
roles:
- detect
- audio
audio:
enabled: true
Front_Right: # <--- this will be changed to your actual camera later
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Front_Right_High # subnet
roles:
- record
- path: rtsp://127.0.0.1:8554/Front_Right_Low # subnet
roles:
- detect
onvif:
host: 192.168.4.23
port: 80
user: admin
password: **
autotracking:
enabled: true
calibrate_on_startup: false
# disabled - don't zoom in/out on autotracked objects, use pan/tilt only
# absolute - use absolute zooming (supported by most PTZ capable cameras)
# relative - use relative zooming (not supported on all PTZs, but makes concurrent pan/tilt/zoom movements)
zooming: relative
# Optional: A value to change the behavior of zooming on autotracked objects. (default: shown below)
# A lower value will keep more of the scene in view around a tracked object.
# A higher value will zoom in more on a tracked object, but Frigate may lose tracking more quickly.
# The value should be between 0.1 and 0.75
zoom_factor: 0.40
# Required: Begin automatically tracking an object when it enters any of the listed zones.
required_zones:
- Front_Right_Zone
# Required: Name of ONVIF preset in camera's firmware to return to when tracking is over. (default: shown below)
return_preset: Preset1
# Optional: Seconds to delay before returning to preset. (default: shown below)
timeout: 15
# Optional: Values generated automatically by a camera calibration. Do not modify these manually. (default: shown below)
movement_weights: 0.04, 1.0, 1.0356781482696533, 1.206569308619346, 0.45487101616398007
zones:
Front_Right_Zone:
coordinates:
1,0.467,1,1,0,1,0,0.405,0.477,0.392,0.508,0.341,0.611,0.346,0.667,0.38,0.725,0.373,0.79,0.368,0.802,0.416
loitering_time: 0
inertia: 1
filters:
person:
threshold: .7
review:
alerts:
required_zones: Front_Right_Zone
detections:
required_zones: Front_Right_Zone
motion:
threshold: 25
contour_area: 10
improve_contrast: 'true'
Front_Left: # <--- this will be changed to your actual camera later
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Front_Left_High # subnet
roles:
- record
- path: rtsp://127.0.0.1:8554/Front_Left_Low # subnet
roles:
- detect
onvif:
host: 192.168.4.26
port: 80
user: admin
password: **
autotracking:
# Optional: enable/disable object autotracking. (default: shown below)
enabled: true
# Optional: calibrate the camera on startup (default: shown below)
# A calibration will move the PTZ in increments and measure the time it takes to move.
# The results are used to help estimate the position of tracked objects after a camera move.
# Frigate will update your config file automatically after a calibration with
# a "movement_weights" entry for the camera. You should then set calibrate_on_startup to False.
calibrate_on_startup: false
# Optional: the mode to use for zooming in/out on objects during autotracking. (default: shown below)
# Available options are: disabled, absolute, and relative
# disabled - don't zoom in/out on autotracked objects, use pan/tilt only
# absolute - use absolute zooming (supported by most PTZ capable cameras)
# relative - use relative zooming (not supported on all PTZs, but makes concurrent pan/tilt/zoom movements)
zooming: relative
# Optional: A value to change the behavior of zooming on autotracked objects. (default: shown below)
# A lower value will keep more of the scene in view around a tracked object.
# A higher value will zoom in more on a tracked object, but Frigate may lose tracking more quickly.
# The value should be between 0.1 and 0.75
zoom_factor: 0.50
# Required: Begin automatically tracking an object when it enters any of the listed zones.
required_zones:
- Front_Left_Zone
# Required: Name of ONVIF preset in camera's firmware to return to when tracking is over. (default: shown below)
return_preset: Preset1
# Optional: Seconds to delay before returning to preset. (default: shown below)
timeout: 15
# Optional: modify these manually. (default: shown below)
movement_weights: 0.04, 1.0, 0.819617509841919, 1.3141255768396525, -0.03828837794642279
zones:
Front_Left_Zone:
coordinates: 1,0.985,1,0.679,1,0.682,0.74,0.662,0,0.699,0,1
loitering_time: 0
inertia: 1
review:
alerts:
required_zones: Front_Left_Zone
detections:
required_zones: Front_Left_Zone
version: 0.14
camera_groups:
BirdsEye:
order: 1
icon: LuBird
cameras: birdseye Relevant Frigate log outputN/A Relevant go2rtc log outputN/A Frigate statsN/A Operating systemUNRAID Install methodDocker Compose docker-compose file or Docker CLI commandN/A Object DetectorOpenVino Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
What do you mean by "not changing the focus as they come and leave"? |
Beta Was this translation helpful? Give feedback.
Check out the docs. By default, autotracking will only operate on
person
objects. You need to specifycar
in the list of objects to track, eg: