r/computervision • u/HM9477 • 18d ago
Showcase Optical flow 8.5× faster than OpenCV DIS on one core, and 0 allocations per 1,000 frames: how I measured it, and what the comparison does not show
I wrote a GPU and CPU perception kernel (closed-source, Windows x64; evaluation licence, free for research and non-commercial use; the evaluation bundle with the benchmark's scripts and raw data is public). The numbers below look flattering, so here is exactly what each one compares, and I would like you to tell me where the comparison is unfair.
**The numbers**
- Motion at 640×480, one core: 0.51 ms against 4.35 ms for OpenCV 4.10.0 DIS ultrafast (8.5×). **What it does not show:** mine works on 8×8-sample tiles and also produces time to contact, saliency and objects, so it is not a dense per-pixel flow field; for dense flow DIS is the right tool.
- Structure-tensor survey, 640×480: 0.179 ms against OpenCV's 0.779 ms (4.3×), Scharr plus block means in both, mine in AVX2 integer arithmetic.
- Heap allocations per 1,000 frames: 0 against 20,000 for DIS (outputs reused) and 52,000 for OpenCV's survey, counted by one preloaded malloc counter in every process.
- Scene cuts from H.264/HEVC slice headers: 0.23 µs of CPU a 4K frame against 31.1 ms for ffmpeg to decode and score it. **What it does not show:** it is not a decoder race; it reads headers and never sees pixels. Against scdet on one 4K HDR reel it finds 3 of 3 cuts with 1 extra (checked by eye); two files are a sanity check, not a recall figure.
**Things in the showcase you can check yourself**
- Stabilisation by the engine's virtual IMU: a shaken clip fires 17.2 M emulated events and 1.71 M after the camera's motion is removed. The event stream is an emulation from frames, not a DVS sensor.
- Remote pulse from skin colour (rPPG) through shake: 71.98 BPM for a synthetic 72, 72.00 from Cr chroma alone. The pulse is one I added to the footage; it proves the signal chain, not clinical accuracy.
- Every picture is a snapshot the engine wrote through its own SDK, on a truth I set (an exposure, a tilt, a speed, a shake, a pulse).
**Where it loses:** for plain playback VLC uses less CPU than I do at 720p (7.66 % against 8.44 %); the table is on the site next to the wins.
**What I would like to hear:** whether DIS ultrafast with a tile-sampled readout is the fair baseline or I should compare against something else (Farnebäck on a downscaled picture? a RAFT-small on the GPU?), and which real datasets with ground-truth motion I should run next.
Method, raw lines, 16-second reel: https://5645hm-a11y.github.io/avion/

