dear all,
how to use SNPE API to get object's coordinate and draw the box when classifying the objects?
thanks
dear all,
how to use SNPE API to get object's coordinate and draw the box when classifying the objects?
thanks
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.
Hi,
This question is outside of SNPE API scope and is more in application domain. It is a function of the DL model that you load and run through SNPE. In this particualr case you seem to be interested in DL models designed to do object detection, like SSD or Faster RCNN. Interpreting object coordinates is very much dependent on the DL model used, so you would need to understand that from the model output format. Drawing bounding boxes is largely target platform dependent, and requires some image manipulation support, like openCV for example. There are many ways to do it. Probably best to search online based on your setup.
Hope this helps.
Best regards.
Is it possible to get Detection coordinates/Bounding boxes as output when using Mobilenet-ssd on snpe ?
Kindly read the date from the raw file generated with the following python code and find the explanation below on how to parse the output.
Explanation:
res[0, 1] will be ID for the label, as it was trained on VOC Label 6 which belongs to the bus.
res[0, 2] represent the probability of the predicted object, it is 0.9992 here
res[0, 3:7] are the scaled X1, Y1 & X2, Y2 Values respectively.
For re-scaling it Multiply X1 & X2 with Width of image & Y1 & Y2 with the Height of the image, and cast it to the Integer.
This gives the bounding box for the object predicted.
Command to convert the caffe model to dlc:
$ snpe-caffe-to-dlc --input_network MobileNetSSD_deploy.prototxt --caffe_bin MobileNetSSD_deploy.caffemodel --output_path caffe_mobilenet_ssd.dlc