【问题标题】:Unable to use openvino model无法使用 openvino 模型
【发布时间】:2020-04-17 13:17:45
【问题描述】:

我正在使用来自 openvino 的 person-detection-action-recognition-0005 预训练模型来检测人员及其行为。

https://docs.openvinotoolkit.org/latest/_models_intel_person_detection_action_recognition_0005_description_person_detection_action_recognition_0005.html

从上面的链接,我写了一个 python 脚本来获取检测。

这是脚本。

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 和动作标签。我找不到任何解释这一点的文档或博客。

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

【问题讨论】:

    标签: opencv openvino


    【解决方案1】:

    有一个名为smart_classroom_demo的演示:link 此演示使用您尝试运行的网络。
    输出的解析位于here 该实现是在 C++ 中实现的,但它应该可以帮助您了解如何解析网络的输出。

    希望它会有所帮助。

    【讨论】:

      猜你喜欢
      • 2022-11-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多