Forums - Model not building for DSP

3 posts / 0 new
Last post
Model not building for DSP
karlo.basioli
Join Date: 29 Jun 23
Posts: 2
Posted: Thu, 2023-06-29 05:15
I am trying to execute the `Color space conversion` operation to convert the input from NV21 to RGB on the DSP, but have found that only on the 865 chipset am I able to load and build the quantized SNPE model with the C++ SNPE v2.10 SDK.

The `Color space transform` operation is supported on the DSP according the official documentation: https://developer.qualcomm.com/sites/default/files/docs/snpe/network_layers.html

Summary of failure case:
1. Dummy ONNX model that returns its input (identity model) is converted via `snpe-onnx-to-dlc` with `ColorTransform` operation, specified via `--input_encoding nv21 rgb`
2. Quantize using the `snpe-dlc-quantize` tool.
3. Using the SNPE v2.10.0 C++ SDK, load and build the model (using the `zdl::SNPE::SNPEBuilder`) with DSP target device.
4. Execute the built binary. Upon building the quantized DLC model, it fails since a `nullptr` is returned

It works if the target device is GPU or CPU, but fails for DSP on the 8 Gen 1 and 8 Gen 2 chipsets; but it does work on the DSP of the 865 chipset!

Is there any possible workaround for this because I want to execute this layer on the DSP on the newer chipsets.

I have verified that I can run other quantized models on the DSP of the newer devices so it seems that the problematic operation is the color transformation one.

Here are the unquantized and quantized models https://drive.google.com/drive/folders/1iZB6WQVmFwjPQWvtHCQkWgBpzVC7H6oN?usp=drive_link

Thank you for your help.
  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Fri, 2023-06-30 04:19

Dear developer,

Thanks for sharing. We will take a look and get back to you.

BTW, what's usecase this model for?

  • Up0
  • Down0
karlo.basioli
Join Date: 29 Jun 23
Posts: 2
Posted: Mon, 2023-07-03 08:48

Hi! 

 

Thank you for your answer.

We are fetching NV21 images from an Android camera and we want to convert them to RGB for an object detection model.

 

Best,

Karlo Basioli

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