Loop over multiple files in Image Analysis

Good morning everyone,
if I have many images to process, how can I repeat the same process for each image and only at the end collect all the results together?
Can I use the “IMAGE READER” (to read many images) and a “LOOP” node? The problem is that I would like to process all the images, one after another, not to repeat the same process on the same image.

Thank you!

Hi @davpru96,

take a look at this example workfow Reading multiple files using loops. Replace the File Reader with the Image Reader.

Cheers,
Simon

3 Likes

I tried to use it, but I got: ERROR Loop End 0:10 Execute failed: Duplicate key detected: “IMG_0952.JPG#cars_IMG_0952.JPG”
It seems that it is not processing one image per time.

Hi @davpru96,

I guess you need to change the option in the loop end node how to handle duplicate row keys. However, I was just reminded that there is an even simpler solution! You can use the List Files and Image Reader (Table) nodes. In this case, you don’t need a loop.

Cheers,
Simon

3 Likes

I have solved using the loop node. Thank you very much!!!

Can I ask you another thing? Is it possible to start each loop after a click and not automatically?
Because I need to use the “interactive annotator”, and if it starts automatically I have to force the stop every time.
(During the first loop it is possible to execute one node per time. From the second one it goes alone, and I don’t find any setting options which could help me)

1 Like

Glad to hear you got it to work.

You can right click on a loop end node and select “Step Loop Execution”. Then, only one iteration is done.

Cheers,
Simon

3 Likes

Thank you! You are fantastic! :clap: :clap:

2 Likes

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