A collection of deep learning architectures ported to the python language and tools for basic medical image processing.
Project description
Advanced Normalization Tools for Deep Learning in Python (ANTsPyNet)
A collection of deep learning architectures and applications ported to the Python language and tools for basic medical image processing. Based on keras
and tensorflow
with cross-compatibility with our R analog ANTsRNet. ANTsPyNet provides three high-level features:
- A large collection of common deep learning architectures for medical imaging that can be initialized
- Various pre-trained deep learning models to perform key medical imaging tasks
- Utility functions to improve training and evaluating of deep learning models on medical images
Installation
Binaries
The easiest way to install ANTsPyNet is via pip.
python -m pip install antspynet
From Source
Alternatively, you can download and install from source.
git clone https://github.com/ANTsX/ANTsPyNet
cd ANTsPyNet
python -m pip install .
Quickstart
The core functionality that ANTsPyNet provides is the ability to initialize a Deep Learning model based on our large collection of model architectures specifically tailored for medical images. You can then train these initialized models using your standard keras
or tensorflow
workflows.
An example of initializing a deep learning model based on the is provided here:
from antspynet.architectures import create_autoencoder_model
model = create_autoencoder_model((784, 500, 500, 2000, 10))
model.summary()
We also provide a collection of pre-trained models that can perform key medical imaging processing tasks such as brain extraction, segmentation, cortical thickness, and more. An example of reading a brain image using ANTsPy
and then performing brain extraction using our pre-trained model in ANTsPyNet
is presented here:
import ants
import antspynet
t1 = ants.image_read(antspynet.get_antsxnet_data('mprage_hippmapp3r'))
seg = antspynet.brain_extraction(t1, modality="t1", verbose=True)
ants.plot(t1, overlay=seg, overlay_alpha=0.5)
Resources
Collection Overview
The following is an overview of the available model architectures and pre-trained models that ANTsPyNet provides:
Architectures
Image voxelwise segmentation/regression
Image classification/regression
- AlexNet (2-D, 3-D)
- VGG (2-D, 3-D)
- ResNet (2-D, 3-D)
- ResNeXt (2-D, 3-D)
- WideResNet (2-D, 3-D)
- DenseNet (2-D, 3-D)
Object detection
Image super-resolution
- Super-resolution convolutional neural network (SRCNN) (2-D, 3-D)
- Expanded super-resolution (ESRCNN) (2-D, 3-D)
- Denoising auto encoder super-resolution (DSRCNN) (2-D, 3-D)
- Deep denoise super-resolution (DDSRCNN) (2-D, 3-D)
- ResNet super-resolution (SRResNet) (2-D, 3-D)
- Deep back-projection network (DBPN) (2-D, 3-D)
- Super resolution GAN
Registration and transforms
Generative adverserial networks
- Generative adverserial network (GAN)
- Deep Convolutional GAN
- Wasserstein GAN
- Improved Wasserstein GAN
- Cycle GAN
- Super resolution GAN
Clustering
Applications
-
- T1
- T1 "no brainer"
- FLAIR
- T2
- FA
- BOLD
- T1/T2 infant
-
MRI modality classification
-
Lung extraction
- Proton
- CT
-
Lung pulmonary vessel segmentation
-
Image quality assessment
Publications
-
Nicholas J. Tustison, Min Chen, Fae N. Kronman, Jeffrey T. Duda, Clare Gamlin, Mia G. Tustison, Michael Kunst, Rachel Dalley, Staci Sorenson, Quanxi Wang, Lydia Ng, Yongsoo Kim, and James C. Gee. The ANTsX Ecosystem for Mapping the Mouse Brain. (biorxiv)
-
Nicholas J. Tustison, Michael A. Yassa, Batool Rizvi, Philip A. Cook, Andrew J. Holbrook, Mithra Sathishkumar, Mia G. Tustison, James C. Gee, James R. Stone, and Brian B. Avants. ANTsX neuroimaging-derived structural phenotypes of UK Biobank. Scientific Reports, 14(1):8848, Apr 2024. (pubmed)
-
Nicholas J. Tustison, Talissa A. Altes, Kun Qing, Mu He, G. Wilson Miller, Brian B. Avants, Yun M. Shim, James C. Gee, John P. Mugler III, and Jaime F. Mata. Image- versus histogram-based considerations in semantic segmentation of pulmonary hyperpolarized gas images. Magnetic Resonance in Medicine, 86(5):2822-2836, Nov 2021. (pubmed)
-
Andrew T. Grainger, Arun Krishnaraj, Michael H. Quinones, Nicholas J. Tustison, Samantha Epstein, Daniela Fuller, Aakash Jha, Kevin L. Allman, Weibin Shi. Deep Learning-based Quantification of Abdominal Subcutaneous and Visceral Fat Volume on CT Images, Academic Radiology, 28(11):1481-1487, Nov 2021. (pubmed)
-
Nicholas J. Tustison, Philip A. Cook, Andrew J. Holbrook, Hans J. Johnson, John Muschelli, Gabriel A. Devenyi, Jeffrey T. Duda, Sandhitsu R. Das, Nicholas C. Cullen, Daniel L. Gillen, Michael A. Yassa, James R. Stone, James C. Gee, and Brian B. Avants for the Alzheimer’s Disease Neuroimaging Initiative. The ANTsX ecosystem for quantitative biological and medical imaging. Scientific Reports. 11(1):9068, Apr 2021. (pubmed)
-
Nicholas J. Tustison, Brian B. Avants, and James C. Gee. Learning image-based spatial transformations via convolutional neural networks: a review, Magnetic Resonance Imaging, 64:142-153, Dec 2019. (pubmed)
-
Nicholas J. Tustison, Brian B. Avants, Zixuan Lin, Xue Feng, Nicholas Cullen, Jaime F. Mata, Lucia Flors, James C. Gee, Talissa A. Altes, John P. Mugler III, and Kun Qing. Convolutional Neural Networks with Template-Based Data Augmentation for Functional Lung Image Quantification, Academic Radiology, 26(3):412-423, Mar 2019. (pubmed)
-
Andrew T. Grainger, Nicholas J. Tustison, Kun Qing, Rene Roy, Stuart S. Berr, and Weibin Shi. Deep learning-based quantification of abdominal fat on magnetic resonance images. PLoS One, 13(9):e0204071, Sep 2018. (pubmed)
-
Cullen N.C., Avants B.B. (2018) Convolutional Neural Networks for Rapid and Simultaneous Brain Extraction and Tissue Segmentation. In: Spalletta G., Piras F., Gili T. (eds) Brain Morphometry. Neuromethods, vol 136. Humana Press, New York, NY doi
Acknowledgements
-
We gratefully acknowledge the support of the NVIDIA Corporation with the donation of two Titan Xp GPUs used for this research.
-
We gratefully acknowledge the grant support of the Office of Naval Research and Cohen Veterans Bioscience.
Contributing
If you encounter an issue, have questions about using ANTsPyNet, or want to request a feature, please feel free to file an issue. If you plan to contribute new code to ANTsPyNet, we would be very appreciative. The best place to start is again by opening an issue and discussing the potential feature with us.
License
The ANTsPyNet package is released under an Apache License.
to publish a release
before doing this - make sure you have a recent run of pip-compile pyproject.toml
rm -r -f build/ antspynet.egg-info/ dist/
python3 -m build .
python3 -m pip install --upgrade twine
python3 -m twine upload --repository antspynet dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file antspynet-0.2.8.tar.gz
.
File metadata
- Download URL: antspynet-0.2.8.tar.gz
- Upload date:
- Size: 153.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13d83e9c4b2d7ae8c90d96e796a0cc2884d4e5bd14e484e151ecb4c705daf02e |
|
MD5 | 2aea3ed4e6ebbeec52ef5020810e59a5 |
|
BLAKE2b-256 | 4eeb29368d26cc18d34b56c3897703e8a3984ed634f4f1d6477e5b4ed8aed713 |
Provenance
File details
Details for the file antspynet-0.2.8-py3-none-any.whl
.
File metadata
- Download URL: antspynet-0.2.8-py3-none-any.whl
- Upload date:
- Size: 202.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c724ac1b3111ad6456f1bee5929ad2d6c546136cd170763cd1a7c6cdef4afe39 |
|
MD5 | 37332c35f1eccb4e6074ef46774d7c24 |
|
BLAKE2b-256 | 8721a75737e2acb417f12dafacac3b096334d61fb9ed97a137fc265a8282c35f |