Real-time instance segmentation on an NPU, an integrated GPU and a CPU that share one power budget — and what INT8 costs to hold 30 fps.
The right device depends on duty cycle, and measuring only one of them recommends the wrong one. Both were measured: a saturated benchmark with inference running back-to-back, and the real 30 fps camera the project set out to serve.
For the 30 fps camera workload, use INT8 on the iGPU. Over 2398 live frames it held 10.4 ms median and 13.3 ms p99, missing the 33.3 ms budget on 0.3% of frames — better than the NPU on both statistics. INT8 costs 0.0024 box mAP against FP32 on a model that scores 0.360.
Under saturation that inverts, sharply. Running inference back-to-back, the iGPU's p99 collapses from 13.3 ms to 47.0 ms and its outlier rate rises 5.5x, while the NPU barely moves (18.0 ms p99). Any pipeline that keeps the accelerator busy — multiple streams, higher frame rates, batch work — should use the NPU.
The mechanism is not the GPU's compute. On the frames that blow the budget, inference is normal and the CPU-side stages take 30–137 ms. At 100% duty cycle the iGPU produced 63 such stalls per 4000 frames against the NPU's 6; at camera duty cycle, where it idles roughly 70% of the time, that largely evaporates.
Two arguments still favour the NPU that no latency column shows: on this part the iGPU is also the display adapter, so inference there competes with what the user is looking at, and power was not measured at all.
The budget was fixed before anything was measured: 33.3 ms end-to-end per frame, sustained, which is 30 fps with no headroom borrowed from averaging. End-to-end means capture to drawn result — preprocess, inference and postprocess — not the inference kernel in isolation. Every configuration is scored pass/fail against that one number, and the fraction of frames that miss it is the metric that decides the recommendation. Median latency is reported because people ask for it, not because it decides anything.
Twelve configurations: three devices against four model variants, 1000 timed frames each after 100 discarded warmup frames, with a 45 s cooldown between runs so that no configuration starts on silicon heated by the previous one. The ordering flips depending on which statistic is used. By median the iGPU wins every precision. By p99 the NPU wins every precision, and it is the only device whose worst frame stays inside a single 33.3 ms budget in three of its four variants.
| configuration | p50 | p90 | p99 | p99.9 | max | jitter p99−p50 | std | fps | over 33.3 ms | compile s |
|---|---|---|---|---|---|---|---|---|---|---|
| CPU FP32 | 45.69 | 53.53 | 59.16 | 77.14 | 80.1 | 13.47 | 5.92 | 21.8 | 100.0% | 0.29 |
| CPU FP16 | 42.82 | 51.71 | 58.78 | 68.71 | 70.9 | 15.96 | 5.11 | 22.7 | 100.0% | 0.13 |
| CPU INT8 | 32.63 | 42.37 | 49.01 | 67.21 | 85.9 | 16.38 | 5.71 | 28.9 | 46.3% | 0.19 |
| CPU INT8-full | 29.82 | 32.50 | 35.11 | 43.75 | 46.2 | 5.29 | 1.99 | 33.3 | 4.8% | 0.12 |
| iGPU FP32 | 12.59 | 14.15 | 50.50 | 127.81 | 128.8 | 37.91 | 8.76 | 72.5 | 1.7% | 0.16 |
| iGPU FP16 | 12.72 | 14.02 | 18.92 | 81.47 | 85.8 | 6.20 | 4.88 | 75.3 | 0.8% | 0.11 |
| iGPU INT8 | 11.30 | 13.30 | 47.02 | 122.31 | 134.5 | 35.72 | 7.86 | 81.6 | 1.6% | 0.15 |
| iGPU INT8-full | 9.97 | 11.90 | 49.00 | 85.71 | 147.4 | 39.03 | 8.06 | 89.0 | 2.1% | 0.11 |
| NPU FP32 | 14.68 | 15.91 | 17.94 | 18.43 | 19.3 | 3.25 | 0.91 | 67.4 | 0.0% | 0.37 |
| NPU FP16 | 15.66 | 16.93 | 19.01 | 49.38 | 52.6 | 3.36 | 1.91 | 63.5 | 0.2% | 0.06 |
| NPU INT8 | 13.93 | 15.45 | 17.98 | 84.53 | 88.5 | 4.05 | 3.40 | 69.9 | 0.2% | 0.06 |
| NPU INT8-full | 13.58 | 14.90 | 16.77 | 47.76 | 48.1 | 3.20 | 1.75 | 72.3 | 0.2% | 0.07 |
All latency columns are end-to-end milliseconds per frame: capture → preprocess → inference → postprocess. 1000 timed frames per configuration after 100 discarded warmup frames.
The four-point instrumentation exists so that a fast configuration cannot hide a slow pipeline. It earns its keep here: once the model is INT8 on the NPU, inference is 11.9 ms and the CPU-side preprocess and postprocess together are about 3.9 ms — a third of the remaining budget is spent on letterboxing and mask decode, not on the network. Optimising the model further would buy less than moving preprocess off the CPU would.
| configuration | preprocess | inference | postprocess | total | inference share |
|---|---|---|---|---|---|
| CPU FP32 | 3.04 | 40.79 | 1.23 | 45.06 | 91% |
| CPU FP16 | 3.47 | 37.77 | 1.20 | 42.44 | 89% |
| CPU INT8 | 2.46 | 28.82 | 1.14 | 32.42 | 89% |
| CPU INT8-full | 2.25 | 26.35 | 1.04 | 29.64 | 89% |
| iGPU FP32 | 2.79 | 8.68 | 0.96 | 12.43 | 70% |
| iGPU FP16 | 2.89 | 8.62 | 0.99 | 12.51 | 69% |
| iGPU INT8 | 2.80 | 7.25 | 1.03 | 11.07 | 65% |
| iGPU INT8-full | 2.26 | 6.54 | 1.04 | 9.84 | 66% |
| NPU FP32 | 2.03 | 11.47 | 0.99 | 14.48 | 79% |
| NPU FP16 | 2.44 | 12.03 | 1.01 | 15.48 | 78% |
| NPU INT8 | 2.09 | 10.65 | 1.02 | 13.77 | 77% |
| NPU INT8-full | 2.00 | 10.48 | 0.97 | 13.45 | 78% |
Median milliseconds per stage. Preprocess and postprocess run on the CPU in every row -- only the inference column moves to the accelerator.
The tail is not a smear across all frames — it is a small number of discrete stalls, and they land almost entirely on the iGPU runs. On those frames the inference stage is unremarkable and the NumPy postprocess, normally 1 ms, takes 30–137 ms. No extra work is being done at 137 ms; the thread is not running. The mechanism is not isolated here — the iGPU drives the display and shares a package power budget with the CPU cores, so compositor contention, driver host threads and frequency droop are all live candidates, and separating them needs tracing this study does not do. The asymmetry itself is reproducible across all four iGPU precisions.
| configuration | stalls of 1000 |
CPU stages p50 ms | CPU stages max ms |
inference p99 ms |
e2e p99 ms | e2e p99 stalls removed |
|---|---|---|---|---|---|---|
| CPU FP32 | 0 | 4.48 | 12.9 | 53.85 | 59.16 | 59.16 |
| CPU FP16 | 0 | 4.69 | 12.6 | 53.09 | 58.78 | 58.78 |
| CPU INT8 | 1 | 3.68 | 38.8 | 44.52 | 49.01 | 48.95 |
| CPU INT8-full | 0 | 3.33 | 7.6 | 31.14 | 35.11 | 35.11 |
| iGPU FP32 | 17 | 3.84 | 119.5 | 10.36 | 50.50 | 17.45 |
| iGPU FP16 | 8 | 3.96 | 75.3 | 10.10 | 18.92 | 17.30 |
| iGPU INT8 | 17 | 3.91 | 125.7 | 9.51 | 47.02 | 17.06 |
| iGPU INT8-full | 21 | 3.37 | 139.7 | 8.22 | 49.00 | 15.05 |
| NPU FP32 | 0 | 3.10 | 6.7 | 12.79 | 17.94 | 17.94 |
| NPU FP16 | 2 | 3.54 | 41.5 | 13.68 | 19.01 | 18.92 |
| NPU INT8 | 2 | 3.19 | 77.7 | 12.21 | 17.98 | 17.85 |
| NPU INT8-full | 2 | 3.03 | 38.0 | 11.88 | 16.77 | 16.59 |
Stalls per device across 4000 frames each: CPU 1 iGPU 63 NPU 6 . A stall is a frame whose combined preprocess + postprocess time exceeds 20 ms — about four times the p99 of those same stages in the configurations that never stall.
The benchmark saturates the accelerator by design — it runs inference back-to-back so that the device, not the camera, sets the pace. A 30 fps camera is a different regime: it asks for 7–18 ms of work every 33.3 ms, so the accelerator idles most of the time. The same pipeline was therefore run again against the real webcam, and the ranking inverted. The iGPU, which looked like a poor real-time target under saturation, is the best one at camera duty cycle; the NPU is unchanged in character but roughly 4 ms slower live than in the benchmark, which is consistent with its host-side driver work competing with the capture thread. The honest reading is that the saturated numbers describe headroom and the live numbers describe this workload, and a study that reported only the first would have recommended the wrong device.
| configuration | frames | p50 | p99 | max | outliers >2× own p50 |
over 33.3 ms |
|---|---|---|---|---|---|---|
| NPU INT8 — saturated benchmark | 1000 | 13.93 | 17.98 | 88.5 | 0.20% | 0.2% |
| NPU INT8 — live 30 fps camera | 1891 | 18.04 | 22.28 | 55.1 | 0.05% | 0.1% |
| iGPU INT8 — saturated benchmark | 1000 | 11.30 | 47.02 | 134.6 | 1.80% | 1.6% |
| iGPU INT8 — live 30 fps camera | 2398 | 10.42 | 13.31 | 47.0 | 0.33% | 0.3% |
The iGPU's p99 improves 3.5× and its outlier rate falls 5.5× when it stops being saturated. The NPU changes little in either direction — it is the more predictable device, and the slower one for this workload.
FP16 is free: identical box mAP to FP32 to four decimals. INT8 with the detection-head decode left in floating point costs 0.0015 box mAP. Quantizing that head as well costs 0.0389 — twenty-six times more — and buys 0.35 ms. That is the entire case for mixed precision, measured rather than assumed, and it is why the recommended model is not the fastest one built. Across backends the same INT8 weights score within 0.001 mAP on CPU, iGPU and NPU, so the NPU is not quietly trading accuracy for its latency.
| model / backend | box mAP50-95 | Δ vs FP32 | mask mAP50-95 | Δ vs FP32 |
|---|---|---|---|---|
| FP32 on CPU | 0.3602 | — | 0.3004 | — |
| FP16 on CPU | 0.3602 | — | 0.3005 | +0.0001 |
| INT8 on CPU | 0.3587 | -0.0015 | 0.2985 | -0.0019 |
| INT8-full on CPU | 0.3213 | -0.0389 | 0.2872 | -0.0132 |
| INT8 on iGPU | 0.3578 | -0.0024 | 0.2990 | -0.0014 |
| INT8 on NPU | 0.3579 | -0.0023 | 0.2990 | -0.0014 |
1000 frames are decoded from a fixed clip into RAM before timing starts, so every configuration sees the same pixels in the same order and the video decoder never sits inside a measured interval. The clip is a deterministic pan-and-zoom across COCO photographs — temporally coherent like a camera, and content-realistic, since detection count drives postprocess cost.
One frame in flight, PERFORMANCE_HINT=LATENCY. OpenVINO's throughput mode reports a much better number by batching requests, which no live camera pipeline can use. Comparing against benchmark_app figures would be comparing different quantities.
COCO val2017 is split 300 / 4700. NNCF sees only the 300 for activation ranges; mAP is computed only on the other 4700. Reusing calibration images in the eval would flatter every INT8 number in the study.
The NumPy decode that the latency numbers include was checked against Ultralytics' own implementation on 60 images: 371 of 371 detections matched at IoU ≥ 0.9 with identical class labels. A wrong decoder would still have produced clean-looking timings.
CPU, iGPU and NPU draw on one package power budget, so runs are serialised with a 45 s cooldown and nothing else runs on the machine during the benchmark stage. Sustained fps is reported over the full run, not extrapolated from a burst.
The NPU plugin compiles static shapes only, so the model is exported at a fixed 1×3×640×640 with NMS and mask decode kept out of the graph. Those are data-dependent operations; leaving them in would force a fallback rather than fail loudly.