MONAILabel module should allow user to select different volumes in current scene

I´ll contact you on Discord, maybe we can post a solution later not to push this thread up too often.

hi @diazandr3s
I can get this code to work nicely
python main.py --studies “/home/user/CT-test/” --model “segmentation” --test “infer”

but only on the first dataset in the directory “/home/user/CT-test/”, it then stops. Is there are way to process all datasets in a directory using this approach? I have a good model and I just want it to run through all the datasets in a directory, generating label maps. Very laborious in 3Dslicer using the server and next button.

cheers
nathan

1 Like

Hi @njeffery123,

This is what’s happening when you run infer: https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/main.py#L304-L327

You could modify the code (add a for loop) to run inference on all the unlabelled images OR by starting the server and running batch inference using the APIs from the browser. This will run inference on all the unlabelled volumes in the folder.

Hope this helps,

Thank you, I did try a loop but couldn’t get it to work because the --studies flag references a directory not a file. Will give the API approach a try

Just to a note to anyone else - the API approach works well. Start the server with the location of the files you want to batch infer, pop the server address in firefox and use “Run Batch Inference Task”. 100+ in a few minutes. Thanks @diazandr3s

1 Like

Thanks for reporting back, @njeffery123 :slight_smile: