SkillAgentSearch skills...

Musclesense

MuscleSense comprises a set deep learning AI networks that perform the anatomical segmentation and parcellation of calf, thigh, foot, and hand muscles in 3-point Dixon, T1w, and T2-stir MRI volumes.

Install / Use

/learn @bariskanber/Musclesense
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

MuscleSense

MuscleSense comprises a set deep learning AI networks that perform the anatomical segmentation and parcellation of calf, thigh, foot, and hand muscles in 3-point Dixon, T1w, and T2-stir MRI volumes.

Example

image

Installation

The instructions below are for installing the software at ~/musclesense on Linux. Replace ~ and musclesense as appropriate if you wish to install the software elsewhere on your filesystem.

  1. At the Linux terminal, execute:
cd ~

followed by:

git clone https://github.com/bariskanber/musclesense.git
  1. Install Miniconda3 (see here) in:
~/musclesense/miniconda3

The installation script will ask for the location.

  1. Install the required modules by running:
~/musclesense/miniconda3/bin/python -m pip install -r ~/musclesense/requirements.txt

Getting started

Please note that if the location you have installed the software to requires root privileges to write to, you may encouter a Permission denied: '.../models' error. Run the software with sudo once for each new modality you use and sudo will no longer be necessary once the appropriate model files have been downloaded.

Example 1

Run the following command to perform individual muscle segmentation on the two T1w calf datasets in the directory /mydir.

~/musclesense/miniconda3/bin/python ~/musclesense/mmseg_ll.py -al calf -modalities t1 -inputdir /mydir

mydir is expected to have the following directory structure:

mydir/
├── subject1/
│   └── t1.nii.gz
├── subject2/
│   └── t1.nii.gz

A file labelled calf_parcellation_t1.nii.gz will be produced in each subject directory.

Example 2

Run the following command to perform whole muscle segmentation on the two T2-stir thigh datasets in the directory /mydir.

~/musclesense/miniconda3/bin/python ~/musclesense/mmseg_ll.py -al thigh -modalities t2_stir -inputdir /mydir --wholemuscle

mydir is expected to have the following directory structure:

mydir/
├── subject1/
│   └── t2_stir.nii.gz
├── subject2/
│   └── t2_stir.nii.gz

A file labelled thigh_segmentation_t2_stir.nii.gz will be produced in each subject directory.

Example 3

Run the following command to perform individual muscle segmentation on the two 3-point Dixon calf datasets in the directory /mydir.

~/musclesense/miniconda3/bin/python ~/musclesense/mmseg_ll.py -al calf -modalities dixon_345_460_575 -inputdir /mydir

mydir is expected to have the following directory structure:

mydir/
├── subject1/
│   └── Dixon345.nii.gz
│   └── Dixon460.nii.gz
│   └── Dixon575.nii.gz
├── subject2/
│   └── Dixon345.nii.gz
│   └── Dixon460.nii.gz
│   └── Dixon575.nii.gz

A file labelled calf_parcellation_dixon_345_460_575.nii.gz will be produced in each subject directory.

Funding

We are grateful to the Wellcome Trust, National Institute for Health and Care Research, and National Brain Appeal for their kind funding and support of this project.

Please consider citing the following publications if you use MuscleSense in your research:

  • Musclesense: a trained, artificial neural network for the anatomical segmentation of lower limb magnetic resonance images in neuromuscular diseases (https://pubmed.ncbi.nlm.nih.gov/32892313/)
  • Quantitative MRI outcome measures in CMT1A using automated lower limb muscle segmentation (https://pubmed.ncbi.nlm.nih.gov/37979968/)

Enquiries

Please submit any enquiries here.

Related Skills

View on GitHub
GitHub Stars5
CategoryEducation
Updated1mo ago
Forks3

Languages

Python

Security Score

75/100

Audited on Feb 26, 2026

No findings