Process to train a UNET neural network to automatically label the sulci.
This process consists of four steps. Each step depends on the previous step (except step 4 that is independent of step 3). However, they can be started independently if the previous steps have already been completed.
The first step is to extract from the graphs the data useful for training the neural network (buckets and corresponding sulcus names). These data are stored in Jason files (buckets and names in traindata_file and sulci list in param_file).
The second step allows to set the hyperparameters (learning rate and momentum) by 3-fold cross-validation. These hyperparameters are saved in the Jason file param_file.
The third step is to train the UNET neural network on the entire database. The neural network parameters are saved in the file model_param.mdsm
The fourth step allows to set the cutting hyperparameter (threshold on the Calinski-Harabaz index) by 3-fold cross-validation. This hyperparameter is saved in the Jason file param_file.
The model takes approximately 20 hours to be trained on the GPU with a training database of about 60 subjects (step 1: 15min, step 2: 16h, step 3: 20min, step 4: 3h).
Warning: Graphs should be of the same side!
graphs: ListOf( Labelled Cortical folds graph ) ( input )training base graphs
graphs_notcut: ListOf( Cortical folds graph ) ( input )training base graphs before manual cutting of the elementary folds
cuda: Integer ( input )device on which to run the training(-1 for cpu, i>=0 for the i-th gpu)
translation_file: Any Type ( optional, input )file (.trl) containing the translation of the sulci toapplied on the training base graphs (optional)
step_1: Boolean ( optional, input )perform the data extraction step from the graphs
step_2: Boolean ( optional, input )perform the hyperparameter tuning step (learning rate and momentum)
step_3: Boolean ( optional, input )perform the model training step
step_4: Boolean ( optional, input )perform the cutting hyperparameter tuning step
model_file: Any Type ( output )file (.mdsm) storing neural network parameters
param_file: Any Type ( output )file (.json) storing the hyperparameters (learning rate, momentum, cutting threshold)
traindata_file: Any Type ( output )file (.json) storing the data extracted from the training base graphs
use_capsul_completion: Boolean ( input )
edit_pipeline: Boolean ( input )
capsul_gui: Boolean ( input )
edit_study_config: Boolean ( input )
Toolbox : Morphologist
User level : 0
Identifier :
sulci_deep_training
File name :
brainvisa/toolboxes/morphologist/processes/Sulci/Recognition/sulci_deep_training.py
Supported file formats :
graphs :Graph and data, Graph and datagraphs_notcut :Graph and data, Graph and datatranslation_file :Label Translation, DEF Label Translation, Label Translationmodel_file :mdsm file, mdsm fileparam_file :JSON file, JSON filetraindata_file :JSON file, JSON file