- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using OpenVino 2022.1.
In previous version 2021.4, use
res = exec_net.requests[cur_request_id].outputs[out_blob] as
but now in 2022.1, I tried to use
detection_classes = exec_net.requests[cur_request_id].output_blobs['detection_classes']
but got "KeyError: 'detection_classes'" error.
in model.xml, the output lay defined as the followings,
<output value="['detection_classes', 'detection_scores', 'detection_boxes', 'num_detections']"/>
what's wrong with my code?
can anyone give me some hint?
regards
sidney
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sidney,
Thanks for reaching out to us.
You’re getting "KeyError: 'detection_classes'" error because there is no such layer name in the XML file.
The output layers defined in the model.xml are from the original model’s output layers, which are ‘detection_classes', 'detection_scores', 'detection_boxes' and 'num_detections. After converting into IR, the converted model only has an array of summary detection information, named as ‘DetectionOutput’ if the model is ssd_mobilenet_v1_coco.
On another hand, you can get the output layer name in XML file with Netron or with coding:
out_blob=next(iter(net.outputs))
print(out_blob)
Regards,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sidney,
This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.
Regards,
Peh
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page