Dear community,
I am trying to run the monailabel autosegmentation for many samples so I would like to learn how to run infer using the python interactor.
I found this discussion on github answered by wonderful @lassoan, informing how logic can be used to run the module on python interactor.
With the given information, I was able to connect to the server but I could not make the autosegmentation to work.
I guess the infer can be done with following line but I was not able to figure out what image_in is for.
result_file, params = infer(model, image_in)
I tried putting my session folder as the image_in address but it did not worked.
#MONAILABEL
logic = slicer.util.getModuleLogic('MONAILabel')
# connect to server
server_add = "http://127.0.0.1:8000"
logic.setServer(server_url=server_add)
#check if Monailabel is connected correctly
MONAILabelClient = logic.info()
print(MONAILabelClient)
# <FAILED>
# def infer(self, model, image_in, params={}, label_in=None, file=None, session_id=None):
session_image = "C:/Users/username/.cache/monailabel/sessions"
result_file, params = logic.infer("deepedit_seg", image_in = session_image)
Can somebody kindly explain to me what the image_in is supposed to be?
I am always greatful for all your help and thank you in advance.