deepmreye.util package#
Submodules#
deepmreye.util.data_generator module#
- deepmreye.util.data_generator.create_generators(full_training_list, full_testing_list, batch_size=8, withinsubject_split=None, augment_list=None, mixed_batches=True, inner_timesteps=None)[source]#
- deepmreye.util.data_generator.create_leaveoneout_generators(datasets, training_subset=None, **args)[source]#
- deepmreye.util.data_generator.data_generator(file_list, batch_size, training=False, mixed_batches=True, withinsubject_split=None, augment_list=None, inner_timesteps=None)[source]#
Take a random subject, load it and return a batched subset.
- deepmreye.util.data_generator.get_single_data_generators(fn_list, batch_size, string_cut=4, **args)[source]#
deepmreye.util.data_io module#
- deepmreye.util.data_io.download_mask(data_path, remote_path='https://github.com/DeepMReye/DeepMReye/blob/main/deepmreye/masks/')[source]#
- deepmreye.util.data_io.get_all_subject_labels(subject_string, mat_data, num_downsampled=10, use_real=False)[source]#
For models with multiple outputs we want to estimate the sub-TR XY.
- Inputs:
subject_string : Subject identified
mat_data : Data to subject logs in mat format
num_downsampled : How many sub-TR XY are left in the output
- deepmreye.util.data_io.get_all_subject_labels_bmd(subject_string, run_idx, num_downsampled=10, real_et=False)[source]#
For models with multiple outputs we want to estimate the sub-TR XY.
Parameters#
- subject_string :
Subject identified
- run_idx :
Index for run
- num_downsampled :
How many sub-TR XY are left in the output
- deepmreye.util.data_io.get_all_subject_labels_ign(subject_string, num_downsampled=10)[source]#
For models with multiple outputs we want to estimate the sub-TR XY.
Parameters#
- subject_string :
Subject identified
- mat_data :
Data to subject logs in mat format
- num_downsampled :
How many sub-TR XY are left in the output
- deepmreye.util.data_io.get_all_subject_labels_mmd(subject_string, run_idx, num_downsampled=10)[source]#
For models with multiple outputs we want to estimate the sub-TR XY.
Parameters#
- subject_string :
Subject identified
- run_idx :
Index for run
- num_downsampled :
How many sub-TR XY are left in the output
deepmreye.util.model_opts module#
deepmreye.util.util module#
Additional methods which did not earn its own space in the main methods.
Maybe because they are more general and made for higher purposes.
- deepmreye.util.util.augment_input(X, rotation=0, shift=0, zoom=0)[source]#
Augment 3D images.
Parameters#
- X :
Batch of 3D images
- rotation :
Rotation in degree
- shift :
Shift in pixels
- zoom :
Zoom in factor
Returns#
- X :
Augmented batch of 3D images
- class deepmreye.util.util.color[source]#
Bases:
object- BLUE = '\x1b[94m'#
- BOLD = '\x1b[1m'#
- CYAN = '\x1b[96m'#
- DARKCYAN = '\x1b[36m'#
- END = '\x1b[0m'#
- GREEN = '\x1b[92m'#
- PURPLE = '\x1b[95m'#
- RED = '\x1b[91m'#
- UNDERLINE = '\x1b[4m'#
- YELLOW = '\x1b[93m'#
- deepmreye.util.util.quantify_predictions(y_true, y_pred, euc_pred, subtr_functor=<function median>, percentile_cut=None)[source]#