Loop through folder of images & extract info using OCR

Hello everyone,

I’m looking for the best way to open multiple images, scan their info (I used IDs as an example), and save them to an excel sheet. I used to have a working version, but for one it’s pretty primitive and each file has to be entered manually - and somehow, now that I wanted to use a “maximize window” option (because I realised that opening the photo in different sizes somehow messes up the OCR), it’s all gone to crap because somehow UiPath doesn’t recognise it anymore. I’m at my wits’ end and just so frustrated; I’ve had to go through the whole Relative-Image-Scraping-shindig about 20 times today, and there just has to be a better way, right?!

These are the photos I used: 1 and 2

And the file: ID_Bot.zip (2.6 MB)

(I tried uploading the whole thing including the pictures zipped but the second image was too large, then I tried sizing it down into a jpg but then UiPath didn’t recognise it again and arrrghh).

I also tried looping the whole thing using an example I found in a forum here - looping through the images. That also simply won’t work, because UiPath somehow doesn’t find the images, even though I’ve done exactly the same thing as in the example:

Sequence1.xaml (234.2 KB)
^my file

LoopImagesOCR.zip (108.3 KB)
^the example

Any help here would be greatly appreciated!

Thanks so much in advance,
BintaS

Hi,

Try extracting the required fields from CV get text activity insode CV scope.

Try this and let us know if it helps.

Regards,
Pavan H

Hi Pavan,

Thank you for your reply. How do you mean using that exactly? I chose relative scraping because I figured it would need an info as to where on the picture it could find the info, in case the size or the layout changes slightly (because those seem to throw UiPath off). Furthermore, does the Get Text activity focus on the area or on the specific text? - The latter I think would mean that it only works for one specific kind of ID (where last name, first name etc. are the same), or?

Hi,
Please install uipath.ai.computervison.activities package from package manager, please tick on checkbox for include prerelease, before that please install 19.2 version package of uiautomation. Activities from package manager.
Once done please use cv scope to ge the data and then use cv get text to get the text so this will work like anchor and you will get the desired output in string

Does this help you?

Regards,
Pavan H

2 Likes

Hi Pavan,

Thanks again! Somehow I’m unable to find the package you specified. I’m in the correct version:

grafik

However, when I search for the package name, it comes up empty:

:frowning:

Hi,
The uiautomation.activities package version should be 19.2 then only u will be able to find the uipath.ai.computervision activities

Hi,
Install uiautomatiom.activities version 19.2 and then search for uipath.ai.computervision.activites include prereleases ticked, and then you will find the AIR packages install that

Regards,
Let us know if this works
Regards,
Pavan H

Hi Pavan,

The automation.activities package has been installed for a while on my version:

So it can’t be that. :confused:

Hi,
Please follow the below link to install Uipath.AI.ComputerVision.activities in you machine.


Let us know if this helps

1 Like

Hi,

Refer the below post, on how to install computer vision activities.

1 Like

Hi Pavan,

Thank you for your explanation. Using CV Get Text solved most of my issues; however, I tried opening it on another laptop and the OCR results are terrible again. Is there any way to take care of this? They were just grand before, but they seem so unreliable. :frowning:

Sequence2.xaml (100.2 KB)

Kind regards,
BintaS

Hi @BintaS,

Can you please send the image for which you are trying to extract the text using CV activities.

Regards,
Pavan H

Hi Pavan,

Both of them are up in my original post :slight_smile:

These are the photos I used: 1 and 2

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.