Forums - Mobilenet SSD caffe model

7 posts / 0 new
Last post
Mobilenet SSD caffe model
Jacob_Ke
Join Date: 24 Aug 17
Posts: 10
Posted: Wed, 2018-07-04 02:39

HI,

In release note, Version 1.15.0 Support MobilenetSSD (Caffe)

I use the following MobilenetSSD source, but failed to convert model to DLC 

https://github.com/chuanqi305/MobileNet-SSD

error message:

/host/snpe-1.15.0/lib/python/snpe/snpe_caffe_to_dlc.py:2388: RuntimeWarning: error_code=1000; error_message=Layer is not supported. Layer detection_out of type SsdDetectionOutput not supported by GPU runtime; error_component=Model Validation; line_no=257; thread_id=140164480030464 confidence_threshold=params.confidence_threshold)
 

 

Can you provide any MobilenetSSD caffe model?

 

Thanks

 

  • Up0
  • Down0
jihoonk
Profile picture
Join Date: 28 Jan 13
Location: Seoul
Posts: 55
Posted: Tue, 2018-07-17 19:32

Hi Jacob_Ke,

The message is just warning not error. Please check current folder after running the conversion command. DLC file would be generated. Make sure to turn on CPU fall-back option when you execute the dlc because the SSD DetectionOutput layer is not supported on GPU and DSP.

Thanks,

Jihoon

  • Up0
  • Down0
Jacob_Ke
Join Date: 24 Aug 17
Posts: 10
Posted: Wed, 2018-07-25 02:33

Thanks!

  • Up0
  • Down0
svenzhang
Join Date: 18 Jun 18
Posts: 9
Posted: Sun, 2018-08-05 18:51

Hi jihoonk,

I'm running MobileNet SSD with DSP, the model is quantized by PC tool. But I can not get the right output from user buffers.

I changed the output buffer's codec as following way:

       if (std::string::npos != std::string(name).find("Preprocessor/sub")){
           userBufferEncoding.reset(new zdl::DlSystem::UserBufferEncodingTf8(128, 0.007812));
           LOGI("SNPE quantize(%s): set input parameter", name);
       }
       else if (std::string::npos != std::string(name).find("detection_classes:0") )
       {
           userBufferEncoding.reset(new zdl::DlSystem::UserBufferEncodingTf8(0, 0.3373)); //
           LOGI("SNPE quantize(%s)detection_classes: set output parameter", name);
       }
       else if (std::string::npos != std::string(name).find("Postprocessor/BatchMultiClassNonMaxSuppression_scores")
            || std::string::npos != std::string(name).find("Postprocessor/BatchMultiClassNonMaxSuppression_boxes")
            || std::string::npos != std::string(name).find("Postprocessor/BatchMultiClassNonMaxSuppression_classes") )
       {
           userBufferEncoding.reset(new zdl::DlSystem::UserBufferEncodingTf8(0, 0.003922));
           LOGI("SNPE quantize(%s): set output parameter", name);
       }

Looking for your input. Thank you~

 

  • Up0
  • Down0
jihoonk
Profile picture
Join Date: 28 Jan 13
Location: Seoul
Posts: 55
Posted: Sun, 2018-08-05 21:12

Hi svenzhang,

Did you set enviorment variables properly? If not, refer to below guide.

https://developer.qualcomm.com/docs/snpe/dsp_runtime.html

DSP runtime accepts non-quantized network models as well. In DSP mode, SNPE applies quantization in initialization step automatically.

Thanks,

Jihoon

 

 

 

 

  • Up0
  • Down0
linnanbryant
Join Date: 2 Jan 19
Posts: 9
Posted: Thu, 2019-01-10 19:27

Hi,

i have tried to use the mobilenetSSD dlc model in my test program, and i also use the API setCPUFallbackMode(), still can not run the pragram, and error occured in the setBuilderOptions, error message is "Floating point exception" when using cpu mode, "Segmentation fault" when using gpu mode, could you please help check with this error?By the way, i use SNPE version 1.15.

  • Up0
  • Down0
pratibha.b
Join Date: 4 Jun 20
Posts: 1
Posted: Fri, 2021-03-12 03:00

Hi,

I am using following command to convert caffe model (as specified in qualcomm site)to dlc:

> snpe-caffe-to-dlc --input_network MobileNetSSD_deploy.prototxt --caffe_bin MobileNetSSD_deploy.caffemodel --output_path caffe_mobilenet_ssd.dlc

During conversion getting the following warning (rather dlc is being created):

RuntimeWarning: info_code=1000; message=Layer is not supported. Layer detection_out of type SsdDetectionOutput not supported by GPU runtime; component=Model Validation; line_no=353; thread_id=140679599646464

But while running the snpe-dlc-info command on model it is showing "detection_out" layer  out_size as follow:
 
100 | detection_out           | ssd_detection_output | mbox_loc                 | detection_out            | 1x1x0x7      | A D   C  | num_ classes: 21                   |
|     |                         |                      | mbox_conf_flatten        |                          |              |          | share_location: True               |
 
Due to this while testing dlc it is giving empty ouput.
 
 

 

 

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