cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Object Detection using images from a timeline in Dataverse.

Hi,

 

I'm attempting to use the object detection capabilities in AI builder in a Power Automate flow to take an image added to a timeline and then run a model against this to determine whether there is a specific object in that image.

 

I'm getting a record and then listing the notes on that record. In my solution there will only ever be one note at this point as this is triggering on the creation of the parent record. The note is then created straight away after (so yes a delay may be needed).

 

Eitherway, I am getting my file content in the 'documentbody' column of my note record.

 

I'm then using this as an input to my model but an additional amount of JSON is added to the content which I believe is causing things to fail.

 

If I do a simple flow with a file input and use the outputs from the trigger as the content, things work with the exact same file.

 

Could anyone suggest how to use file content from Dataverse and pass this through an AI builder object detection model?

 

I have also tried using the download a file action in Dataverse 

 

Thanks in advance

Lewis Baybutt

Microsoft MVP Business Applications

lowcodelewis.com

1 ACCEPTED SOLUTION

Accepted Solutions

Finally got it to work! It seems the object did work. So I needed to use the 'documentbody' value as my file content and the 'mimetype' as the content type in an object like below...

 

Screenshot 2023-02-15 at 18.17.55.png

Who knows what I was doing wrong with the object approach earlier but this works! Blog post upcoming! 🙂

 

Thanks for help 🙂

 

Thanks,

Lewis Baybutt

Microsoft MVP Business Applications

lowcodelewis.com

View solution in original post

8 REPLIES 8

More info - I have tried to simplify this by just triggering my flow on the creation of a record in the notes table then using the document dynamic content which I believe is the file content to use as the image input to my AI builder step for object detection. This still isn't happy as a supported file type. 😞

 

 

You should use this to upload your file to Dataverse

CedrickB_1-1676482994539.png

 

and this to retrieve and use the file content  

CedrickB_0-1676482944017.png

 

Hi Cedrick,

 

Thanks for this. I have tried this, and have used loads of different methods in compose actions to see what sort of content things are expecting. I am managing to make things work when using a manual trigger with a file input and then referencing that input from the trigger body in my AI builder step. This works.

 

Using the download a file or an image step works but then the AI builder step doesn't like that dynamic content as inputs. The outputs from the dataverse download action look right and would be what I expect to use as input for the next step. But when you then download the inputs of the AI builder step there is additional JSON at the start not found in the previous step outputs resulting in the input not being just file content. 

Forgive me using the dynamic content from the dataverse step looks like it just results in inputting a string being the file name. If you pass it through a compose first you seem to get the expected binary file content, but then additional JSON is added when you look at the run history on the AI builder object detection step.

 

Thanks,

Lewis Baybutt

Microsoft MVP Business Applications

lowcodelewis.com

"Download a file or an image" should retrieve the binary properly.

How did you save you file to dataverse? The problem may be there.

Did you use the "Upload to a file or an image" action?

I have noticed that doing something like getting file content from OneDrive or SharePoint and then using this works.

 

Using the outputs from my get file content step here, which include an object including both properties $content-type and $content and this working, suggests to me that the input should be an image object like this. 

Screenshot 2023-02-15 at 17.55.02.pngScreenshot 2023-02-15 at 17.59.05.png

 

So going back to my flow where I'm trying to get my file content from Dataverse...

First I am downloading the image with the download a file or an image action, even though I do see all of the file content, and details i.e. documentbody, mimetype etc in my retrieved Dataverse record...

Screenshot 2023-02-15 at 18.02.13.png

Then I'm trying to use the content out of this action. But given the outputs, I can understand in this case why not much is happening. These are the outputs which are nothing more than some text being the file name.

Screenshot 2023-02-15 at 18.05.29.png

 

So... okay instead I could try to get the content directly from my record where I can actually see binary file content, a content-type under mimetype etc...

Screenshot 2023-02-15 at 18.06.56.png

You can see I've got my file content and my file content-type now. When I try to put these together as an image object the AI model doesn't like that input and says the file type isnt supported. 

 

So maybe it doesn't want an object and maybe it just wants the binary file content?? So this is what the start of my file content looks like before it becomes an input to the AI builder step for object detection...

 

Screenshot 2023-02-15 at 18.08.25.png

 

Looks right. Now lets see that output ^ as an input to the AI builder step, with suddenly extra content added!

 

Screenshot 2023-02-15 at 18.10.46.png

 

Theres the additional bit at the front with the "item/requestv2/base64Encoded" property. Now comparing back to the OneDrive flow that worked, I would image we need the value of this property to be an image object with both $content-type and $content. That seemed to work before.

 

But using an image object as an input also doesn't seem to work and the property above seems to get generated itself. 

 

I'm now a bit lost 🙂 

Finally got it to work! It seems the object did work. So I needed to use the 'documentbody' value as my file content and the 'mimetype' as the content type in an object like below...

 

Screenshot 2023-02-15 at 18.17.55.png

Who knows what I was doing wrong with the object approach earlier but this works! Blog post upcoming! 🙂

 

Thanks for help 🙂

 

Thanks,

Lewis Baybutt

Microsoft MVP Business Applications

lowcodelewis.com

Yes I suppose this part or this method should have worked but didn't properly. I wasn't able to use the upload to a file or an image action. The image I'm trying to get to would be one that is created on a timeline of a new record submitted on a Power Pages basic form. So a bit odd that the download action wouldn't work on that note record but not to worry as I didn't need to use the action to get to the content and content-type.

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages