首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法使用openvino模型

无法使用openvino模型
EN

Stack Overflow用户
提问于 2020-04-17 13:17:45
回答 1查看 140关注 0票数 0

我正在使用person-detection-action-recognition-0005预训练模型从openvino,以检测人和他们的行动。

0005.html

通过上面的链接,我编写了一个python脚本来进行检测。

这是剧本。

代码语言:javascript
运行
复制
import cv2 

def main():

    print(cv2.__file__)

    frame = cv2.imread('/home/naveen/Downloads/person.jpg')

    actionNet = cv2.dnn.readNet('person-detection-action-recognition-0005.bin',
                    'person-detection-action-recognition-0005.xml')


    actionBlob = cv2.dnn.blobFromImage(frame, size=(680, 400))
    actionNet.setInput(actionBlob)

    # detection output
    actionOut = actionNet.forward(['mbox_loc1/out/conv/flat',
                'mbox_main_conf/out/conv/flat/softmax/flat',
                'out/anchor1','out/anchor2',
                'out/anchor3','out/anchor4'])


    # this is the part where I dont know how to get person bbox
    # and action label for those person fro actionOut

    for detection in actionOut[2].reshape(-1, 3):
        print('sitting ' +str( detection[0]))
        print('standing ' +str(detection[1]))
        print('raising hand ' +str(detection[2]))

现在,我不知道如何从输出变量(ActionOut)获取bbox和操作标签。我找不到任何文件或博客解释这一点。

有人有什么想法或建议,怎么做呢?

EN

回答 1

Stack Overflow用户

发布于 2020-04-18 07:50:02

有一个名为smart_classroom_demo链接的演示程序,这个演示程序使用您要运行的网络。

对输出的解析位于这里,实现在C++中,但是它应该帮助您理解如何解析网络的输出。

希望能帮上忙。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61272635

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档