uncbiag / uniGradICON

The official website for uniGradICON: A Foundation Model for Medical Image Registration
Apache License 2.0
82 stars 4 forks source link

Cannot find how to evaluate on ACDC dataset #11

Open roominforest opened 7 months ago

roominforest commented 7 months ago

Hi~ I'm very interested in your performance on ACDC dataset in your demos because I'm working on a similar project. But I can't find how to evaluate on this dataset with your model. There are some questions: 1.Since I can only find a model named Step_2_final.trch, I wonder if this model is able to process all types of dataset mentioned in your demo? 2.Images in ACDC dataset have a smaller size than the examples mentioned in your Readme.md. In this case, what should I do to make your model compatible with the smaller size data? I'm looking forward for your reply.

lintian-a commented 7 months ago

Hi @roominforest ,

Thanks for your interest in uniGradICON.

1. But I can't find how to evaluate on this dataset with your model.

We haven't run a quantitative evaluation on the ACDC dataset yet. One can achieve the evaluation either via our CLI

unigradicon-register --fixed=RegLib_C01_2.nrrd --fixed_modality=mri --moving=RegLib_C01_1.nrrd --moving_modality=mri --transform_out=trans.hdf5 --warped_moving_out=warped_C01_1.nrrd

and

unigradicon-warp --fixed=RegLib_C01_2.nrrd --moving=RegLib_C01_1_segmentation.nrrd --transform=trans.hdf5 --warped_moving_out=warped_C01_1_segmentation.nrrd --nearest_neighbor

The first estimates the transformation, and the second warps the corresponding segmentation map by the transformation. You can find the associate code at https://github.com/uncbiag/uniGradICON/blob/aba3d8f83db059340af0f901a5525251e689bf44/src/unigradicon/__init__.py#L220 and https://github.com/uncbiag/uniGradICON/blob/aba3d8f83db059340af0f901a5525251e689bf44/src/unigradicon/__init__.py#L286

2. Since I can only find a model named Step_2_final.trch, I wonder if this model is able to process all types of dataset mentioned in your demo?

Yes. You are correct. All the evaluations in the paper and the qualitative results here are based on ONE uniGradICON model. We call it a universal registration model to differentiate it from the task-specific registration model that is trained only for a specific registration task on a specific anatomical region.

3. Images in ACDC dataset have a smaller size than the examples mentioned in your Readme.md. In this case, what should I do to make your model compatible with the smaller size data?

The uniGradICON network accepts images with the shape of 175x175x175. In our training and evaluation, we resample the images to 175x175x175 regardless of the spacing. In the evaluation, we invert the transformation back to the original physical space and compute the evaluation metrics there.

If you use the CLI, this preprocessing will be handled. If you want to try other ways to adjust the resolution, for example, padding, the colab example could be a good playground.