• Jason Quevauvilliers 12
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am currently working with Einstein Vision for image prediction. I have made my own model and datasets and I have managed to do the image prediction successfully. However I am struggling with the Feedback aspect of Einstein. 

When doing a Prediction you can send it an image which is either on your local drive using the 'sampleContent' parameter, or you can send it an online image using the 'sampleLocation' parameter. 

Online Image:
curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "sampleLocation=http://einstein.ai/images/546212389.jpg" -F "modelId=<MODEL_ID>" https://api.einstein.ai/v2/vision/predict

Local Image:
curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "sampleContent=@C:\Users\JasonQ\Desktop\testImage.jpg" -F "modelId=<MODEL_ID>" https://api.einstein.ai/v2/vision/predict

However when doing a feedback call you have to use the 'data' parameter to pass the image. This only seems to support local images on your computer and not online images.

How it works:
curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "modelId=<MODEL_ID>" -F "data=@C:\Users\JasonQ\Desktop\testImage.jpg" -F "expectedLabel=Beaches" https://api.einstein.ai/v2/vision/feedback

What I want to achieve:
curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "modelId=<MODEL_ID>" -F "data=http://einstein.ai/images/546212389.jpg" -F "expectedLabel=Beaches" https://api.einstein.ai/v2/vision/feedback

Is it possible to do the feedback with an online image?
Also how would this change when I use apex instead of Curl to do the post?(I understand how to do a predict call in apex using base64Encode. Would it be similar?)

Thanks!
I am currently working with Einstein Vision for image prediction. I have made my own model and datasets and I have managed to do the image prediction successfully. However I am struggling with the Feedback aspect of Einstein. 

When doing a Prediction you can send it an image which is either on your local drive using the 'sampleContent' parameter, or you can send it an online image using the 'sampleLocation' parameter. 

Online Image:
curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "sampleLocation=http://einstein.ai/images/546212389.jpg" -F "modelId=<MODEL_ID>" https://api.einstein.ai/v2/vision/predict

Local Image:
curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "sampleContent=@C:\Users\JasonQ\Desktop\testImage.jpg" -F "modelId=<MODEL_ID>" https://api.einstein.ai/v2/vision/predict

However when doing a feedback call you have to use the 'data' parameter to pass the image. This only seems to support local images on your computer and not online images.

How it works:
curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "modelId=<MODEL_ID>" -F "data=@C:\Users\JasonQ\Desktop\testImage.jpg" -F "expectedLabel=Beaches" https://api.einstein.ai/v2/vision/feedback

What I want to achieve:
curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "modelId=<MODEL_ID>" -F "data=http://einstein.ai/images/546212389.jpg" -F "expectedLabel=Beaches" https://api.einstein.ai/v2/vision/feedback

Is it possible to do the feedback with an online image?
Also how would this change when I use apex instead of Curl to do the post?(I understand how to do a predict call in apex using base64Encode. Would it be similar?)

Thanks!
Hi All,
I am trying to add feedback to my current Einstein model, but I can see we can only pass data value from our local. Is there a way to add samplebase64 content as the parameter in my call.