CONSNet: Convolutional Neural Networks for Skull-stripping in Brain MR Imaging using Silver Standard Masks
MIT License Copyright (c) 2018 Medical Image Computing Lab - MICLab Unicamp
This is an alpha version of the CONSNet presented in the paper Convolutional Neural Networks for Skull-stripping in Brain MR Imaging using Silver Standard Masks . The article is available for download here: https://www.sciencedirect.com/science/article/pii/S0933365718305177?via%3Dihub . If you use this code on your work, please cite the this article.
-
Lucena, Oeslle, et al. "Convolutional Neural Networks for Skull-stripping in Brain MR Imaging using Silver Standard Masks." Artificial Intelligence in Medicine, 2019.
-
CC-359 Dataset https://sites.google.com/view/calgary-campinas-dataset/home
- Python 2/3
- NumPy 1.14.3
- SciPy 1.0.1
- Sklearn 0.19.1
- Nibabel 2.2.1
- Keras 2.1.6
- Tensorflow 1.4.0
- SimpleITK
pip install tensorflow-gpu* (please check the requirements on the official website: https://www.tensorflow.org/install/)
pip install keras (scipy and numpy are automatically installed here)
pip install nibabel
pip install scikit-learn
pip install SimpleITK
You can create a conda virtual environment to run the code. Once it is done, you clone the project to conda virtual environment. The instructions to create the conda environment are the following ones:
conda create -n project_name python=(2 or 3) -y
source project_name
pip install tensorflow-gpu* (please check the requirements on the official website: https://www.tensorflow.org/install/)
pip install keras (scipy and numpy are automatically installed here)
pip install nibabel
pip install scikit-learn
pip install SimpleITK
If you just to want to run the inference for a new volume, you need to run the command below providing the nifit volume path of the respective data.
python infer.py -input some_data.nii.gz
You can train your own model for CONSNet. You need to provide two text files with the data and the respective annotated masks paths. Also, feel free to change the default parameters.
python prep-train.py -tr_original_filename data.txt -tr_consensus_filename mask.txt
If you have any doubts, questions or suggestions to improve this code, please contact me at: oeslle.lucena@gmail.com