Toybrick

demo 推理耗时长

板蓝根

注册会员

积分
187
发表于 2020-9-24 10:53:47    查看: 6205|回复: 0 | [复制链接]    打印 | 显示全部楼层
http://t.rock-chips.com/forum.ph ... &extra=page%3D1

参考上面的 demo 把USB 摄像头改成本地 h264码流。平均每帧耗时70ms 请问这个效率正常吗?

cost_time=3 ms              
rga ok                       
detect_time = 6954ms


detect_time 推理计算的代码 没有改动

        start_time = get_time();
        ret = rknn_api.inference(rgbImg.data,
                                           img_width *
                                           img_height *
                                           img_channels,
                                           out_data->out);
        if (ret < 0) {
                printf("inference fail! ret=%d\n", ret);
                goto Error;
        }

        end_time = get_time();

        detect_count++;
        detect_time += (end_time - start_time);

        if (detect_count > 100) {
                printf("detect_time = %dms\n", detect_time);
                detect_count = 0;
                detect_time = 0;
        }



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表