https://github.com/bowang-lab/nanomask
mouse pet-ct image segmentation
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.2%) to scientific vocabulary
Repository
mouse pet-ct image segmentation
Basic Info
- Host: GitHub
- Owner: bowang-lab
- Language: Python
- Default Branch: main
- Size: 770 KB
Statistics
- Stars: 10
- Watchers: 4
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
NanoMASK
A deep learning algorithm for auto-segmentation and pharmacokinetic quantitation for PET/CT functional imaging of nanomedicines
Installation
- Create a virtual environment
bash
conda create -n nanomask python=3.8 -y
conda activate nanomask
- Install required packages
```bash
install pytorch following the official guideline
https://pytorch.org/get-started/locally/
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia cd NanoMask pip install -e . ```
Preprocessing your mouse PET/CT data
Convert PET/CT data format
Run
bash python dcm2nii.py -i input_path -o output_path -a CT
- `input_path`: the input path contains three folders: 'CT' for CT data, 'PET' for PET data, and 'ROI' for organ contours.
- `CT`: this can only be CT or PET, which represents converting organ contours according to CT data or PET data.
Register PET/CT data
Install Greedy for image registration from https://greedy.readthedocs.io/en/latest/install.html.
Use affine registration to register PET/CT data
bash python affine_registration.py -i input_path -m CT
- `input_path`: the input path contains PET, CT data and organ contours. All in '.nii.gz' format.
- `CT`: this can only be CT or PET. 'CT' represents using CT data ('CT_0000.nii.gz') as the moving image and PET data ('PET_0001.nii.gz') as the fixed image. Apply Affine transformation to register CT and organ contours ('organs-CT.nii.gz') to PET. 'PET' represent using PET data as the moving image and CT data as the fixed image.
Organ segmentation for mouse PET/CT data
Download the pretrained model and put it into ./NanoMask/nnunet/nnUNet_data/nnUNet/3d_fullres. Run
bash
nnUNet_predict -i input_path -o output_path -m 3d_fullres -t 006 -f 0
Notes:
- input_path: Please use absolute path and the path cannot have spaces. CT and PET data should have the suffix _0000.nii.gz, _0001.nii.gz, respectively. E.g., Case1_0000.nii.gz, Case1_0001.nii.gz
- ouput_path: the segmentation results will be saved in this path.
Train the model based on your own data
Organize the dataset as follows
Task001_MousePETCT
- imagesTr
- case1_0000.nii.gz # CT
- case1_0001.nii.gz # PET
- imagesTs
- labelsTr
- case1.nii.gz # ground truth
- dataset.json
Run
bash
nnUNet_train 3d_fullres nnUNetTrainerV2 Task001_MousePETCT 0
Evaluate your segmentation result
Compute Dice Similarity Coefficient and Volume Difference
bash python compute_metrics.py -s segmentation_path -r ground_truth_path -o output_path -n Heart Lungs Liver Spleen Kidneys TumorNotes:
Heart Lungs Liver Spleen Kidneys Tumor: the mapped integers of each organ in ascending orderouput_path: the evaluation results, DSC and VD, will be saved in this path in a csv file.
Compute clinical metrics based on three groups metrics data: machine, ground truth contours, and segmentation contours
This includes mean voxel intensity, total region volume, total/max/min/std intensity in the contour, percent injected dose per cubic centimeter
bash python compute_clinical.py -s segmentation_path -r ground_truth_path -i image_path -o output_path -m machine_path -n Heart Lungs Liver Spleen Kidneys TumorNotes:
machine_path: the path of xlsx file containing machine metrics including time of scan start, time of injection (datatime) and injected dose (mCi), machine percent injected dose per cubic centimeter (%ID/cc) for each timepoint.Heart Lungs Liver Spleen Kidneys Tumor: the organs in ascending order according to their mapped integers.ouput_path: the clinical metrics will be saved in this path in an xlsx file.
Acknowledgement
This customized model is based on the nnUNet framework. Thanks for the nnUNet team very much!
Owner
- Name: WangLab @ U of T
- Login: bowang-lab
- Kind: organization
- Location: 190 Elizabeth St, Toronto, ON M5G 2C4 Canada
- Website: https://wanglab.ml
- Repositories: 11
- Profile: https://github.com/bowang-lab
BoWang's Lab at University of Toronto
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jun | 1****4@q****m | 7 |
| amylyu1123 | a****u@m****a | 5 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- SimpleITK *
- batchgenerators >=0.23
- dicom2nifti *
- matplotlib *
- medpy *
- nibabel *
- numpy *
- pandas *
- requests *
- scikit-image >=0.14
- scipy *
- sklearn *
- tifffile *
- torch >=1.10.0
- tqdm *
- SimpleITK *
- batchgenerators >=0.23
- dicom2nifti *
- matplotlib *
- medpy *
- nibabel *
- numpy *
- pandas *
- requests *
- scikit-image >=0.14
- scipy *
- sklearn *
- tifffile *
- torch >=1.10.0
- tqdm *