If inference throughput looks right but a USB-camera pipeline publishes results in bursts, measure per-frame latency from input to result. Separate capture cadence from application queuing.
Consider a factory bench prototype that detects missing parts. Camera frames pass through host preprocessing, a machine-learning accelerator and result logging. The first frame may wait for a batch even when completions per second are adequate. The question is how many results meet the deadline at the same input cadence as queue and submission strategy change, not how many frames the camera missed or whether the clock is good.
Count completions and per-frame delay separately
Throughput is completed frames divided by the observation time. Latency runs from the project's defined input event to the corresponding usable result. If it starts at application receipt, call it application-to-result latency, not exposure-to-alert latency. Log frame IDs and events such as enqueue, accelerator submission, return and postprocessing completion to explain bursts.
In an application that waits for a group, earlier frames wait longer for it to fill than the last frame. Whether hardware supports native tensor batching depends on the model and runtime. Here a batch means the application collects frames and publishes together, which can also happen around per-frame accelerator calls. A fast call does not include copies, scheduling or publication unless measured that way.
For a custom carrier that requires 24 MHz CMOS, SCTF SX2M24.000B10F20TNN is a candidate: 24 MHz, 3.3 V, active output in a four-pad 2520 package. It is not the confirmed BOM of an AI board or camera, and does not guarantee accelerator compatibility. Check supply, load and receiver only where this interface is required. Oscillator frequency is separate from queue strategy.
Worked example: the same 25 fps, but only half meet deadline
Inject one frame every 40 ms. Four frames enter at 0, 40, 80 and 120 ms. Submit when the fourth arrives. If processing all four takes 60 ms and results are published together at 180 ms, delays are 180, 140, 100 and 60 ms. With a 130 ms input-to-result deadline, only the last two pass, or 50%, despite no lost results.
Batches arrive 160 ms apart. With constant 60 ms service and no additional congestion, steady-state throughput can still be 25 fps. Results arrive in groups and individual latency repeatedly rises and falls. Under an alternative assumption of immediate per-frame submission with 25 ms processing and publication and no queue, all four meet the deadline. The figures are hypothetical, not accelerator measurements or proof that per-frame submission is more efficient.
Use injected frames as the denominator. Count on-time, late and missing results separately, including dropped IDs and reasons where overload policy permits discards. A shorter mean must not hide missing detections. With enough samples, inspect tail latency and judge every frame against the agreed deadline.
Replay known frames at the same cadence before changing the camera
Keep the original application logs and use application receipt, submission and publication as observation points. In an isolated test, replay the same numbered content at the same input. Record actual injection timing rather than assuming a 40 ms script wakes exactly on time. Keep model, resolution, preprocessing and output fixed while comparing individual submission with groups of four. Record warmup and steady state separately so workload does not confound the strategy comparison.
Add queue depth and actual submit and completion times. Regular input but submissions tied to the last frame point to batching or publication. Regular submission followed by clustered completions warrants checking runtime scheduling, resources or return. If enabling inference also slows application receipt, check whether slow processing blocks acquisition in the same process. A full queue can push waiting upstream through backpressure; that is not a sudden change of camera oscillator frequency.
Then verify with the real camera. Replay only diagnoses the chain after injection and bypasses USB and acquisition. If only live input fails, retain camera timestamps or IDs and host receipt times. Do not subtract across unaligned time domains; use a common reference or control event. Screen updates are not necessarily individual inference completions.
Joint engineering and purchasing checklist
| Check | Engineering record | Purchasing and quality record |
|---|---|---|
| Input cadence | Same content, frame IDs and actual injection time | Board, camera and connection |
| Inference queue | Group size, wait, submit and completion times | Accelerator option, firmware and runtime |
| Per-frame deadline | Start/end definition, late and missing counts | Separate application and whole-product latency |
| Board clock | Verify measurements only for the actual interface | Full model, rated voltage, frequency and lot |
Compare an initially empty queue with one that retains work from a prior run. The latter can lengthen the first batch wait. Define whether to clear, drain or deliberately retain it as a recovery case.
Frequently asked questions
Can a more accurate oscillator make results arrive uniformly? Not by default. If bursts align with batching, scheduling or publication, a tighter reference will not remove the wait. Compare policy on the same replay and use hardware evidence to identify any separate clock issue.
Can we accept single-frame submission once the average is lower? Verify both throughput and per-frame deadlines under supported loads. Individual submissions can queue at peaks. Retain tail, incomplete-frame and overload results rather than one light-load average.
