[Detector Support]: OpenVINO Intel CPU faster than iGPU #20729
Replies: 2 comments
-
|
\ Your observations are valid, and there are several factors at play: 1) CPU Faster Than iGPU - This Can Be ExpectedFor the lightweight SSDLite MobileNet v2 model at 300×300 resolution, Intel CPUs can indeed outperform iGPUs in single-stream scenarios(1)(2). The documentation notes that OpenVINO is supported on 6th Gen Intel platforms (Skylake) and newer, and will run on both CPUs and GPUs(1)(2). Your observation that the iGPU might scale better with multiple streams is correct - GPUs typically show their advantage when handling parallel workloads across multiple cameras(3). 2) Detector Inference Speed vs benchmark_app DiscrepancyThe "Detector CPU Usage" metric tracks the CPU usage required to preprocess model inputs before they run on the iGPU - these preprocessing operations cannot run on the GPU itself(4). This preprocessing overhead explains part of the latency difference you're seeing between Frigate's reported inference speed (8ms) and benchmark_app (4.3ms). The most important metric is inference time, not just the preprocessing overhead. Your 8ms inference time is still respectable and indicates the iGPU is being used(4). Configuration RecommendationsYour configuration looks correct. The OpenVINO detector is properly configured with detectors:
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.txtWhen using many cameras, you can define multiple detectors assuming GPU resources are available(1)(2): detectors:
ov_0:
type: openvino
device: GPU
ov_1:
type: openvino
device: GPUVerificationIf you want to confirm the GPU is actually being used (not just CPU), note that there's a known bug with Intel's GPU monitoring tools where GPU usage may not display correctly, even when the GPU is actively being used(4). Your current setup is working as designed. The CPU detector shows better single-stream performance for this lightweight model, but the GPU configuration will scale better as you add more cameras. 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
What hardware are you running on? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem you are having
I have some interesting observations. Appreciate if you can help check whether my configuration can be optimized. Thanks.
1) Intel CPU is 2-3x faster than iGPU with OpenVINO and mobilenet_v2;
with OpenVINO and mobilenet_v2, Intel CPU latency is 3ms, and Intel iGPU is 8ms (
System Metrics -> Detector Inference Speed). Is this expected? Is there anything wrong with my detector configuration?2) latency reported on
System Metrics -> Detector Inference Speedfor iGPU is 2x higher thanbenchmark_app.Detector Inference Speed" is 8ms, but running benchmark_app on a sample image from the same camera has an average latency of 4.3ms;benchmark_appfor Intel CPU is 2.9ms, similar to the corresponding latency shown asDetector Inference Speed;Is there any item in my configuration that can be optimized so that the actual detector can also get the 4.3ms response time with Intel iGPU?
Note: the only configuration change between CPU and iGPU is the following:
Version
0.16.2-4d58206
Frigate config file
docker-compose file or Docker CLI command
Relevant Frigate log output
No errors in logInstall method
Docker CLI
Object Detector
OpenVino
Screenshots of the Frigate UI's System metrics pages
Any other information that may be helpful
I used the following to get the benchmark_app latency.
wget -O test_frame.jpg "http://<frigate_ip>:5000/api/yarddoor/latest.jpg"
Beta Was this translation helpful? Give feedback.
All reactions