Redirecting Screens Based on Image Recognition Results

Hello, I hope you're having a great day. I'm currently developing a fish image recognition application using the picture image classifier extension. I've completed the initial mockup and model, and everything works well for basic recognition. Currently, the recognized fish name replaces the text of the label. However, I'm exploring the possibility of redirecting to specific screens upon recognition. My model consists of three samples: Fish A, B, and C, and I want each to correspond to a certain screen upon recognition.

Here's the blueprint of the screens I've designed:

Screen 1 = Splash Screen
Screen 2 = Main Menu
Screen 3 = Camera
Screen 4 = Fish A (Redirect if Recognized)
Screen 5 = Fish B (Redirect if Recognized)
Screen 6 = Fish C (Redirect if Recognized)

Could you please advise on the steps to implement this redirection upon recognition?

Hello, great day also for you.

Before you start creating screens, I would recommend you to explore the virtual screens option...search on the community.

Edit: A simple example to understand the concept:

Thank you for sharing your insights! I've explored the community about virtual screens, which seem like an efficient method to consolidate components onto one screen rather than creating multiples.

However, despite this, I haven't found a clear way to automatically categorize and classify each result of the sample to make the virtual screen visible according to the image recognition outcomes.

As shown in the image below, I've encountered limitations with the "get result" block after classification, which only retrieves the highest among the samples, providing no opportunity to assign each sample to a specific horizontal arrangement component to be visible.

Screenshot_2024-02-24-21-31-26-87_40deb401b9ffe8e1df2f1cc5ba480b12

I'm sorry if this sounds too complex and unorganized; I've attempted to comprehend this issue multiple times without success. Unfortunately, I haven't come across any relevant projects with a similar scope and intentions.

Thank you once again for your immideate assistance! I hope you might be able to provide further guidance on this matter.

Edit: Just to clarify, my objective is to automatically make a specific horizontal arrangement visible after recognition based on the corresponding sample it's assigned to, rather than relying on buttons.

Trying to understand your problem, you want to make visible one horizontalArrangement or other depending on the result received in in GotCalassification? What are you receiving in "result" and which is the condition to open one arrangement or other?

Welcome Subseu.

Knowing that Image Classifier probabilities are provided as indicated as a List, shown here Personal image classifier display - #2 by SteveJG

You can use that information to send the result to a Screen or virtual screen using
If..elseif Blocks.

It could work something like this:
If the top classification is 'bird' then open Screen2
elseif is twoelephants then open Screen3
elseif twodogs then open Screen4

Is that what you want to do with your classification information?

1 Like

Hello, thank you once again for your response! I apologize for my earlier unclear explanation, but I'm grateful that SteveJG was able to grasp exactly what I was trying to point out.

To be honest, I'm still a bit confused about how to actually implement this using the blocks and how to arrange the samples in the list. I'm not very knowledgeable about these matters, and coincidentally I mostly just followed exactly the link that you provided earlier.

Would it be possible for you to demonstrate how to execute the if and elseif functions in the blocks to redirect to other screens? If you could, I would greatly appreciate it!

Hello again,

here you have a very simple example of how to use a if -then -else block with several choices and how to hide/show the different arrangements based on a value.

VirtualDemo.aia (2.7 KB)

If you want to use real screens then change the blocks inside the if-then-else by the blocks to open other screen.

1 Like

something like this?

There are many ways to display the PIC results, this shows how to show all three and alternative ways (shaded) to display only the most likely.

This code shows VerticalArrangement1 and hides the others since the PIC identified a bird as the highest probability.

1 Like

Hello, good day. Sorry for the late response, but I would like to thank both of you for helping me out! It worked out just fine as I intended. Perhaps I'll just ask again if I ever encounter an issue in the future. Once again, thank you very much!