Euclidean distance matrices (EDMs) are convenient representations of point sets created by collecting all squared distances between points (see 10.1109/MSP.2015.2398954 for more details). In this repository, we illustrate how distance matrices can be extracted from binary segmentation masks and saved for downstream analysis with self-supervised shape analysis methods such as ShapeEmbed and ShapeEmbedLite.
tested with python 3.12
Create a virtual environment and install the dependencies as follows:
python3 -m venv .venv --prompt PrepareDataset
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install --requirement requirements.txtsource .venv/bin/activate enters the python virtual environment while a simple
deactivate from within the virtual environment exits it.
The Jupyter Notebook prepare_BBBC010.ipynb demonstrates how binary segmentation masks from the BBBC010 dataset can be transformed into distance matrices.