Forums - Feed images into snpe model without input_lists.txt

5 posts / 0 new
Last post
Feed images into snpe model without input_lists.txt
22imonreal
Join Date: 10 Feb 21
Posts: 80
Posted: Mon, 2021-07-05 09:03

How can one feed 4 camera feeds directly into snpe without having it read from the input_lists.txt list of raw files? Can one not avoid having to read and write the images to files and instead capture them with OpenCV and directly feed them as cv::Mat objects into the snpe object and ML model?

Thanks,

  • Up0
  • Down0
kevin.dai
Join Date: 21 Oct 20
Posts: 137
Posted: Wed, 2021-07-07 14:06

Hi 22imonreal

I have not understand your qestions clearly , you have 4 camera streamings which will be used for SNPE?

What do you mean one feed? In general , each of streaming could be directly inputed to SNPE without file reading/writing.

Please provide more information about your use case.

Thanks

Kevin

 

  • Up0
  • Down0
kevin.dai
Join Date: 21 Oct 20
Posts: 137
Posted: Thu, 2021-07-08 11:26

You can start 2 threads, one is for camera streaming capture and preocess, the streaming image will stored in buffer which will be used for another process for SNPE inference. The SNPE inference thread will do SNPE processing.

How do you think about it.

  • Up0
  • Down0
22imonreal
Join Date: 10 Feb 21
Posts: 80
Posted: Fri, 2021-07-09 01:22

Hello and thanks for the prompt reply.

Yes, I will have 4 cameras and will have to combine the frames from 2 cameras at each timestamp into a single 640, 320, 6 tensor that should then be inputed into the model directly.

How do I capture the camera feed into a buffer, then process the images, then recombine the frames into a tensor in another buffer and finally feed this last buffer into the model using snpe without the need to read and write files using different processes as you suggested?

(The only examples I have seen take the inputs from an input_list.txt (see snpe-net-run and snpe-sample applications provided by Qualcomm))

Thanks.

  • Up0
  • Down0
kevin.dai
Join Date: 21 Oct 20
Posts: 137
Posted: Fri, 2021-07-09 10:47
  • 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.