I have RAW frame data in an unsigned char* array. I want to convert it to UserBuffer and then push it to the model. The example provided in the SNPE SDK reads a file and then use it. I am not sure how to use the UserBuffer in the right way.
Can anyone help me with that?
How to use UserBuffer in C++
Posted: Thu, 2022-10-20 03:26
Dear developer,
You can review the source cpp code at main.cpp for line of createInputBufferMap(inputMap, applicationInputBuffers, snpeUserBackedInputBuffers, snpe, true, bitWidth);
This interface was defined at CreateUserBuffer.cpp.
Please help to take a look at above definition.
BR.
Wei
Hello Wei,
Thanks for your response.
This is the code I found to get the result of the detection. The result is written in raw format. I am not sure, in which index there is bounding boxes, labels or confidence. There is no documentation or any instruction about this. Can you please help me with that?
BR,
Sohan
Hi Sohan,
You can use the createUserBuffer API from SNPE C++ Native API to create your own custom input buffer.
Please take a look into the documentation in below link for the same,
https://developer.qualcomm.com/sites/default/files/docs/snpe/group__c__p...
Also you can use the createTensor API for the same,
For more detailed understanding, go through the sample implemented for your reference,
https://github.com/globaledgesoft/person-detection-snpe-ros2-cpp-api-rb5...
Regards,
Sahil Bandar