benchmark
最后更新
modelconverter.platforms.rvc2.benchmark在 RVC2 设备上对转换后的模型进行基准测试。通过 DepthAI 基准测试管道在连接的 RVC2 设备上运行 .blob 或 NN 存档,向其馈送模型声明形状的随机数据,并报告设备记录的吞吐量和推理延迟。类
RVC2Benchmark
方法
benchmark
Python
1def benchmark(configuration: Configuration) -> Result:configuration(Configuration): 用于基准测试的配置。default_configuration 的所有选项都必须存在。
Result:fps下的平均吞吐量和latency下的平均推理延迟(以毫秒为单位),如果设备完全没有记录延迟,则后者为"N/A"。
属性
all_configurations
default_configuration
Configuration options::repetitions: 要执行的重复次数(如果设置了benchmark_time则忽略)。benchmark_time: 基于时间的基准测试持续时间(以秒为单位)(覆盖repetitions)。input_fps: 发送输入的速率。-1删除限制。num_messages: 为每个报告测量的消息数量。num_threads: 用于推理的线程数。