frigate: [Detector Support]: Doesn't work GPU with OpenVINO
Describe the problem you are having
When I am trying to enable OpenVINO detector with device=GPU I can see the error in log and Frigate becomes inactive for a while. If I set device=AUTO it starts to work, but when detect is enabled I can see high cpu utilization and no any activity in intel_gpu_top which shows that GPU acceleration is not working. HW acceleration of camera is working good.
I set LIBVA_DRIVER_NAME=iHD because of if I choose i965 then I see how the blitter in intel_gpu_top is connected, I’m not sure, but it doesn’t seem good and openvino doesn’t work also.
I have Celeron J4105 and Unraid system.
Version
0.13
Frigate config file
database:
path: /config/frigate.db
mqtt:
enabled: true
host: homeassistant.local
port: 1883
user: admin
password: password
topic_prefix: frigate
client_id: frigate
ui:
live_mode: mse
use_experimental: true
birdseye:
enabled: false
detect:
enabled: true
detectors:
ov:
type: openvino
device: GPU
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
snapshots:
enabled: true
record:
enabled: true
expire_interval: 60
retain:
days: 12
mode: all
events:
retain:
default: 12
mode: motion
ffmpeg:
hwaccel_args: preset-vaapi
logger:
default: error
logs:
frigate.mqtt: error
frigate.app: error
frigate.ffmpeg: critical
go2rtc:
log:
format: text
level: error
# api: trace
# exec: debug
# ngrok: info
# rtsp: warn
# streams: error
# webrtc: fatal
rtsp:
default_query: mp4
streams:
cam3:
- rtsp://admin:password@192.168.1.62:554
cam3_sub:
- rtsp://admin:password@192.168.1.62:554/Streaming/channels/2
cameras:
cam3:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/cam3
input_args: preset-rtsp-restream-low-latency
roles:
- record
- path: rtsp://127.0.0.1:8554/cam3_sub
input_args: preset-rtsp-restream
roles:
- detect
output_args:
record: preset-record-generic-audio-copy
motion:
mask:
- 0,176,110,176,110,155,0,155
docker-compose file or Docker CLI command
docker run
-d
--name='frigate'
--net='bridge'
--privileged=true
-e TZ="Europe/Moscow"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="SERVER"
-e HOST_CONTAINERNAME="frigate"
-e 'FRIGATE_RTSP_PASSWORD'='password'
-e 'LIBVA_DRIVER_NAME'='iHD'
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.webui='http://[IP]:[PORT:5000]'
-l net.unraid.docker.icon='https://raw.githubusercontent.com/yayitazale/unraid-templates/main/frigate.png'
-p '5000:5000/tcp'
-p '8554:8554/tcp'
-p '8555:8555/tcp'
-p '8555:8555/udp'
-p '1984:1984/tcp'
-v '/mnt/user/appdata/frigate':'/config':'rw'
-v '/mnt/disks/cameras/':'/media/frigate':'rw,slave'
-v '/etc/localtime':'/etc/localtime':'rw'
--device='/dev/dri'
--shm-size=256mb
--mount type=tmpfs,target=/tmp/cache,tmpfs-size=2726297600
--restart unless-stopped 'ghcr.io/blakeblackshear/frigate:stable'
Relevant log output
2024-02-01 19:33:04.112890288 [INFO] Preparing Frigate...
2024-02-01 19:33:04.140557029 [INFO] Starting Frigate...
2024-02-01 19:33:06.708554578 [2024-02-01 19:33:06] frigate.app INFO : Starting Frigate (0.13.0-01e2d20)
2024-02-01 19:33:10.350863638 [2024-02-01 19:33:10] frigate.config WARNING : Customizing more than a detector model path is unsupported.
2024-02-01 19:33:12.743140257 Process detector:ov:
2024-02-01 19:33:12.746019189 Traceback (most recent call last):
2024-02-01 19:33:12.746050491 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-02-01 19:33:12.746053039 self.run()
2024-02-01 19:33:12.746055072 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-02-01 19:33:12.746061394 self._target(*self._args, **self._kwargs)
2024-02-01 19:33:12.746064435 File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
2024-02-01 19:33:12.746091310 object_detector = LocalObjectDetector(detector_config=detector_config)
2024-02-01 19:33:12.746111650 File "/opt/frigate/frigate/object_detection.py", line 53, in __init__
2024-02-01 19:33:12.746114358 self.detect_api = create_detector(detector_config)
2024-02-01 19:33:12.746116276 File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2024-02-01 19:33:12.746117776 return api(detector_config)
2024-02-01 19:33:12.746119702 File "/opt/frigate/frigate/detectors/plugins/openvino.py", line 32, in __init__
2024-02-01 19:33:12.746121416 self.interpreter = self.ov_core.compile_model(
2024-02-01 19:33:12.746123545 File "/usr/local/lib/python3.9/dist-packages/openvino/runtime/ie_api.py", line 399, in compile_model
2024-02-01 19:33:12.746126909 super().compile_model(model, device_name, {} if config is None else config),
2024-02-01 19:33:12.746181038 RuntimeError: cldnn program build failed! [GPU] clWaitForEvents, error code: -14
Operating system
UNRAID
Install method
Docker Compose
Coral version
CPU (no coral)
Any other information that may be helpful
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 32 (1 by maintainers)
Same issue on a docker nested container inside a proxmox unprivileged container using intel N3350. Does the container and host both need some packages ? if so then which are needed ?
looks like this is an issue with the kernel included in the new proxmox 8.2.2 https://github.com/blakeblackshear/frigate/discussions/10785
loading the previous kernel in proxmox with the following guide solved my issue until a new proxmox release comes out. https://engineerworkshop.com/blog/how-to-revert-a-proxmox-kernel-update/
I have the exact same issue, same cpu in a nuc but with proxmox.
Indeed Plex struggled for a long time with some of these processors after an update but was resolved a few weeks back. As far as i know their issue was related to changes in the drivers used.
No that is a new one to me. I’ll see what I can dig up later today.
to be clear I tagged someone else with that question