[Detector Support]: ONNX YoloV9 with iGPU but low usage #20449
-
Describe the problem you are havingI have low gpu usage when using ONNX with YoloV9 size M while CPU takes most of the work, why? also i can't get face and licence plate recognition to work Version0.16.1-e664cb2 Frigate config file############
# Frigate Configuration File
############
mqtt:
host: 192.168.1.256
port: 1883
user: FDAS)DIPADSOJ
password: IOUHADOIHASDOIHASD
topic_prefix: frigate
detectors:
# ov:
# type: openvino
# device: GPU
onnx:
type: onnx
device: GPU
model:
model_type: yolo-generic
width: 320 # <--- should match the imgsize set during model export
height: 320 # <--- should match the imgsize set during model export
input_tensor: nchw
input_dtype: float
path: /config/model_cache/yolov9-m-320.onnx
labelmap_path: /labelmap/coco-80.txt
# 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
#model: # required
# # name of model (will be automatically downloaded) or path to your own .rknn model file
# # possible values are:
# # - frigate-fp16-yolov9-t
# # - frigate-fp16-yolov9-s
# # - frigate-fp16-yolov9-m
# # - frigate-fp16-yolov9-c
# # - frigate-fp16-yolov9-e
# # your yolo_model.rknn
# path: frigate-fp16-yolov9-t
# model_type: yolo-generic
# width: 320
# height: 320
# input_tensor: nhwc
# labelmap_path: /labelmap/coco-80.txt
go2rtc:
streams:
cam1:
- rtsp://192.168.1.184/onvif1
- ffmpeg:cam1#audio=opus
cam2:
- rtsp://192.168.1.182/user=admin&password=tlJwpbo6&channel=1&stream=0.sdp?real_stream
- ffmpeg:cam2#audio=opus
cam3:
- rtsp://192.168.1.181/user=admin&password=tlJwpbo6&channel=1&stream=0.sdp?real_stream
- ffmpeg:cam3#audio=opus
cam4:
- rtsp://192.168.1.183/user=admin&password=tlJwpbo6&channel=1&stream=0.sdp?real_stream
- ffmpeg:cam4#audio=opus
objects:
track:
- person
- car
- truck
- motorcycle
- bicycle
- dog
- cat
- bird
- face
- license_plate
- package
#filters:
#person:
# min_area: 5000
# max_area: 100000
# min_score: 0.5
# threshold: 0.7
# car:
# min_area: 5000
# max_area: 200000
# min_score: 0.5
# threshold: 0.7
record:
enabled: true
retain:
days: 7 # Number of days to keep recordings
mode: all # 'all' to save everything or 'events' to only save clips with detected objects
snapshots:
enabled: true
clean_copy: true # Save a clean copy without bounding boxes
timestamp: true # Add timestamp to snapshots
bounding_box: true # Draw bounding boxes on objects
retain:
default: 14 # Number of days to keep snapshots
birdseye:
enabled: true
mode: continuous # Options: continuous, motion, or objects
width: 1280
height: 720
# Camera configurations
cameras:
cam1: # Entry Camera
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://127.0.0.1:8554/cam1
input_args: preset-rtsp-restream
roles:
- detect
- record
- audio
path: '5.0'
detect:
enabled: true
# width: 640 # Width for detection (lower for better performance)
# height: 360 # Height for detection
# fps: 5 # Frames per second used for detection
# objects:
# track:
# - person
# - car
# - truck
# - motorcycle
# - bicycle
# - dog
# - cat
# - bird
# filters:
# person:
# min_area: 5000
# max_area: 100000
# min_score: 0.5
# threshold: 0.7
record:
enabled: true
retain:
days: 7
mode: all
snapshots:
enabled: true
retain:
default: 14
motion:
threshold: 39
contour_area: 17
improve_contrast: true
mask: 0,0.062,0.392,0.062,0.394,0,0,0
zones:
Garage:
coordinates: 0.483,0.421,0.003,0.473,0,1,1,1,0.993,0.452
loitering_time: 0
review:
alerts:
required_zones: Garage
cam2: # Side Camera
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://127.0.0.1:8554/cam2
input_args: preset-rtsp-restream
roles:
- detect
- record
- audio
onvif:
host: 192.168.1.182
port: 8899
user: admin
password: tlJwpbo6
detect:
enabled: true
# width: 960
# height: 1080 # Adjusted for stacked 16:9 streams
# fps: 5
# objects:
# track:
# - person
# - car
# - truck
# - motorcycle
# - bicycle
# - dog
# - cat
# - bird
# filters:
# person:
# min_area: 5000
# max_area: 100000
# min_score: 0.5
# threshold: 0.7
record:
enabled: true
retain:
days: 7
mode: all
snapshots:
enabled: true
retain:
default: 14
motion:
threshold: 40
contour_area: 33
improve_contrast: true
zones:
Front_Yard:
coordinates:
0.673,0,0.662,0.207,0.652,0.252,0.533,0.229,0.543,0.305,0.492,0.374,0.486,0.408,0.437,0.44,0.435,0.501,0.999,0.501,1,0.18,0.898,0
loitering_time: 0
inertia: 3
Side_Yard:
coordinates:
0,0.499,0.429,0.499,0.438,0.432,0.481,0.411,0.489,0.371,0.545,0.308,0.528,0.225,0.647,0.249,0.658,0.206,0.67,0.001,0.001,0.003
loitering_time: 0
review:
alerts:
required_zones:
- Front_Yard
- Side_Yard
cam3: # Backyard Camera
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://127.0.0.1:8554/cam3
input_args: preset-rtsp-restream
roles:
- detect
- record
- audio
onvif:
host: 192.168.1.181
port: 8899
user: admin
password: tlJwpbo6
detect:
enabled: true
# width: 960
# height: 1080 # Adjusted for stacked 16:9 streams
# fps: 5
# objects:
# track:
# - person
# - car
# - truck
# - motorcycle
# - bicycle
# - dog
# - cat
# - bird
# filters:
# person:
# min_area: 5000
# max_area: 100000
# min_score: 0.5
# threshold: 0.7
record:
enabled: true
retain:
days: 7
mode: all
snapshots:
enabled: true
retain:
default: 14
zones:
Back_Yard:
coordinates:
0.406,0.496,0.001,0.497,-0.001,0.316,0.048,0.268,0.263,0.255,0.274,0.079,0.548,0.034,0.525,0.499
loitering_time: 0
review:
alerts:
required_zones: Back_Yard
cam4: # Front Camera
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://127.0.0.1:8554/cam4
input_args: preset-rtsp-restream
roles:
- detect
- record
- audio
onvif:
host: 192.168.1.183
port: 8899
user: admin
password: tlJwpbo6
detect:
enabled: true
# width: 960
# height: 1080 # Adjusted for stacked 16:9 streams
# fps: 5
objects:
# track:
# - person
# - car
# - truck
# - motorcycle
# - dog
# - cat
# - bird
filters:
# person:
# min_area: 5000
# max_area: 100000
# min_score: 0.5
# threshold: 0.7
bicycle:
mask:
- 0.588,0.339,0.818,0.347,0.83,0.245,0.772,0.22,0.705,0.215,0.7,0.187,0.649,0.186,0.63,0.225,0.585,0.241
- 0.287,0.665,0.558,0.662,0.532,0.588,0.496,0.569,0.456,0.537,0.418,0.533,0.365,0.518,0.335,0.561,0.29,0.562
car:
mask:
0.003,0.446,0.117,0.365,0.292,0.207,0.51,0.143,0.718,0.161,0.785,0.274,0.758,0.434,0.733,0.47,0.71,0.474,0.699,0.499,0.001,0.499
record:
enabled: true
retain:
days: 7
mode: all
snapshots:
enabled: true
retain:
default: 14
zones:
Exterior_Car_Spot:
coordinates:
0.38,0.496,0.816,0.501,0.864,0.32,0.893,0.163,0.525,0.14,0.527,0.31
inertia: 3
loitering_time: 0
objects:
- bird
- cat
- dog
- motorcycle
- person
# - truck
Gates:
coordinates: -0.001,0.501,0.38,0.497,0.525,0.309,0.527,0.142,0,0.146
inertia: 3
loitering_time: 0
review:
alerts:
required_zones:
- Exterior_Car_Spot
- Gates
ffmpeg:
# hwaccel_args: "auto"
input_args: preset-rtsp-generic
output_args:
record: preset-record-generic-audio-aac
# path: "5.0"
hwaccel_args: auto
# global_args:
# - -hide_banner
# - -loglevel
# - warning
# input_args:
# - -avoid_negative_ts
# - make_zero
# - -fflags
# - nobuffer+genpts+discardcorrupt
# - -flags
# - low_delay
# - -strict
# - experimental
# - -analyzeduration
# - '1000000'
# - -probesize
# - '1000000'
# output_args:
# record:
# - -f
# - segment
# - -segment_time
# - '60'
# - -segment_format
# - mp4
# - -reset_timestamps
# - '1'
# - -strftime
# - '1'
# - -c
# - copy
# Increase shm-size as recommended in logs
# This must be set in your docker-compose.yml or docker run command
# docker run --shm-size=98m ...
# Optional semantic search feature
semantic_search:
enabled: true
reindex: false
model_size: large
version: 0.16-0
notifications:
enabled: true
email: [email protected]
detect:
enabled: true
face_recognition:
enabled: true
model_size: large
lpr:
enabled: true
classification:
bird:
enabled: true docker-compose file or Docker CLI commandversion: "3.9"
services:
frigate:
container_name: frigate
restart: unless-stopped
stop_grace_period: 30s
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: '2048m'
devices:
- /dev/dri/renderD128:/dev/dri/renderD128
volumes:
- ./config:/config
- ./storage:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 3000000000
cap_add:
- CAP_PERFMON
ports:
- "8971:8971"
- "8554:8554" # RTSP feeds
- "5000:5000" Relevant Frigate log output2025-10-12 15:23:22.872242305 [INFO] Preparing Frigate...
2025-10-12 15:23:23.683556209 [INFO] Starting Frigate...
2025-10-12 15:23:26.431867631 [2025-10-12 15:23:26] frigate.util.config INFO : Checking if frigate config needs migration...
2025-10-12 15:23:26.479474241 [2025-10-12 15:23:26] frigate.util.config INFO : frigate config does not need migration...
2025-10-12 15:23:26.853157329 [2025-10-12 15:23:26] frigate.util.services INFO : Automatically detected vaapi hwaccel for video decoding
2025-10-12 15:23:35.731357729 [2025-10-12 15:23:35] frigate.config.config WARNING : cam1 is configured to track ['package', 'face', 'truck', 'license_plate'] objects, which are not supported by the current model.
2025-10-12 15:23:37.672931014 [2025-10-12 15:23:37] frigate.config.config WARNING : cam2 is configured to track ['package', 'face', 'truck', 'license_plate'] objects, which are not supported by the current model.
2025-10-12 15:23:39.637420425 [2025-10-12 15:23:39] frigate.config.config WARNING : cam3 is configured to track ['package', 'face', 'truck', 'license_plate'] objects, which are not supported by the current model.
2025-10-12 15:23:41.592182520 [2025-10-12 15:23:41] frigate.config.config WARNING : cam4 is configured to track ['package', 'face', 'truck', 'license_plate'] objects, which are not supported by the current model.
2025-10-12 15:23:41.596785680 [2025-10-12 15:23:41] frigate.app INFO : Starting Frigate (0.16.1-e664cb2)
2025-10-12 15:23:41.617337221 [2025-10-12 15:23:41] peewee_migrate.logs INFO : Starting migrations
2025-10-12 15:23:41.641488549 [2025-10-12 15:23:41] peewee_migrate.logs INFO : There is nothing to migrate
2025-10-12 15:23:41.665616430 [2025-10-12 15:23:41] frigate.app INFO : Recording process started: 557
2025-10-12 15:23:41.677829651 [2025-10-12 15:23:41] frigate.app INFO : Review process started: 570
2025-10-12 15:23:41.685291139 [2025-10-12 15:23:41] frigate.app INFO : go2rtc process pid: 123
2025-10-12 15:23:41.710529230 [2025-10-12 15:23:41] detector.onnx INFO : Starting detection process: 582
2025-10-12 15:23:41.718961260 [2025-10-12 15:23:41] frigate.detectors.plugins.onnx INFO : ONNX: loaded onnxruntime module
2025-10-12 15:23:41.720752616 [2025-10-12 15:23:41] frigate.detectors.plugins.onnx INFO : ONNX: loading /config/model_cache/yolov9-m-320.onnx
2025-10-12 15:23:41.721810754 [2025-10-12 15:23:41] frigate.app INFO : Embedding process started: 585
2025-10-12 15:23:41.755124362 [2025-10-12 15:23:41] frigate.app INFO : Output process started: 612
2025-10-12 15:23:41.811097870 [2025-10-12 15:23:41] frigate.app INFO : Camera processor started for cam1: 633
2025-10-12 15:23:41.838033784 [2025-10-12 15:23:41] frigate.app INFO : Camera processor started for cam2: 640
2025-10-12 15:23:42.044427714 [2025-10-12 15:23:41] frigate.app INFO : Camera processor started for cam3: 646
2025-10-12 15:23:42.052559559 [2025-10-12 15:23:42] frigate.app INFO : Camera processor started for cam4: 649
2025-10-12 15:23:42.102673257 [2025-10-12 15:23:42] frigate.app INFO : Capture process started for cam1: 716
2025-10-12 15:23:42.122511369 [2025-10-12 15:23:42] frigate.app INFO : Capture process started for cam2: 726
2025-10-12 15:23:42.138066743 [2025-10-12 15:23:42] frigate.app INFO : Capture process started for cam3: 736
2025-10-12 15:23:42.177765889 [2025-10-12 15:23:42] frigate.app INFO : Capture process started for cam4: 742
2025-10-12 15:23:42.236845348 [2025-10-12 15:23:42] frigate.detectors.plugins.onnx INFO : ONNX: /config/model_cache/yolov9-m-320.onnx loaded
2025-10-12 15:23:42.343996873 [2025-10-12 15:23:42] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-10-12 15:23:42.541001927 [2025-10-12 15:23:42] frigate.api.fastapi_app INFO : FastAPI started
2025-10-12 15:23:44.026876126 loading data from : /config/model_cache/facedet/landmarkdet.yaml
2025-10-12 15:23:46.219642415 INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2025-10-12 15:24:23.179591559 [2025-10-12 15:24:23] frigate.api.media ERROR : No recordings found for cam2 during the requested time range
2025-10-12 15:24:23.179591559 [LOGGING] Last message repeated 2 times
2025-10-12 15:28:06.267909582 [2025-10-12 15:28:06] frigate.ptz.onvif INFO : Attempting ONVIF initialization for cam2 (retry 1/5)
2025-10-12 15:28:06.842682697 [2025-10-12 15:28:06] frigate.ptz.onvif INFO : Attempting ONVIF initialization for cam4 (retry 1/5)
2025-10-12 15:28:07.098921159 [2025-10-12 15:28:07] frigate.ptz.onvif INFO : Attempting ONVIF initialization for cam3 (retry 1/5) Install methodDocker Compose Object DetectorOpenVino Screenshots of the Frigate UI's System metrics pages![]() Any other information that may be helpfulthis is a laptop with 8th gen i7 and iGPU |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
Based on your configuration and the logs, there are several issues to address: GPU Usage IssueYour ONNX detector is configured with Try this configuration: detectors:
ov:
type: openvino
device: GPU
model:
model_type: yolov9
width: 320
height: 320
input_tensor: nchw
input_dtype: float
path: /config/model_cache/yolov9-m-320.onnx Face and License Plate Recognition IssuesThe warnings in your logs indicate the problem:
Your YOLOv9 model uses the standard COCO-80 labelmap, which doesn't include For face and license plate recognition to work with your current setup:
objects:
track:
- person
- car
- motorcycle
- bicycle
- dog
- cat
- bird
The current model limitations mean you won't see 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Inference speed is the time (in milliseconds) a detector takes to process a frame(1). This is a key metric for sizing hardware and balancing accuracy versus latency(2). From your screenshot showing "Velocità inferenza rilevatore" (inference speed detector) at 65.0ms, this is higher than ideal. Higher inference speeds can cause issues with object tracking reliability, as the system may struggle to keep up with real-time processing. For optimal performance, you want lower inference speeds. The current speed suggests your model may be too heavy for your hardware, or you might benefit from:
Your GPU usage looks good now with the OpenVINO detector, but the focus should be on stable, reliable detection rather than maximizing GPU utilization. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
Your goal shouldn't be to max out GPU usage. If the model runs well and meets the detection needs then it's best to let the GPU run for other features.