cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CMHants
Level: Powered On

Pass the custom vision service an image from powerapps

Hi All, I've built an image classifier in the custom vision service that works great. The problem is how on earth do I pass it images from PowerApps. I've tried to use flow and the requirements are a bit bewildering. Do you know if the custom vision options inside powerapps are working, i cant find an example of the syntax required anywhere. current app flow is add a photo of a leaf in the add media control -> leaf photo added to collection - > then who knows, all i want to do is pass to the classifier ? Any help is greatly appreciated happy new year people

 

so a bit of an update - It turns out that its impossible to pass an image from the add media control, after much research the best way to do it is apparently configure a web service and set up a custom connector to trigger it. so far i've got this. the problem comes when i try pass an image file, i get what i think is a http output that flow opens in a new browser window, and ideas how i can parse it to a json schemaflow and powerapps.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
CMHants
Level: Powered On

Re: Pass the custom vision service an image from powerapps

Morning @v-xida-msft,

 

Thanks for your reply, I actually solved this myself after much soulsearching and anguish.

 

I had overlooked the native PowerApps functions for passing an image over to the custom vision service, assuming that they didn't work, when actually they work fine. I used the below formula after setting up the connector.

 

ClearCollect(PredictionOutcome,CustomVision.PredictImag("c56044c48086xx464595d6f28xxecc596axxb",UploadedImage4.Image))

 

this passed my added image to the CV service without the need for flow, I think i was distracted by all the talk in the community about the use of compose functions to handle images.

 

Anyway thanks for your help 

 

all the best

4 REPLIES 4
CMHants
Level: Powered On

Re: Pass the custom vision service an image from powerapps

i should probably say, I dont know if its relevant, the classifier detects disease in tomato leaves
Community Support Team
Community Support Team

Re: Pass the custom vision service an image from powerapps

Hi @CMHants,

Could you please share a bit more about your issue?

Do you want to pass a image file captured via "Add Picture" control to your flow?

Further, do you want to convert the HTTP output into a JSON format within your flow?

If you want to pass a image file captured via "Add Picture" control to your flow, please check and see if the following blog or video would help in your scenario:

http://repointtechnologies.com/saving-images-from-powerapps-to-sharepoint/

https://www.youtube.com/watch?v=mp-8B1fLrqs&feature=youtu.be

 

In addition, the HTTP output in your flow is actually a JSON data format. In default, the data output format of the HTTP action (including "When a HTTP request is received" trigger) within MS Flow is a JSON format (application/json).

If you want to convert the HTTP output in your flow into a JSON format, I think it is not necessary.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
CMHants
Level: Powered On

Re: Pass the custom vision service an image from powerapps

Morning @v-xida-msft,

 

Thanks for your reply, I actually solved this myself after much soulsearching and anguish.

 

I had overlooked the native PowerApps functions for passing an image over to the custom vision service, assuming that they didn't work, when actually they work fine. I used the below formula after setting up the connector.

 

ClearCollect(PredictionOutcome,CustomVision.PredictImag("c56044c48086xx464595d6f28xxecc596axxb",UploadedImage4.Image))

 

this passed my added image to the CV service without the need for flow, I think i was distracted by all the talk in the community about the use of compose functions to handle images.

 

Anyway thanks for your help 

 

all the best

UpenXcube
Level: Power Up

connect powerapps directly to CustomVision

Hi Team,

 

I am trying to use CustomVision through powerapps. i am getting following error, i dont know why.

 

CustomVision.PredictImage failed: { "error": { "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." } }

 

I am trying to call a customvision using prediction key.

Please help!

 

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 123 members 4,567 guests
Please welcome our newest community members: