Input Images from multiple folders andsave images to output folders having same input folder names

I would like to modify the current sample project file to group my input images according to the folder names and save the output images into corresponding folders.

For example,

Input Folders are,


I would like to save the images to their corresponding folders as above. But my current project outputs all the images in one folder, hence overwriting images with similar names.

How should I modify the current sample project file?

NuMA classifier 8aug.cpproj (520.4 KB)

The first thing to try would be instead of saving into “Default Output Folder” save to “Same folder as image”… I think for your pipeline that would work. If it doesn’t (depending on how many steps from the original image to what you’re trying to save the linkage can break and the program becomes confused where to send it), you can extract the subfolder name with the Metadata module and then use that metadata in SaveImages (by using “Default Output Folder subfolder” and then setting the subfolder name with the metadata) to save to the folder you want.

this worked for me. thanks!