ELEKTRONN / elektronn3

A PyTorch-based library for working with 3D and 2D convolutional neural networks, with focus on semantic segmentation of volumetric biomedical image data
MIT License
160 stars 27 forks source link
3d-cnn 3d-convolutional-network biomedical-image-processing convolutional-neural-networks electron-microscopy pytorch semantic-segmentation

PyPI GitHub Workflow Status Read the Docs

elektronn3

A PyTorch-based library for working with 3D and 2D convolutional neural networks, with focus on semantic segmentation of volumetric biomedical image data.

Quick overview of elektronn3's code structure:

elektronn3's modular codebase makes it easy to extend/replace parts of it with your own code: For example, you can use the training tools included in elektronn3.training with your own data sets, augmentation methods, network models etc. or use the data loading and augmentation code of elektronn3.data with your own training code. The neural network architectures in elektronn3.models can also be freely used with custom training and/or data loading code.

Documentation can be found at elektronn3.readthedocs.io.

For a roadmap of planned features, see the "enhancement" issues on the tracker.

Requirements

Setup

Ensure that all of the requirements listed above are installed. We recommend using conda or a virtualenv for that. To install elektronn3 in development mode, run

git clone https://github.com/ELEKTRONN/elektronn3 elektronn3-dev
pip install -e elektronn3-dev

To update your installation, just git pull in your clone directory.

If you are not familiar with virtualenv and conda or are not sure about some of the required steps, you can find a more detailed setup guide here

Training

For a quick test run, first ensure that the neuro_data_cdhw data set is in the expected path:

wget https://github.com/ELEKTRONN/elektronn.github.io/releases/download/neuro_data_cdhw/neuro_data_cdhw.zip
unzip neuro_data_cdhw.zip -d ~/neuro_data_cdhw

To test training with our custom U-Net-inspired architecture in elektronn3, you can run:

python3 train_unet_neurodata.py

Using Tensorboard

Tensorboard logs are saved in ~/e3training/ by default, so you can track training progress by running a tensorboard server there:

tensorboard --logdir ~/e3training/

Then you can view the visualizations at http://localhost:6006.

Contributors

The elektronn3 project is being developed by the ELEKTRONN team. Jörgen Kornfeld is academic advisor to this project.