Installation¶
MorphoDeep supports Python 3.10 and 3.11. Create an isolated environment, then install the package:
python -m venv .venv
source .venv/bin/activate
python -m pip install morphodeep
For the graphical plugin, install the optional napari dependencies:
python -m pip install 'morphodeep[napari]'
TensorFlow is a required dependency. GPU support depends on the TensorFlow installation for your platform.
Model weights¶
Pretrained weights are not bundled with the package. On first use, MorphoDeep
downloads the selected model from the published Figshare weights dataset,
checks its SHA-256 digest, and caches it for offline reuse. A prediction can also use a local .h5
file explicitly:
morphodeep predict image.tif output.tif --weights /path/to/model.h5
Python callers can pass weights_path to
run_instance_segmentation. Fine tuning can start from
local weights with --initial-weights. If all three weights are available
locally, set MORPHODEEP_WEIGHTS_DIR to their parent directory with 2D/ and
3D/ subdirectories.
Install from the source tree¶
python -m pip install -e .