deepsulci.pattern_classification.capsul.snipe_training.PatternSnipeTraining¶
PatternSnipeTraining¶
Process to train the Scoring by Non-local Image PAtch Estimator (SNIPE) based model (Coupe et al., 2012) to recognize a searched fold pattern.
This process consists of two steps. The second test depends on the first step. 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 SNIPE-based model (buckets and labels). These data are stored in Jason files (traindata_file).
The second step allows to set the hyperparameters (number of time the Optimized Patch Match (OPM) agorithm is run and patch sizes used) by 3-fold cross-validation. These hyperparameters are saved in the Jason file param_file.
Warning: The searched pattern must have been manually labeled on the graphs of the training database containing it.
Note
- Type ‘PatternSnipeTraining.help()’ for a full description of this process parameters.
- Type ‘<PatternSnipeTraining>.get_input_spec()’ for a full description of this process input trait types.
- Type ‘<PatternSnipeTraining>.get_output_spec()’ for a full description of this process output trait types.
Inputs¶
[Mandatory]
- graphs: a legal value ([‘List_File’] - mandatory)
- training base graphs
- pattern: a unicode string ([‘Str’] - mandatory)
- vertex name representing the searched pattern
- names_filter: a legal value ([‘List_Bytes’] - mandatory)
- list of vertex names defining the region of interest
[Optional]
- num_cpu: an integer (int or long) ([‘Int’] - optional)
- number of processes that can be used to parallel the calculations
- step_1: a boolean ([‘Bool’] - optional)
- perform the data extraction step from the graphs
- step_2: a boolean ([‘Bool’] - optional)
- perform the hyperparameter tuning step (OPM number, patch sizes)
Outputs¶
- traindata_file: a file name ([‘File (filename: input)’] - mandatory)
- file (.json) storing the data extracted from the training base graphs
- param_file: a file name ([‘File (filename: input)’] - mandatory)
- file (.json) storing the hyperparameters (OPM number, patch sizes)