Forums - How to get multiple outputs from MobilenetSSD?

2 posts / 0 new
Last post
How to get multiple outputs from MobilenetSSD?
anton.chivkunov
Join Date: 7 May 20
Posts: 2
Posted: Wed, 2020-06-03 07:08
After sucessful convertion of MobilenetSSD and performing inference with it from native c++ code, I was not able to get outputs other than "detection_classes:0", even if two more nodes should be there: "--out_node detection_classes --out_node detection_boxes --out_node detection_scores". But outputTensorMap, which I get from execute() contains only "detection_classes:0".
"
The output layers for the model are:
- Postprocessor/BatchMultiClassNonMaxSuppression
- add
 
The output buffer names are:
- (classes) detection_classes:0 (+1 index offset)
- (classes) Postprocessor/BatchMultiClassNonMaxSuppression_classes (0 index offset)
- (boxes) Postprocessor/BatchMultiClassNonMaxSuppression_boxes
- (scores) Postprocessor/BatchMultiClassNonMaxSuppression_scores
"
 
I suspected that I can find something in buffers, but when I try "getInputOutputBufferAttributes(name)" with different names, only "detection_classes:0" returns something.
Not sure how I can get access to remaining part of data?
  • Up0
  • Down0
elvin.nnov
Join Date: 4 Feb 20
Posts: 4
Posted: Mon, 2020-06-08 12:02

You need explicitly add "Postprocessor/BatchMultiClassNonMaxSuppression" layer as output before loading network to SNPE.

After this, there will be three additional buffers after execute. One of the buffer would be some kind of duplicated - buffer which would be responsible for classes. The difference - the buffer "detection_classes:0" is a buffer after add operation and will have class id starting from 1 while "Postprocessor/BatchMultiClassNonMaxSuppression_classes" buffer will have class id starting from 0

You can take a look in object detection sample here: https://github.com/elvin-nnov/dldt_tools/blob/feature/amalyshe/snpe_vali...

One more note - it seems there was a bug in SNPE 1.36 and some class id were wrong if model was executed on DSP. This problem disappeared in 1.38 and in 1.39 (have not verified on 1.37)

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.