Package: miscnn-TF-1.14
MIScnn: Medical Image Segmentation with Convolutional Neural NetworksThe open-source Python library MIScnn is an intuitive API allowing fast setup of medical image segmentation pipelines with state-of-the-art convolutional neural network and deep learning models in just a few lines of code.MIScnn provides several core features:2D/3D medical image segmentation for binary and multi-class problemsData I/O, preprocessing and data augmentation for biomedical imagesPatch-wise and full image analysisState-of-the-art deep learning model and metric libraryIntuitive and fast model utilization (training, prediction)Multiple automatic evaluation techniques (e.g. cross-validation)Custom model, data I/O, pre-/postprocessing and metric supportBased on Keras with Tensorflow as backendGetting started: 30 seconds to a MIS pipelineCreate a Data I/O instance with an already provided interface for your specific data
format.frommiscnn.data_loading.data_ioimportData_IOfrommiscnn.data_loading.interfaces.nifti_ioimportNIFTI_interface# Create an interface for kidney tumor CT scans in NIfTI formatinterface=NIFTI_interface(pattern="case_0000[0-2]",channels=1,classes=3)# Initialize data path and create the Data I/O instancedata_path="/home/mudomini/projects/KITS_challenge2019/kits19/data.original/"data_io=Data_IO(interface,data_path)Create a Preprocessor instance to configure how to preprocess the data into batches.frommiscnn.processing.preprocessorimportPreprocessorpp=Preprocessor(data_io,batch_size=4,analysis="patchwise-crop",patch_shape=(128,128,128))Create a deep learning neural network model with a standard U-Net architecture.frommiscnn.neural_network.modelimportNeural_Networkfrommiscnn.neural_network.architecture.unet.standardimportArchitectureunet_standard=Architecture()model=Neural_Network(preprocessor=pp,architecture=unet_standard)Congratulations to your ready-to-use Medical Image Segmentation pipeline including data I/O, preprocessing and data augmentation with default setting.Let's run a model training on our data set. Afterwards, predict the segmentation of a sample using the fitted model.# Training the model with all except one sample for 500 epochssample_list=data_io.get_indiceslist()model.train(sample_list[0:-1],epochs=500)# Predict the one remaining samplepred=model.predict([sample_list[-1]],direct_output=True)Now, let's run a 5-fold Cross-Validation with our model, create automatically evaluation figures and save the results into the directory "evaluation_results".frommiscnn.evaluation.cross_validationimportcross_validationcross_validation(sample_list,model,k_fold=5,epochs=100,evaluation_path="evaluation_results",draw_figures=True)InstallationThere are two ways to install MIScnn:Install MIScnn from PyPI (recommended):Note: These installation steps assume that you are on a Linux or Mac environment. If you are on Windows or in a virtual environment without root, you will need to remove sudo to run the commands below.sudopipinstallmiscnnAlternatively: install MIScnn from the GitHub source:First, clone MIScnn using git:gitclonehttps://github.com/frankkramer-lab/MIScnn.gitThen, cd to the MIScnn folder and run the install command:cdMIScnn
sudopythonsetup.pyinstallAuthorDominik MüllerEmail:dominik.mueller@informatik.uni-augsburg.deIT-Infrastructure for Translational Medical ResearchUniversity AugsburgBavaria, GermanyHow to cite / More informationDominik Müller and Frank Kramer. (2019)MIScnn: A Framework for Medical Image Segmentation with Convolutional Neural Networks and Deep Learning.LicenseThis project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.See the LICENSE.md file for license rights and limitations.