Forums - TF NonMaxSuppression V3 operator support by SNPE

5 posts / 0 new
Last post
TF NonMaxSuppression V3 operator support by SNPE
shubham.jain
Join Date: 28 May 20
Posts: 4
Posted: Thu, 2020-05-28 23:34

Hi, I have a model trained using TF 1.12 for object detection. I use tf.image.non_maximum_suppression () for NMS operation. When I am attempting to convert this model into a DLC, the SNPE converter gives me the below warning and error message:

 - 174 - WARNING - WARNING_TF_OP_NOT_SUPPORTED: Operation (Post_Processing/NMS/non_max_suppression/NonMaxSuppressionV3) of type (NonMaxSuppressionV3) is not supported by converter.

 - 164 - ERROR - Conversion failed: ERROR_TF_OPERATION_NOT_MAPPED_TO_LAYER: Some operations in the Tensorflow graph were not resolved to a laye

But when I try to run the example model - MobilenetSSD (which also contains the NonMaxSuppressionV3 operation) given in the SNPE documentation, I was able to perform inference using the DLC generated. So, I want to know if I can use NMS operation of TF in my object detection model which will be supported by SNPE?

Note: SNPE v1.37 was used for above mentioned experiments.

I kindly request the SNPE developers and my fellow developers to respond to my query. 

  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Mon, 2020-06-01 20:41

Hi Shubham,

TF NonMaxSuppression V3 Operation is not currently supported by NPE.

You can find the supported layers info from the following link,
https://developer.qualcomm.com/docs/snpe/network_layers.html

  • Up0
  • Down0
shubham.jain
Join Date: 28 May 20
Posts: 4
Posted: Tue, 2020-06-02 22:50

Hi,

Thanks for the response. I read the link shared but I am unable to understand that if TF's NonMaxSuppression V3 is not supported then how the example model of MobilenetSSD (which also uses NonMaxSuppression V3) is running fine.

Please share your thoughts on this.

  • Up0
  • Down0
carlos1
Join Date: 16 Mar 20
Posts: 5
Posted: Mon, 2020-06-08 06:00

Hi,

I have been debugging the SNPE code and it seems they have several hacks in the convertion tool to support the some examples (I think they do these things to try to hide the limitions of the SDK and transmit a better "first impression").

You can go to:

  - lib/python/snpe/converters/tensorflow/layers/non_max_suppression.py

  - lib/python/snpe/converters/tensorflow/layers/ssd.py

  - lib/python/snpe/converters/tensorflow/sequence/ssd.py

to see how they handle the NonMaxSuppression layer for mobilenetSSD

  • Up0
  • Down0
shubham.jain
Join Date: 28 May 20
Posts: 4
Posted: Wed, 2020-06-10 20:25

Hi,

Thanks for your response. I will look into the files you mention. Additionally, if you are able to use TF's NMS operation and generate DLC, kindly help me with the same. 

 

  • 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.