Skip to content

Commit

Permalink
add segmentation tool page
Browse files Browse the repository at this point in the history
  • Loading branch information
mfroeling committed Feb 28, 2024
1 parent 31a4bf5 commit b47036c
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 28 deletions.
2 changes: 2 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
dropdown:
- title: List of toolboxes
url: /tool/
- title: Automated muscle segmentation
url: /tool/segmentation/
- title: Diffusion gradient optimization
url: /tool/gradient/

Expand Down
2 changes: 1 addition & 1 deletion _sass/_03_settings_mixins_media_queries.scss
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ $cursor-text-value: text !default;
a:hover { cursor: $cursor-pointer-value; }

// Grid Defaults to get images and embeds to work properly
img { max-width: 100%; height: auto; }
img { max-width: 100%; }

img { -ms-interpolation-mode: bicubic; }

Expand Down
Binary file added assets/images/blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/lower-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/seg example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/upper-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 24 additions & 27 deletions pages/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,33 @@ widget3:

---

<div align="center" ><h1>Welcome to QMRITools!</h1></div>

This website describes the functionality of `QMRITools`, a toolbox for analysis of quantitative magnetic resonance imaging data. `QMRITools` is a collection of tools and functions for processing quantitative MRI data, runs in the latest version of [Wolfram Mathematica](http://www.wolfram.com/mathematica/) and is developed and maintained by [Martijn Froeling](https://www.researchgate.net/profile/Martijn-Froeling){:target="_blank"}. The toolbox was initially developed for the analysis of diffusion imaging data of skeletal muscle ([Froeling et al. 2012](https://onlinelibrary.wiley.com/doi/10.1002/jmri.23608){:target="_blank"}). Over the years it has grown in its functionality and is currently used for the analysis, processing and simulations of quantitative muscle, nerve and cardiac magnetic resonance imaging and spectroscopy data. The library of functions grows along with the research it is used for.

<div align="center" style="background-color: #D3D3D3; border-radius: 10px;">
<br>
<a href="https://doi.org/10.5281/zenodo.7266917" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="DOI" title="DOI" src="https://zenodo.org/badge/DOI/10.5281/zenodo.7266917.svg" style="margin-right:10px"></a>
<a href="https://joss.theoj.org/papers/10.21105/joss.01204" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="DOI Joss" title="DOI Joss" src="https://joss.theoj.org/papers/10.21105/joss.01204/status.svg" style="margin-right:10px"></a>
<a href="https://github.com/mfroeling/QMRITools" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="contributions welcome" title="contributions welcome" src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" style="margin-right:10px"></a>
<br><br>
Release <b>3.16</b> is live!! Whole leg muscle segmentation with a single command <a href="https://www.qmritools.com/tool/segmentationtools" target="_blank"></a>.<br>
<br>
<a href="https://github.com/mfroeling/QMRITools" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="Github" title="Github" src="/assets/images/github.png" style="margin-right:10px"></a>
<br><br>
<a href="https://ormircommunity.github.io/packages.html#other-packages" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="Open and Reproducible Musculoskeletal Imaging Research" title="Open and Reproducible Musculoskeletal Imaging ResearchMIR" src="/assets/images/ORMIR.png" style="margin-right:10px"></a>
<img alt="Github" title="Github" src="/assets/images/github.png" style="margin-right:10px" height="40"></a>
<a href="https://ismrm.github.io/mrhub/" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="MR-Hub" title="MR-Hub" src="/assets/images/MR-Hub.png" style="margin-right:10px"></a>
<img alt="MR-Hub" title="MR-Hub" src="/assets/images/MR-Hub.png" style="margin-right:10px" height="40"></a>
<a href="https://www.opensourceimaging.org/project/qmritools-mathematica-toolbox-for-quantitative-mri-data/" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="OpenSourceImaging" title="OpenSourceImaging" src="/assets/images/open_source_images.png" style="margin-right:10px"></a>
<img alt="OpenSourceImaging" title="OpenSourceImaging" src="/assets/images/open_source_images.png" style="margin-right:10px" height="40"></a>
<a href="https://mrshub.org/software_analysis/#QMRITools" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="MRSHub" title="MRSHub" src="/assets/images/MRSHub.png" style="margin-right:10px"></a>
<br><br>
Release <b>3.9</b> is live!! With this release we introduced UNET based fully automated <a href="https://www.qmritools.com/tool/segmentationtools" target="_blank">whole leg muscle segmentation</a>.
<br><br>
Live discussion with the Wolfram academic outreach team about <a href="https://www.youtube.com/live/wupxxiPJkxU?si=22BV_HSSa5u7Ds3D" target="_blank">QMRITools</a> and the role of computational Wolfram technology.
<br><br>
Presentation for the wolfram R&D Team about <a href="https://www.youtube.com/live/LVUBupORthA?si=UjoNpM2szsrgB7xx" target="_blank">QMRITools</a> development and functionality.
<br><br>
</div>
<br>

<div align="center" ><h1>Welcome to QMRITools!</h1></div>

This website describes the functionality of `QMRITools`, a toolbox for analysis of quantitative magnetic resonance imaging data. `QMRITools` is a collection of tools and functions for processing quantitative MRI data, runs in the latest version of [Wolfram Mathematica](http://www.wolfram.com/mathematica/) and is developed and maintained by [Martijn Froeling](https://www.researchgate.net/profile/Martijn-Froeling){:target="_blank"}. The toolbox was initially developed for the analysis of diffusion imaging data of skeletal muscle ([Froeling et al. 2012](https://onlinelibrary.wiley.com/doi/10.1002/jmri.23608){:target="_blank"}). Over the years it has grown in its functionality and is currently used for the analysis, processing and simulations of quantitative muscle, nerve and cardiac magnetic resonance imaging and spectroscopy data. The library of functions grows along with the research it is used for.
<img alt="MRSHub" title="MRSHub" src="/assets/images/MRSHub.png" style="margin-right:10px" height="40"></a>
<a href="https://ormircommunity.github.io/packages.html#other-packages" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="Open and Reproducible Musculoskeletal Imaging Research" title="Open and Reproducible Musculoskeletal Imaging ResearchMIR" src="/assets/images/ORMIR.png" style="margin-right:10px" height="40"></a><br>
<br>
Live discussion with the Wolfram academic outreach team about <a href="https://www.youtube.com/live/wupxxiPJkxU?si=22BV_HSSa5u7Ds3D" target="_blank">QMRITools</a>.<br>
Presentation for the wolfram R&D Team about <a href="https://www.youtube.com/live/LVUBupORthA?si=UjoNpM2szsrgB7xx" target="_blank">QMRITools</a> development and functionality.<br>
<br>
<a href="https://doi.org/10.5281/zenodo.7266917" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="DOI" title="DOI" src="https://zenodo.org/badge/DOI/10.5281/zenodo.7266917.svg" style="margin-right:10px"></a>
<a href="https://joss.theoj.org/papers/10.21105/joss.01204" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="DOI Joss" title="DOI Joss" src="https://joss.theoj.org/papers/10.21105/joss.01204/status.svg" style="margin-right:10px"></a>
<a href="https://github.com/mfroeling/QMRITools" target="_blank" style="text-decoration: none; border-bottom: none;">
<img alt="contributions welcome" title="contributions welcome" src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" style="margin-right:10px"></a><br>
<br>
</div>
74 changes: 74 additions & 0 deletions pages/tool_seg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---

layout: page
permalink: /tool/segmentation

title: "Automated muscle segmentation"
subheadline: "Full leg AI segmentation using CNN"
teaser: "based on UNET architecture"

header: no

images:
- image_id: 'legseg'
image_name: 'segmentation small.gif'
image_title: 'Full leg automated muscle segmentation using a convolutional neural network with UNET architecture.'
image_alt: 'Full leg automated muscle segmentation using a convolutional neural network with UNET architecture.'
- image_id: 'flow'
image_name: 'flowchart_seg.gif'
image_title: 'Full leg automated muscle segmentation using a convolutional neural network with UNET architecture.'
image_alt: 'Full leg automated muscle segmentation using a convolutional neural network with UNET architecture.'
- image_id: 'unet'
image_name: 'blocks.png'
image_title: 'Schematic representation of the unet architecture and the unet encoding and decoding blocks.'
image_alt: 'Schematic representation of the unet architecture and the unet encoding and decoding blocks.'
- image_id: 'upper'
image_name: 'upper-demo.gif'
image_title: 'Example of data augmentation used for training the upper leg segmentation UNET.'
image_alt: 'Example of data augmentation used for training the upper leg segmentation UNET.'
- image_id: 'lower'
image_name: 'lower-demo.gif'
image_title: 'Example of data augmentation used for training the lower leg segmentation UNET.'
image_alt: 'Example of data augmentation used for training the lower leg segmentation UNET.'
- image_id: 'exp'
image_name: 'seg example.png'
image_title: 'Example segmentations of the thigh and leg automated segmention UNET neural networks.'
image_alt: 'Example segmentations of the thigh and leg automated segmention UNET neural networks.'


---

Within `QMRITools` there is a function called `SegmentData` which is part of [Segmentationtools](https://www.qmritools.com/tool/segmentationtools), this function allows to automaticly segment lower extremity muscles of the hip, thigh and leg.
The function is based on 4 neural nets, two that recognize the side and location, and two that perform the muscle segmenataion, as is shown in the flowchart below.

{% include page-image im_id="flow" %}

The network is trained on 20 manually segmented thigh and leg datasets. It currently only works on out-phase gradient echo images, which can either be acquired
or reconsturcted using dixon based methods. The implementation allows for any size data and works best is the data has a inplane resolution of 1-2.5 mm and a
slice thinkness of 5-10 mm. The latest version of the trained networks are availible in the QMRItools package as `.wlnet` files. Upon request `*.ONNX` files are also
availible. An example of a fully segmented leg dataset is shown below.

{% include page-image im_id="legseg" %}

### Architecture and training

The segmentation networks are based on the UNET architectrue with ResNet convolution blocks that contain short skip connections. Below are the block diagrams of the encoding
and decoding blocks used in our unet architecture.

{% include page-image im_id="unet" %}

For training the data is heavily augmented using: scale, skew, rotation, translation, noise, sharpen, contrast and and brightness. Training is done with a batch size of 2 and a
patch size of 32x112x112 voxels and 256 datasets are seen per epoch. Patches are selected after data augmentation. Below are two examples of the first 100 epochs for the upper and lower leg.
Training is typically continued for 200-300 epochs (8-12 hours). The resulting segmentation of both neworks is shown below.

{% include page-image im_id="upper" %}
{% include page-image im_id="lower" %}
{% include page-image im_id="exp" %}

### Features include

- Automated region recognition
- Memory optimized segmentation
- CPU and GPU support
- Automated patching and merging
- Standardized muscle labels

0 comments on commit b47036c

Please sign in to comment.