ClarifAI Python API : Passing image captured from Webcam, to API, without saving on hard drive

I am using ClarifAI python API to classify objects capture from my Raspberry PI camera. (the whole program runs on python on raspberry PI).

Now, the two ways in which this [Python API] could be used is:

1> passing the path of the image in hard drive as argument while calling API.
2> passing the URL of the image as argument while calling API.

Now, I want to directly pass the image captured by my Pi Camera, using picamera library to this API, and get the tags, without saving it on the hard drive. How can I do it? What kind variable I should be using to store the image data and for passing it on ?

Answers


It looks like there's a few ways to go about it.

1) Use the capture function in picamera to save the file, push the file to Clarifai's function tag_images, then delete the file from the drive

2) Post the captured image's bytes to the Imgur (or similar) API and push the resulting URL to Clarifai's tag_image_urls function

3) Use REST instead of the Clarifai Python library and push the image bytes to the /tag endpoint


Need Your Help

Upload photo/file to server PHP

php ajax

I am unable to successfully upload an image/file to my server. The php is as follows:

PowerPoint 2003 with PowerPoint 2007 compatibility pack save as pptx

c# vsto powerpoint compatibility office-interop

I want to create and save a PowerPoint presentation as PPTX using PowerPoint 2003 PIA, with office 2007 compatibility pack installed? Is it possible how do i achieve this?