Skip to content

Commit

Permalink
Add 18 classes model
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmasoud1 committed Mar 20, 2024
1 parent 9c35454 commit f0d3153
Show file tree
Hide file tree
Showing 5 changed files with 926 additions and 7 deletions.
84 changes: 77 additions & 7 deletions js/brainchop/mainParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,79 @@
}



,{
id: 4,
type: "Atlas",
path:"./models/model18cls/model.json",
modelName:"18-ROI robust (High Mem, Fast)",
labelsPath: "./models/model18cls/labels.json",
colorsPath: "./models/model18cls/colorLUT.json",
preModelId: 1,// Model run first e.g. crop the brain { null, 1, 2, .. }
preModelPostProcess: false, // If true, perform postprocessing to remove noisy regions after preModel inference generate output.
isBatchOverlapEnable: false, //create extra overlap batches for inference
numOverlapBatches: 200, //Number of extra overlap batches for inference
enableTranspose : true, // Keras and tfjs input orientation may need a tranposing step to be matched
enableCrop: true, // For speed-up inference, crop brain from background before feeding to inference model to lower memory use.
cropPadding: 2, // Padding size add to cropped brain
enableQuantileNorm: false, // Some models needs Quantile Normaliztion.
filterOutWithPreMask: false, // Can be used to multiply final output with premodel output mask to crean noisy areas
enableSeqConv: false, // For low memory system and low configuration, enable sequential convolution instead of last layer
textureSize: 0, // Requested Texture size for the model, if unknown can be 0.
warning: "This model may need dedicated graphics card. For more info please check with Browser Resources <i class='fa fa-cogs'></i>.", // Warning message to show when select the model.
inferenceDelay: 100, // Delay in ms time while looping layers applying.
description: "Parcellation of the brain into 18 regions."
}

,{
id: 5,
type: "Atlas",
path:"./models/model18cls/model.json",
modelName:"18-ROI robust (Low Mem, Slow)",
labelsPath: "./models/model18cls/labels.json",
colorsPath: "./models/model18cls/colorLUT.json",
preModelId: 1,// Model run first e.g. crop the brain { null, 1, 2, .. }
preModelPostProcess: false, // If true, perform postprocessing to remove noisy regions after preModel inference generate output.
isBatchOverlapEnable: false, //create extra overlap batches for inference
numOverlapBatches: 200, //Number of extra overlap batches for inference
enableTranspose : true, // Keras and tfjs input orientation may need a tranposing step to be matched
enableCrop: true, // For speed-up inference, crop brain from background before feeding to inference model to lower memory use.
cropPadding: 2, // Padding size add to cropped brain
enableQuantileNorm: false, // Some models needs Quantile Normaliztion.
filterOutWithPreMask: false, // Can be used to multiply final output with premodel output mask to crean noisy areas
enableSeqConv: true, // For low memory system and low configuration, enable sequential convolution instead of last layer
textureSize: 0, // Requested Texture size for the model, if unknown can be 0.
warning: "This model may need dedicated graphics card. For more info please check with Browser Resources <i class='fa fa-cogs'></i>.", // Warning message to show when select the model.
inferenceDelay: 100, // Delay in ms time while looping layers applying.
description: "Parcellation of the brain into 18 regions."
}

,{
id: 6,
type: "Atlas",
path:"./models/model18cls/model.json",
modelName:"18-ROI clinical (High Mem, Slow)",
labelsPath: "./models/model18cls/labels.json",
colorsPath: "./models/model18cls/colorLUT.json",
preModelId: null,// Model run first e.g. crop the brain { null, 1, 2, .. }
preModelPostProcess: false, // If true, perform postprocessing to remove noisy regions after preModel inference generate output.
isBatchOverlapEnable: false, //create extra overlap batches for inference
numOverlapBatches: 200, //Number of extra overlap batches for inference
enableTranspose : true, // Keras and tfjs input orientation may need a tranposing step to be matched
enableCrop: true, // For speed-up inference, crop brain from background before feeding to inference model to lower memory use.
cropPadding: 2, // Padding size add to cropped brain
enableQuantileNorm: false, // Some models needs Quantile Normaliztion.
filterOutWithPreMask: false, // Can be used to multiply final output with premodel output mask to crean noisy areas
enableSeqConv: true, // For low memory system and low configuration, enable sequential convolution instead of last layer
textureSize: 0, // Requested Texture size for the model, if unknown can be 0.
warning: "This model may need High memory and dedicated graphics card. For more info please check with Browser Resources <i class='fa fa-cogs'></i>.", // Warning message to show when select the model.
inferenceDelay: 100, // Delay in ms time while looping layers applying.
description: "Parcellation of the brain in clinical scans into 18 regions. It is highly recommend to use threshold from Enhancement to remove noisy voxels before run the model. "
}

,{
id: 7,
type: "Atlas",
path:"./models/model30chan50cls/model.json",
modelName:"50-ROI Atlas (High Mem, Fast)",
labelsPath: "./models/model30chan50cls/labels.json",
Expand All @@ -195,7 +265,7 @@
}

,{
id: 5,
id: 8,
type: "Atlas",
path:"./models/model30chan50cls/model.json",
modelName:"50-ROI Atlas (Low Mem, Slow)",
Expand All @@ -219,7 +289,7 @@


,{
id: 6,
id: 9,
type: "Brain_Extraction",
path: "./models/model5_gw_ae/model.json",
modelName:"Extract the Brain (FAST)",
Expand All @@ -242,7 +312,7 @@
}

,{
id: 7,
id: 10,
type: "Brain_Extraction",
path: "./models/model11_gw_ae/model.json",
modelName:"Extract the Brain (High Acc, Low Mem)",
Expand All @@ -265,7 +335,7 @@
}

,{
id: 8,
id: 11,
type: "Brain_Masking",
path: "./models/model5_gw_ae/model.json",
modelName:"Compute Brain Mask (FAST)",
Expand All @@ -288,7 +358,7 @@
}

,{
id: 9,
id: 12,
type: "Brain_Masking",
path: "./models/model11_gw_ae/model.json",
modelName:"Compute Brain Mask (High Acc, Low Mem)",
Expand All @@ -313,7 +383,7 @@


,{
id: 10,
id: 13,
type: "Atlas",
path:"./models/model21_104class/model.json",
modelName:"FS aparc+aseg Atlas 104 (High Mem, Fast)",
Expand All @@ -336,7 +406,7 @@
}

,{
id: 11,
id: 14,
type: "Atlas",
path:"./models/model21_104class/model.json",
modelName:"FS aparc+aseg Atlas 104 (Low Mem, Slow)",
Expand Down
21 changes: 21 additions & 0 deletions models/model18cls/colorLUT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"0": "rgb(0,0,0)",
"1": "rgb(245,245,245)",
"2": "rgb(205,62,78)",
"3": "rgb(120,18,134)",
"4": "rgb(196,58,250)",
"5": "rgb(220,248,164)",
"6": "rgb(230,148,34)",
"7": "rgb(0,118,14)",
"8": "rgb(122,186,220)",
"9": "rgb(236,13,176)",
"10": "rgb(12,48,255)",
"11": "rgb(204,182,142)",
"12": "rgb(42,204,164)",
"13": "rgb(119,159,176)",
"14": "rgb(220,216,20)",
"15": "rgb(103,255,255)",
"16": "rgb(255,165,0)",
"17": "rgb(165,42,42)"
}

20 changes: 20 additions & 0 deletions models/model18cls/labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"0": "Unknown",
"1": "Cerebral-White-Matter",
"2": "Cerebral-Cortex",
"3": "Lateral-Ventricle",
"4": "Inferior-Lateral-Ventricle",
"5": "Cerebellum-White-Matter",
"6": "Cerebellum-Cortex",
"7": "Thalamus",
"8": "Caudate",
"9": "Putamen",
"10": "Pallidum",
"11": "3rd-Ventricle",
"12": "4th-Ventricle",
"13": "Brain-Stem",
"14": "Hippocampus",
"15": "Amygdala",
"16": "Accumbens-area",
"17": "VentralDC"
}
Binary file added models/model18cls/model.bin
Binary file not shown.
Loading

0 comments on commit f0d3153

Please sign in to comment.