Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lung registration #60

Open
z88888888888 opened this issue Apr 25, 2023 · 5 comments
Open

lung registration #60

z88888888888 opened this issue Apr 25, 2023 · 5 comments

Comments

@z88888888888
Copy link

Excuse me, which are the lung registration training files, test files, and data preprocessing files, thanks in advance!

@HastingsGreer
Copy link
Collaborator

Hi!
The preprocessing pipeline for lung training is a little convoluted, which we should definitely fix.

First, you need a large collection of lung CT scans. We got permission from COPDGene https://www.copdgene.org/imaging.htm to use their collection of ~1000 images to train, but we don't have permission to distribute their images, so to get them you will need to contact them directly. Alternately, you could use the learn2reg lung dataset for training, which is smaller (30 images) but freely available. https://learn2reg.grand-challenge.org/Learn2Reg2021/

Second, you need to process all the images using something like ITK to have uniform 1 mm spacing and size 350 x 350

The third step is to convert the folders of ITK images into torch tensors which can be rapidly loaded into memory: we separate this from the training loop for faster training on our hardware:

https://github.com/uncbiag/ICON_lung/blob/master/tools/preprocess_half_res_lungs.py

Then, we can train on these prepared tensors.

https://github.com/uncbiag/ICON/blob/master/training_scripts/cvpr_clean/train_lung.py

Finally, we test on the Dirlab COPDGene inhale exhale pairs, available here:

https://med.emory.edu/departments/radiation-oncology/research-laboratories/deformable-image-registration/downloads-and-reference-data/index.html

We preprocessed the lung images by resampling them to 1mm spacing, 350 x 350 x 350 voxels, and then measured landmark error using our evaluation script here:
https://github.com/uncbiag/ICON/blob/master/training_scripts/cvpr_clean/COPDGene_eval.py

Sorry, that's a lot and it definitely needs cleaning up. If you want to quickly download a pretrained model and a pair of images and then run it in a colab notebook, we have that here: https://colab.research.google.com/github/uncbiag/ICON/blob/master/notebooks/ICON_lung_demo.ipynb#scrollTo=xjApRRl3uKHE

And we should have an end to end tutorial on training on the public learn2reg data soon. The training script for learn2reg is at https://github.com/uncbiag/ICON/blob/master/training_scripts/cvpr_clean/train_learn2reg_lung.py but I can't promise that it's totally correct yet.

For training, we used the C

@z88888888888
Copy link
Author

Thank you for your reply.I am sorry to bother you again.I fail to open the link https://github.com/uncbiag/ICON_lung/blob/master/tools/preprocess_half_res_lungs.py

@HastingsGreer
Copy link
Collaborator

I've uploaded the preprocessing script at https://github.com/uncbiag/ICON/blob/master/training_scripts/cvpr_clean/preprocess_half_res_lungs.py . Nailing down the exact provenance of the images in Lung_registration_transposed is an ongoing project

@z88888888888
Copy link
Author

Thank you for your help

@z88888888888
Copy link
Author

I try to reproduce your great work ,but I can not reach the result in your paper.could you share the pre-processed dir-lab dataset.it will help me a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants