DeepRegNet / DeepReg

Medical image registration using deep learning
Apache License 2.0
564 stars 76 forks source link

custom data loading for prediction #837

Closed urlicht closed 1 year ago

urlicht commented 1 year ago

custom data loading for prediction

First, thanks for building this amazing package!

Instead of using the command line interface (i.e. predict script), I'm trying to write a script that constructs a model, loads checkpoint, and make predictions so that I can do custom operation on the network output and data saving. I'm following through https://github.com/DeepRegNet/DeepReg/blob/main/deepreg/predict.py, but I'm stuck with making inputs to the model (e.g. input argument to the function call model.predict()

I was thinking that the inputs would be simply a dictionary containing fixed and moving image tensors, but that seems to be not the case. Would you be able to point me to an example of how to construct an input to the model? Sorry these might be basic questions, but your help would be appreciated since I've only used pytorch before.

Also, I was looking at the predict section:

outputs = model.predict(x=inputs, batch_size=batch_size)
indices, processed = model.postprocess(inputs=inputs, outputs=outputs)
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.