uncbiag / ICON

A library for performing image registration using deep learning, regularized by inverse consistency
Other
42 stars 9 forks source link

lung registration #60

Open z88888888888 opened 1 year ago

z88888888888 commented 1 year ago

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

HastingsGreer commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Thank you for your help

z88888888888 commented 1 year ago

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