ForkNet Brain Segmentation Net Trained on NAMIC Data

Segment an image of a human brain into different anatomical structures

Released in 2020 by a research team from Nagoya Institute of Technology (Japan), ForkNet Segmentation Net is a u-net inspired CNN that performs segmentation of various brain tissues. The model is comprised of several u-net structures with shared encoders and distinct decoders corresponding to distinct brain tissues. The segmented tissues can be used to generate personalized head models and applied for the evaluation of the electric field in the brain during transcranial magnetic stimulation. Compared to vanilla u-net architecture, the networks get substantial gain in accuracy once the number of decoders is increased.

Number of models: 5

Training Set Information

Performance

Examples

Resource retrieval

Get the pre-trained net:

In[1]:=
NetModel["ForkNet Brain Segmentation Net Trained on NAMIC Data"]
Out[1]=

NetModel parameters

This model consists of a family of individual nets, each identified by a specific parameter combination. Inspect the available parameters:

In[2]:=
NetModel["ForkNet Brain Segmentation Net Trained on NAMIC Data", "ParametersInformation"]
Out[2]=

Pick a non-default net by specifying the parameters:

In[3]:=
NetModel[{"ForkNet Brain Segmentation Net Trained on NAMIC Data", "Tissues" -> "Dura - Fat - Mucous - White Matter"}]
Out[3]=

Pick a non-default uninitialized net:

In[4]:=
NetModel[{"ForkNet Brain Segmentation Net Trained on NAMIC Data", "Tissues" -> "Dura - Fat - Mucous - White Matter"}, "UninitializedEvaluationNet"]
Out[4]=

Basic usage

Obtain the default segmentation masks for a given image:

In[5]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/f2456b07-2f56-4614-b2fb-41ab4b010e8c"]

Obtain the dimensions of the masks:

In[6]:=
Dimensions /@ masks
Out[6]=

Visualize the masks:

In[7]:=
Map[Colorize@Image[#] &, masks[[All, 1]]]
Out[7]=

Overlay the masks on the input image:

In[8]:=
Map[HighlightImage[img, {Image[#]}] &, masks[[All, 1]]]
Out[8]=

Net information

Inspect the number of parameters of all arrays in the net:

In[9]:=
Information[
 NetModel["ForkNet Brain Segmentation Net Trained on NAMIC Data" ], "ArraysElementCounts"]
Out[9]=

Obtain the total number of parameters:

In[10]:=
Information[
 NetModel["ForkNet Brain Segmentation Net Trained on NAMIC Data" ], "ArraysTotalElementCount"]
Out[10]=

Obtain the layer type counts:

In[11]:=
Information[
 NetModel["ForkNet Brain Segmentation Net Trained on NAMIC Data" ], "LayerTypeCounts"]
Out[11]=

Display the summary graphic:

In[12]:=
Information[
 NetModel["ForkNet Brain Segmentation Net Trained on NAMIC Data" ], "SummaryGraphic"]
Out[12]=

Export to MXNet

Export the net into a format that can be opened in MXNet:

In[13]:=
jsonPath = Export[FileNameJoin[{$TemporaryDirectory, "net.json"}], NetModel["ForkNet Brain Segmentation Net Trained on NAMIC Data" ], "MXNet"]
Out[13]=

Export also creates a net.params file containing parameters:

In[14]:=
paramPath = FileNameJoin[{DirectoryName[jsonPath], "net.params"}]
Out[14]=

Get the size of the parameter file:

In[15]:=
FileByteCount[paramPath]
Out[15]=

Represent the MXNet net as a graph:

In[16]:=
Import[jsonPath, {"MXNet", "NodeGraphPlot"}]
Out[16]=

Requirements

Wolfram Language 12.1 (March 2020) or above

Resource History

Reference

  • E.-A. Rashed, J. Gomez-Tames, A. Hirata, "Development of Accurate Human Head Models for Personalized Electromagnetic Dosimetry Using Deep Learning," Neuroimage, 202, 116132 (2019)
    E.-A. Rashed, J. Gomez-Tames, A. Hirata, "End-to-End Semantic Segmentation of Personalized Deep Brain Structures for Non-invasive Brain Stimulation," Neural Networks, 125, 233–244 (2020)
  • Available from:
  • Rights: