Installation
These installation instructions are very preliminary, and surely will not work on all systems. But if any problems come up, do not hesitate to contact us (lorenz.lamm@helmholtz-munich.de).
Step 1: Create a virtual environment
Before running any scripts, you should create a virtual Python environment. In these instructions, we use Miniconda for managing your virtual environments, but any alternative like Conda, Mamba, virtualenv, venv, ... should be fine.
If you don't have any, you could install Miniconda from the official website.
Now you can create a new virtual environment using
conda create --name <env_name> python=3.9
In order to use it, you need to activate the environment:
conda activate <env_name>
Step 2: Install membrain-seg via PyPI
New: MemBrain-seg is now pip-installable.
That means, you can install membrain-seg by typing
pip install membrain-seg
Step 3: Validate installation
As a first check whether the installation was successful, you can run
membrain
Step 4: Download pre-trained segmentation model (optional)
We recommend to use denoised (ideally Cryo-CARE1) tomograms for segmentation. However, our current best model is available for download here and should also work on non-denoised data. Please let us know how it works for you.
NOTE: Previous model files are not compatible with MONAI v1.3.0 or higher. So if you're using v1.3.0 or higher, consider downgrading to MONAI v1.2.0 or downloading this adapted version of our most recent model file.
If the given model does not work properly, you may want to try one of our previous versions:
Other (older) model versions: - v9 -- best model until 10th Aug 2023 - v9b -- model for non-denoised data until 10th Aug 2023
Once downloaded, you can use it in MemBrain-seg's Segmentation functionality to segment your tomograms.
[1] T. -O. Buchholz, M. Jordan, G. Pigino and F. Jug, "Cryo-CARE: Content-Aware Image Restoration for Cryo-Transmission Electron Microscopy Data," 2019 IEEE 16th International Symposium on Biomedical Imaging (ISBI 2019), Venice, Italy, 2019, pp. 502-506, doi: 10.1109/ISBI.2019.8759519.
Troubleshooting
Here is a collection of common issues and how to fix them:
RuntimeError: The NVIDIA driver on your system is too old (found version 11070). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.
The latest Pytorch versions require higher CUDA versions that may not be installed on your system yet. You can either install the new CUDA version or (maybe easier) downgrade Pytorch to a version that is compatible:
pip uninstall torch
pip install torch==2.0.1