The Rockchip visual program, which continuously outputs 30 FPS, is entirely possible to display the scene hundreds of milliseconds ago. Alarms or human-computer interaction items should be counted from the time of collection to the time the results are displayed or the message is sent.
Post a timestamp to the same frame
Record collection, enqueuing, inference start, inference end and output time. Use the same monotonic clock and pass the frame number. When the camera has its own clock, the clock domain needs to be specified, otherwise the timestamps of the two devices cannot be directly subtracted.
Estimating backlog using queue depth
Taking a uniform input of 30 frames per second as an example, a backlog of 9 frames corresponds to an input time span of approximately 300 milliseconds. If the model execution only takes more than ten milliseconds but the result is still half a beat slower, first check the queue length and frame loss strategy of decoding, display or network transmission.
Choose according to task definition
Real-time preview can take the latest frame first. Tasks that require frame-by-frame storage should design capacity, disk placement, and backpressure. Only by recording the high-percent delay, number of frames processed, and number of discarded frames can we judge whether “faster picture” sacrifices the integrity required by the business.
The delay that can be separated from the four timestamps
| time period | Description |
|---|---|
| Collect to join the team | Driver delivery and preprocessing |
| Join the team to start inference | Scheduling waiting or backlog |
| Reasoning from start to completion | Model operation |
| Complete to output | Post-processing and display or transmission |
Board documentation and references

- ArmSoM Sige7 · hardware and interface manual · Sige7 · product page
- Rockchip RKNN Model Zoo
- Building a Reproducible Camera Pipeline with V4L2 and GStreamer
