Diana 0.11: On-Device Object Detection That Does Less Counted Work
Diana 0.11 is published, and its on-device object detection now takes 34.6 percent fewer counted instructions per frame. The clock was not re-run, so read it as less work.

What changed in on-device object detection with Diana 0.11?
Published ffai-diana 0.11.0 carries the 0.10 instruction-count campaign. In the repository's single-thread callgrind run, one yolo26n detect fell from 1,075,156,773 to 702,792,245 instructions, 34.6 percent, and a tracker replay fell 24.3 percent. Wall-clock time was not re-measured.
On-device object detection got cheaper this week, in a very specific and countable way. Diana, the detection and tracking part of the FFAI suite, is published on crates.io as ffai-diana 0.11.0. It carries the 0.10 campaign, commit e119f1a9, measured against the 0.9.0 release. One detect on the smallest YOLO26 model fell from 1,075,156,773 instructions to 702,792,245. That is 34.6 percent less counted work. The tracker fell 24.3 percent, from 21,336,089 to 16,148,683.
That is less work. It is not a latency number. The campaign did not rerun the clock, and the repository says its older timing tables predate 0.10. So this page will not turn the 34.6 percent into a speed claim for Diana 0.11, because nobody measured speed.
Diana itself is not new. Our earlier piece, Diana YOLO object detection in Rust, introduced the detector and its earlier comparisons, and those older figures stay on that page. The builder notes are at remadewithrust.com, the product page is Diana on MATA, and if you build with an assistant, how to use Diana with AI-assisted coding is the practical guide.
Every number here is repository-reported. We read the ledger and the commit. We ran nothing for this article.
What the Diana 0.11 Campaign Counted
The measurement is callgrind's instruction count, the same Valgrind tool other Remade projects use. The harness ran under WSL with rustc 1.95.0 and Valgrind 3.26.0, pinned to one core, one thread for Diana and one for its thread pool. The CPU model is not named.
The detect workload is the yolo26n model on one image from the COCO dataset, 000000000785.jpg. The tracker workload replays cached detections from the MOT17-02 sequence of the MOT17 benchmark. One picture and one cached clip are a fixed yardstick, not a survey of every scene a camera sees.
The raw callgrind files stay on the measuring machine and are not in git. The committed ledger is a transcription. That is a limit worth knowing about: you can rerun the harness, but you cannot open the original raw files from the repository.
The keep rule was strict. A change stayed only if it removed more than 100,000 instructions by itself, and same-binary reruns drifted by at most about 10,000 on detect and zero on the tracker. Forty-five changes made it. Several that made the count go up were reverted, and the ledger keeps their numbers too.
How Diana Cut the Work Around the Model
The changes in this release are plumbing, not a new model. YOLO26 still comes from the official Ultralytics checkpoint, so the network is the same. The work around it got leaner. The Ultralytics YOLO26 documentation describes the model family itself.
Fewer Copies Between Layers
Most of the cut came from not moving data twice. Rows for the convolution's im2col step are copied with a single memcpy. Matrix multiplies write straight into uninitialized output instead of zeroing it first. Pooling and convolution results land directly in the buffer they are about to be concatenated into. Upsampling and concatenation happen in one pass. Residual additions fold into the convolution that produced them. None of this changes what the network computes. It changes how many times the computer touches each number on the way.
Two New Diana Defaults, With Two Switches Back
Two changes do alter the arithmetic. Winograd convolution now runs on 3x3 stride-1 layers where both channel counts are at least 16, and attention softmax uses a polynomial exp. The repository reports a full-graph oracle pass on all five tiers, with a worst sampled relative difference of 0.00001120 against a margin of 0.000048. If you need the old arithmetic, FFAI_DIANA_NO_WINOGRAD=1 restores the plain matrix path and FFAI_DIANA_SOFTMAX_LIBM=1 restores the library exp. A switch you can flip is a better promise than a paragraph of reassurance.
A Flatter Diana Tracker For Detection Over Time
Tracking is what turns boxes in single frames into the same person crossing a porch. Diana uses ByteTrack, described in the ByteTrack paper. In 0.10 the tracker's cost matrix became one flat array, and the transposed assignment solve swaps indices instead of copying. That is the 24.3 percent tracker cut. The public nested-vector API still works through wrappers, so existing callers keep compiling. The one break in this release is elsewhere: the depthwise3x3 function gained an argument.
What Cheaper Local Detection Means at Home
A camera is the most personal sensor most households own. Whether its pictures get analyzed in your house or somewhere else is the question that matters, and the cost of doing it locally is part of the answer.
Trust: The Page Says What It Did Not Measure
The Diana README says out loud that its wall-clock tables predate 0.10. The 0.11 commit says out loud that the 4.2 percent allocator figure belongs to rusty_alloc's own benchmark and was not re-measured inside FFAI. A project that prints its own gaps is easier to trust than one that prints only its wins. Trust, in the three primitives, means checkable claims, and these are.
Security: Camera Frames That Stay On Your Machine
The Federal Trade Commission's 2023 complaint against Ring describes employees and contractors with broad access to customers' private videos. On-device object detection can avoid that category of exposure, because the frame does not have to leave the house to be analyzed. The NIST Privacy Framework is a reference for managing the privacy risk that comes from processing data, and processing a frame where it was captured is one way to shrink that risk. Diana's cheaper detect does not change any app's data flow. It lowers the cost of keeping the frame home. Memory safety matters here too, because a detector parses pixels from the outside world: CISA's case for memory-safe roadmaps explains why languages like Rust remove a whole class of bugs.
Incentive: The Rest Of FFAI This Round
In Diana 0.11, detection is the one FFAI component with a published, counted gain in this round. Argus, the captioning model on the Argus product page, only moved dependency pins and has no new measurement. Mercury, the speech component behind our Whisper-in-Rust piece, has unreleased copy-reduction work on the main branch, reported as counters and not time. The suite page is FFAI on MATA.
Cheaper local work is the incentive. A home companion that does not phone home needs a detector that a home machine can afford, and the Freedom Guide is where that journey starts. More is in Learn.
FAQ
Short answers already in this article.
Do fewer counted instructions make Diana 0.11 run faster?
That is not the claim. 34.6 percent is fewer counted instructions for one detect. Callgrind does not see cache misses, page faults or thread barriers, and the older Diana wall-clock tables predate 0.10 and were not re-measured. Time it on your own machine.
Did Diana's detections change in version 0.11?
Two numeric defaults changed: Winograd convolution on 3x3 layers with at least 16 channels, and a polynomial exp in attention softmax. The repository reports a full-graph oracle pass on tiers n, s, m, l and x. FFAI_DIANA_NO_WINOGRAD=1 and FFAI_DIANA_SOFTMAX_LIBM=1 restore the old arithmetic.
Does the 4.2 percent allocator figure apply to Diana 0.11?
No. Diana 0.11 adds a rusty_alloc 2.4.0 pin. The 4.2 percent figure is that allocator's own benchmark, and the FFAI commit says the allocator comparison inside FFAI was not re-run.
What about Argus and Mercury in this FFAI round?
Argus moved only dependency pins, including rusty_alloc 2.4.0 in its 0.10.0 crate, with no new measurement. Mercury has copy-reduction work on the FFAI master branch after its published 1.1.0 crate. That work is unreleased and reported as counters, not time.
Who is affected by the Diana 0.10 API change?
Code that calls the depthwise3x3 function directly. That function gained an act argument in 0.10, which is a breaking change for those callers. The tracker's public nested-vector API was kept as wrappers around the new flat cost matrix.

