Board Evaluation
Board evaluation includes two categories: performance evaluation and accuracy evaluation.
Performance evaluation is used to assess the inference performance of the model. During evaluation, the primary focus is on two metrics: single-frame inference latency (Latency) and inference throughput (FPS).
- Latency refers to the time required for a model to complete a single inference. It mainly focuses on the system’s response speed to an individual request. The latency measurement starts when input data preparation is completed and ends when the inference result is obtained, and is measured in milliseconds (ms). If inference is performed using the asynchronous UCP interface, latency statistics are measured from the call to hbDNNInferV2 until the return of hbUCPWaitTaskDone.
- FPS represents the number of inference frames the system can process per unit time, reflecting the overall throughput of the system, and is measured in frames per second.
Accuracy evaluation is used to assess the correctness and consistency of model inference outputs in the deployment environment.
We provide the hrt_model_exec tool and the hbm_infer tool to facilitate model inference performance and accuracy evaluation.
-
When conducting model inference performance evaluation, ensure that no other programs occupy resources during the evaluation period.
-
On different platforms (J6E/M/P/H/B, etc.), performance evaluation results may vary due to differences in hardware capabilities.
Evaluation Using hrt_model_exec Tool
hrt_model_exec is a model execution tool that can be used directly on the development board to obtain model information, perform single-frame inference, and evaluate model inference performance.
The source code for the tool is located at samples/ucp_tutorial/tools/hrt_model_exec. The tool’s environment setup and three example usage scenarios are as follows:
For a more detailed introduction to the hrt_model_exec tool, please refer to Model Inference Tools - The hrt_model_exec Tool.
Evaluation Using hbm_infer Tool
To improve the efficiency of accuracy evaluation, the toolchain provides the hbm_infer tool, which allows you to perform model pre- and post-processing on the X86 side using Python code, while the actual inference is executed by the board-side server. It is better suited for evaluation on large datasets. A basic single-process usage example is as follows:
For a more detailed introduction to multi-process evaluation, model chaining, and transmission optimization using the hbm_infer tool, please refer to Model Inference Tools - The hbm_infer Tool.
