Run a batch mode on images

I want to run my pipeline on thousands of images.
The images are stored in hundreds of folder like


I made my pipeline to produce for each folder,

  1. store resultant overlayImages on /home/myID/Desktop/Output/Patient_A
  2. store data spreadsheets on /home/myID/Desktop/Output/Patient_A/Data

I want to run the pipeline headless on /home/myID/Desktop/Input, so that the pipeline runs on hundreds of folders in the folder. but i don’t know what to do with .the batch command

/ -p <Default_Output_Folder_path>/Batch_data.h5 -c -r -b -f <first_image_set_number> -l <last_image_set_number>

…any kind of help would be greatly appreciated. Thanks!

If you’re running this on a single machine and you’re not comfortable with the command line syntax, can I ask why you want to run it headless? I don’t think you’ll see an appreciable performance increase doing so with a single machine vs running it in the GUI- where the command line really helps is the ability to run on a cluster.

That being said, here is a link to explanations on how the different command line flags are used.

I wanted to designate /home/mID/Desktop/Input as an input in the GUI but it didn’t work… it seems that GUI accepts only lists of images as an input, which means that I have to drag and drop the images for each of folders and that’s the last thing I want to do.

You should be able to just select the home/myID/Desktop/Input folder and drag and drop that into the GUI… is that not working for you? If so, that sounds like a bug we should try to fix.

Nope. I use 2.2.0 CP on my windows PC and Ubuntu workstation. Dragging&dropping /home/myID/Desktop/input works only in windows, but I need to run the analysis in the workstation…

Dragging&dropping /home/myID/Desktop/input works only in windows

Well that’s pretty obnoxious, I’m sorry! I’ll try to get into that further, but for now one of our software engineers says that drag and drop SHOULD work for wxPython-3.0 (GTK).

In the meantime, I think you should be able to create a file list just with something like cat home/myID/Desktop >>filelist.txt and use the File->Import->File List and have that work; if not, you could probably do something slightly more complicated to create a LoadData CSV (or even create that in your windows machine with Export->Image set listing and update the paths if they’re available on both machines and have a reasonably parallel structure on both) which should work too.

There’s just a non-zero amount of trouble involved in getting CP to run multicore headless unless you’ve got some sort of cluster submission system, so if we can get this working in the GUI without having to go there I think that’d be easiest.

1 Like