Minimal annotation muscle segmentation (MuSeg) based on artificial intelligence (AI), short MuSegAI. If you use this work, please consider citing it.
The repository provides a command line interface (CLI) based on a Docker image for segmentation. Prerequisites for the segmentation are two Dixon MRI
volumes at echo times 1.95 and 2.75 ms (in- and out-of-phase volumes).
Currently, a segmentation model for the thigh muscles is available, which segments 13 muscles (see ./docker/labels_thigh.txt
).
The volumes can either contain both thighs or left and right only.
Install the MuSeg-AI package by (tested on Ubuntu 22.04 with Python 3.10)
git clone https://github.com/fabianbalsiger/minimal-annotation-muscle-segmentation.git
cd minimal-annotation-muscle-segmentation
pip install .[cli]
You can also directly work with the Docker image available on DockerHub, pull it by
docker pull fabianbalsiger/museg:thigh-model3
Follow the docker/README.md instructions on how to execute a Docker container for segmentation.
Let's assume having volumes saved in a directory in
as volume195.mha
and volume275.mha
(the names can be arbritary). Segment them by
museg-ai in/volume195.mha in/volume275.mha
The files volume195.mha
, the segmentation, and labels.txt
, an ITK-SNAP labels file, will be saved at the location where the script has been executed.
NOTE: If the Docker image for segmentation has not yet been pulled, it will be done automatically, which might take a while.
Print all available options by
museg-ai --help
The scientific article is currently under review. Please open an issue if you want to cite it before acceptance.
A little project cheatsheet for development:
- pre-commit:
pre-commit run --all-files --hook-stage=manual
- pytest:
pytest
orpytest -s
- coverage:
coverage run -m pytest
followed bycoverage html
orcoverage report
- create towncrier entry:
towncrier create 123.added --edit
Follow these steps for the initial project setup as well as setting up a new development environment:
- See docs/getting_started.md or docs/quickstart.md for how to get up & running.
- Check docs/project_specific_setup.md for project specific setup.
- See docs/detect_secrets.md for more on creating a
.secrets.baseline
file using detect-secrets. - See docs/using_towncrier.md for how to update the
CHANGELOG.md
using towncrier.