Speed zone measurements fixed in meter. #20085
Answered
by
hawkeye217
deweycash
asked this question in
General Support
Checklist
Describe the problem you are havingI configured the UI setting for imperial and then tried to set up a speed zone. The speeds were way off until I entered metric measurements even thought the UI is configured for imperial. Steps to reproduce
Version0.16.1-e664cb2 In which browser(s) are you experiencing the issue with?No response Frigate config filemqtt:
enabled: true
user: '{FRIGATE_MQTT_USER}'
password: '{FRIGATE_MQTT_PASSWORD}'
host: 192.168.1.120
port: 1883
detectors:
ov_detector:
type: openvino
device: GPU
# coral:
# type: edgetpu
# device: usb
# detect:
# enabled: true # <---- disable detection until you have a working camera feed
# width: 1280
# height: 720
# fps: 24
ui:
# can be "metric" or "imperial", default is metric
unit_system: imperial
model:
width: 720
height: 480
path: plus://ba01e988083d8a3359f77f085cc0c218
attributes_map:
person:
- amazon
- face
genai:
enabled: true
provider: ollama
base_url: XXXXXXXXXXXXXXXXXXXXXXXXX
model: llava:7b
prompt: Analyze the {label} in these images from the {camera} security camera.
Focus on the actions, and behavior rather than just describing its
appearance.
object_prompts:
person: Examine the main person in these images. What are they doing and
what might their actions suggest about their intent (e.g., approaching a
door, leaving an area, standing still, delivery company)? Provide a
summary of the images without describing each one. Do not describe the
surroundings or static details.
car: Observe the primary vehicle in these images. Focus on its movement,
direction, or purpose (e.g., parking, approaching, circling). If it's a
delivery vehicle, mention the company.
# provider: gemini
# api_key: XXXXXXXXXXXXXXXXXXXXXXXXXX
# model: gemini-2.5-flash
ffmpeg:
# hwaccel_args: preset-vaapi
hwaccel_args: preset-intel-qsv-h264
birdseye:
enabled: true
mode: motion
restream: true
go2rtc:
streams:
Living-Room:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.212:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
- ffmpeg:back#video=h264#audio=aac
driveway:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.213:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
- ffmpeg:back#video=h264#audio=aac
garage:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.214:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
- ffmpeg:back#video=h264#audio=aac
frontdoor:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.211:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
- ffmpeg:back#video=h264#audio=aac#backchannel=0
Shop-Inside:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.215:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
- ffmpeg:back#video=h264#audio=aac
backyard:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.216:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
- ffmpeg:back#video=h264#audio=aac
frontyard:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.217:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
- ffmpeg:back#video=h264#audio=aac
Shop_Outside_LQ:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.218:554/1
- ffmpeg:back#video=h264#audio=aac
Shop_Outside_HQ:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.218:554/0
- ffmpeg:back#video=h264#audio=aac
Backyard_Shop_LQ:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.219:554/1
- ffmpeg:back#video=h264#audio=aac
Backyard_Shop_HQ:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.219:554/0
- ffmpeg:back#video=h264#audio=aac
webrtc:
candidates:
- listen: :8555
- 192.168.1.200:8555
cameras:
backyard: # <------ Name the camera
genai:
enabled: true # <- enable GenAI for your front camera
use_snapshot: true
enabled: true
webui_url: http://192.168.1.216
ffmpeg:
inputs:
#High Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.216:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- record
#Low Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.216:554/cam/realmonitor?channel=1&subtype=1&authbasic=64
roles:
- detect
frontdoor: # <------ Name the camera
genai:
enabled: true # <- enable GenAI for your front camera
use_snapshot: true
enabled: true
ffmpeg:
inputs:
#High Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.211:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- record
#Low Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.211:554/cam/realmonitor?channel=1&subtype=1&authbasic=64
roles:
- detect
Living-Room: # <------ Name the camera
genai:
enabled: true # <- enable GenAI for your front camera
use_snapshot: true
enabled: true
webui_url: http://192.168.1.212
ffmpeg:
inputs:
#High Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.212:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- record
#Low Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.212:554/cam/realmonitor?channel=1&subtype=1&authbasic=64
roles:
- detect
zones:
zone_0:
coordinates: 1280,0,0,0,0,720,1280,720
onvif:
host: 192.168.1.212
port: 80
user: '{FRIGATE_RTSP_USER}'
password: '{FRIGATE_RTSP_PASSWORD}'
autotracking:
enabled: true
calibrate_on_startup: false
zooming: disabled
track:
- person
- dog
#Required: Begin automatically tracking an object when it enters any of the listed zones.
required_zones:
- zone_0
#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: 10
movement_weights: 0.0, 1.0, 0.17342472076416016, 0.4009148141389252,
0.35347215129483145, 0
Shop-Inside: # <------ Name the camera
genai:
enabled: true # <- enable GenAI for your front camera
use_snapshot: true
enabled: true
webui_url: http://192.168.1.215
ffmpeg:
inputs:
#High Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.215:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- record
#Low Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.215:554/cam/realmonitor?channel=1&subtype=1&authbasic=64
roles:
- detect
zones:
zone_0:
coordinates: 0,720,1280,720,1280,0,0,0
onvif:
host: 192.168.1.215
port: 80
user: '{FRIGATE_RTSP_USER}'
password: '{FRIGATE_RTSP_PASSWORD}'
driveway: # <------ Name the camera
genai:
enabled: true # <- enable GenAI for your front camera
use_snapshot: true
enabled: true
webui_url: http://192.168.1.213
ffmpeg:
inputs:
#High Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.213:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- record
#Low Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.213:554/cam/realmonitor?channel=1&subtype=1&authbasic=64
roles:
- detect
motion: {}
zones:
Waste_Bin:
coordinates: 0.133,0.115,0.313,0.101,0.337,0.375,0.145,0.399
loitering_time: 2
objects: waste_bin
inertia: 3
Driveway:
coordinates:
0.753,1,0.766,0.968,0.762,1,0.799,1,0.843,1,0.877,1,0.988,0.735,0.988,0.494,0.637,0.182,0,0.335,0,1,0.123,1
inertia: 3
loitering_time: 0
Speed:
coordinates: 0.185,0.268,0.606,0.17,0.511,0.103,0.172,0.181
loitering_time: 0
speed_threshold: 10
distances: 9.7,5.4,9.7,5.4
objects: car
inertia: 3
objects:
track:
- car
- person
- dog
- waste_bin
- deer
filters:
car:
mask:
0.398,0.105,0.596,0.09,0.86,0.141,0.994,0.205,0.988,0,0.385,0.003
person:
mask: 0.002,0.309,0.606,0.166,0.941,0.204,0.999,0.259,0.995,0,0,0
waste_bin:
mask: 0.44,0.052,0.47,0.205,0.989,0.218,0.948,0.016
review:
alerts:
required_zones:
- Waste_Bin
- Driveway
detections:
required_zones: Driveway
garage: # <------ Name the camera
genai:
enabled: true # <- enable GenAI for your front camera
use_snapshot: true
enabled: true
webui_url: http://192.168.1.214
ffmpeg:
inputs:
#High Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.214:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- record
#Low Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.214:554/cam/realmonitor?channel=1&subtype=1&authbasic=64
roles:
- detect
objects:
track:
- person
- car
frontyard: # <------ Name the camera
genai:
enabled: true # <- enable GenAI for your front camera
use_snapshot: true
enabled: true
webui_url: http://192.168.1.217
ffmpeg:
inputs:
#High Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.217:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
roles:
- record
#Low Resolution Stream
- path:
rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.217:554/cam/realmonitor?channel=1&subtype=1&authbasic=64
roles:
- detect
objects:
track:
- person
- dog
- deer
- amazon
Shop_Outside: # <------ Name the camera
genai:
enabled: true # <- enable GenAI for your front camera
use_snapshot: true
enabled: true
ffmpeg:
inputs:
#High Resolution Stream
- path: rtsp://127.0.0.1:8554/Shop_Outside_HQ
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Shop_Outside_LQ
input_args: preset-rtsp-restream
roles:
- detect
live:
streams:
Shop_Outside_HQ: Shop_Outside_HQ
onvif:
host: 192.168.1.218
port: 80
user: '{FRIGATE_RTSP_USER}'
password: '{FRIGATE_RTSP_PASSWORD}'
autotracking:
enabled: false
calibrate_on_startup: true
zooming: disabled
track:
- person
- dog
- car
#Required: Begin automatically tracking an object when it enters any of the listed zones.
required_zones:
- zone_0
#Required: Name of ONVIF preset in camera's firmware to return to when tracking is over. (default: shown below)
return_preset: Preset01
#Optional: Seconds to delay before returning to preset. (default: shown below)
timeout: 10
zones:
zone_0:
coordinates: 0.002,0.002,0.994,0,0.998,0.999,0.002,0.998
loitering_time: 0
Backyard_Shop: # <------ Name the camera
genai:
enabled: true # <- enable GenAI for your front camera
use_snapshot: true
enabled: true
ffmpeg:
inputs:
#High Resolution Stream
- path: rtsp://127.0.0.1:8554/Backyard_Shop_HQ
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Backyard_Shop_LQ
input_args: preset-rtsp-restream
roles:
- detect
live:
streams:
Shop_Outside_HQ: Backyard_Shop_HQ
onvif:
host: 192.168.1.219
port: 80
user: '{FRIGATE_RTSP_USER}'
password: '{FRIGATE_RTSP_PASSWORD}'
motion:
threshold: 25
contour_area: 100
#Global Object Settings
objects:
track:
- person
- dog
- deer
- amazon
filters:
person:
min_area: 5000
max_area: 100000
dog:
min_area: 5000
max_area: 100000
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
enabled: true
# Optional: save a clean PNG copy of the snapshot image (default: shown below)
clean_copy: true
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: true
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: true
# Optional: crop the snapshot (default: shown below)
crop: false
# Optional: height to resize the snapshot to (default: original size)
height: 720
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
record:
enabled: true
retain:
# Optional: Number of days to retain recordings regardless of events (default: shown below)
# NOTE: This should be set to 0 and retention should be defined in events section below
# if you only want to retain recordings of events.
days: 10
# Optional: Mode for retention. Available options are: all, motion, and active_objects
# all - save all recording segments regardless of activity
# motion - save all recordings segments with any detected motion
# active_objects - save all recording segments with active/moving objects
# NOTE: this mode only applies when the days setting above is greater than 0
mode: motion
# Optional: Event recording settings
alerts:
retain:
days: 10
pre_capture: 5
post_capture: 5
detections:
retain:
days: 10
pre_capture: 5
post_capture: 5
version: 0.16-0
camera_groups:
Birdseye:
order: 1
icon: LuBird
cameras: birdseye
semantic_search:
enabled: true
reindex: false
model_size: large
detect:
# Optional: enables detection for the camera (default: shown below)
enabled: true
# Optional: width of the frame for the input with the detect role (default: use native stream resolution)
width: 1280
# Optional: height of the frame for the input with the detect role (default: use native stream resolution)
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: Number of consecutive detection hits required for an object to be initialized in the tracker. (default: 1/2 the frame rate)
min_initialized: 2
# Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared: 25
# Optional: Configuration for stationary object tracking
stationary:
# Optional: Frequency for confirming stationary objects (default: same as threshold)
# When set to 1, object detection will run to confirm the object still exists on every frame.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
interval: 50
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 50
# Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
# This can help with false positives for objects that should only be stationary for a limited amount of time.
# It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
# car at the default.
# WARNING: Setting these values overrides default behavior and disables stationary object tracking.
# There are very few situations where you would want it disabled. It is NOT recommended to
# copy these values from the example config into your config unless you know they are needed.
max_frames:
# Optional: Default for all object types (default: not set, track forever)
default: 3000
# Optional: Object specific values
objects:
waste_bin: 1000
# Optional: Milliseconds to offset detect annotations by (default: shown below).
# There can often be latency between a recording and the detect process,
# especially when using separate streams for detect and record.
# Use this setting to make the timeline bounding boxes more closely align
# with the recording. The value can be positive or negative.
# TIP: Imagine there is an tracked object clip with a person walking from left to right.
# If the tracked object lifecycle bounding box is consistently to the left of the person
# then the value should be decreased. Similarly, if a person is walking from
# left to right and the bounding box is consistently ahead of the person
# then the value should be increased.
# TIP: This offset is dynamic so you can change the value and it will update existing
# tracked objects, this makes it easy to tune.
# WARNING: Fast moving objects will likely not have the bounding box align.
annotation_offset: 0
face_recognition:
enabled: true
model_size: small
lpr:
enabled: false
classification:
bird:
enabled: falsedocker-compose file or Docker CLI commandUsing Unraid and can't find this file.Relevant Frigate log outputNARelevant go2rtc log outputNAOperating systemUNRAID Install methodDocker CLI Network connectionWired Camera make and modelAmcrest Screenshots of the Frigate UI's System metrics pagesNA Any other information that may be helpfulNo response |
Answered by
hawkeye217
Sep 16, 2025
Replies: 1 comment 14 replies
|
This code has been tested by many users with both meters (metric) and feet (imperial), it is unlikely to be a bug. As noted in the docs, there are a large number of factors that affect speed estimation. Can you post a screenshot of your speed estimation zone from the zone editor? |
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Take the polygon you're drawing for the zone.
If side AB is 10 units (whether you call that "meters" or "feet", it doesn't matter) in real life but 100 pixels in the image, the scale is 0.1 units/pixel
If side CD is 10 units but appears as 50 pixels due to perspective, the scale is 0.2 units/pixel
The output units depend entirely on what units were used for the distances parameter:
If distances were in meters →
speed_magnitudeis in m/sIf distances were in feet →
speed_magnitudeis in ft/sSo, the code simply takes what you have set for unit system and:
For metric zones (distances in meters): converts m/s to km/h
For imperial zones (distances in feet): converts ft/s to mph
The system is …