Image Exists not working as intended for ID recognition



We´ve got a process where they send us emails with different documents attached, and we want the bot to check if the attached document has an Identiy Card in it or not.

It was an easy process when we were using ID samples that we took from Google Images to check if the process we designed worked or not: after saving the attachments (images downloaded from Google in this case) on a specific folder and opening the files with a for each activity, we would use Image Exists with specific areas of ID cards that don´t change, followed by an if statement, and if the image did exist, a message box would say that we had an ID, and viceversa if it didn´t. It worked nicely.

Now we have started testing it out with pictures of IDs taken with mobile phones and scanned IDs instead of the perfectly shaped ones from Google. I would have thought I would just need to use more Image exist activities and a longer if statement condition, considering that pictures could be taken both horizontally and vertically, scanned in colour or black&white, etc. (e.g. if (VerticalImageExists or HorizontalImageExists or upsidedownImageExists) = true, then ID)

But the thing is that once I start adding more variables to the condition of the if activity, the bot stops recognising images where it did before, and vicebersa, even if we don´t touch the accuracy or timeout features. Even if we use the previous perfectly shaped images downloaded from Google, the bot will act unpredictably where it used to work perfectly before.

Any advice?

Thank you!