alibaba-damo-academy / self-supervised-anatomical-embedding-v2

MIT License
50 stars 4 forks source link

How to generate registered images using your pretrained model? #1

Closed yuanyuan29 closed 1 year ago

yuanyuan29 commented 1 year ago

Thanks for your excellent work. I'd like to register some images by your model. However, I couldn't find the right code to use your pretrained model to generate the registered images. How to do that?

aa1234241 commented 1 year ago

Hello, could you provide more details about the specific type of registration you're interested in? Are you looking for affine or deformable registration? Is it for a single modality or cross-modality, such as CT-MRI or T1 MRI-T2 MRI?

yuanyuan29 commented 1 year ago

It is for a cross-modality registration. Your Cross-SAM model could be useful.

aa1234241 commented 1 year ago

The registration code can be found in 'tools/regis_sam.py.' Please note that the pretrained model has been trained on abdomen T1 MRI (small FOV) and CT images. If you possess > 15 pairs of images, you can try to train your own CrossSAM model on your dataset. See the training detail: https://github.com/alibaba-damo-academy/self-supervised-anatomical-embedding-v2/blob/main/resources/training.md

yuanyuan29 commented 1 year ago

I attempted to train my own CrossSAM, as per your recommendation, but I'm still grappling with some uncertainties.

My primary objective is to register the collected multi-modal data and subsequently utilize it for downstream tasks. In light of this, could you please outline the correct steps for utilizing CrossSAM? Should I employ the same dataset for both model training and testing if I should train my own CrossSAM?

Furthermore, I've encountered difficulties in locating the files pertaining to DEEDs registration. And the original DEEDs project lacks the file "applyBCVfloat_aniso.cpp." If this file is essential, would it be possible for you to provide it?

Thanks for your help.

aa1234241 commented 1 year ago

Definitely. There are some details in the training of CrossSAM. Here is the applyBCVfloat_aniso.cpp file. applyBCVfloat_aniso.cpp.zip

yuanyuan29 commented 1 year ago

No problem, thanks!