MorphoFM is a unified framework for extracting multi-level morphological features (including single-cell level) from spatial single-cell imaging data (e.g., H&E images).
It provides three complementary feature modules:
- Morpho1 – classical single-cell morphology (shape, size, intensity, texture)
- Morpho2 – deep visual embeddings from foundation models (e.g. UNI2-h, Virchow2)
- Morpho3 – spatial microenvironment & niche features (density, neighborhood geometry, contextual morphology)
More details are available in the demo notebook.
git clone https://github.com/Teichlab/MorphoFM.git
cd MorphoFM
conda env create -f morpho_env.yml
conda activate morpho
pip install -e .morphofm \
--image your_path/he.tiff \
--labels your_path/he.npz \
--feattype all \
--sample_id Image1 \
--mpp 0.25 \
--crop_size_um 32 \
--geometry circle \
--radius_um 32 \
--cuda_visible_devices 1 \
--hf_home your_path_hf_cache