BatchNormalization label mapping and changing the way background labels are treated
This merge request implements several changes mainly related to how background labels are treated. They are now treated as simply another class. This results in several methods from selection table to be modified.
- selection_table.standardize function deprecated signal_labels and backgr_labels in favor of the new labels argument which combine the functionality of both
- selection_table.select new argument background_label. Default value of 0. This value is assigned to the background labels. (Before it was always zero. Now it can be anything)
- selection_table.create_rndm_backgr_selections is now deprecated in favor of create_rndm_selections.
- new method selection_table.create_rndm_selections. Creates ramdnom selection with a label that must be defined by the user. Similar functionality to create_rndm_backgr_selections function, but now the selections can have any label
- Added new argument to selection_table.select_by_segmenting called label_empty with default value of 0. Only relevant if keep_only_empty=True. Value is assigned to selections without annotations
Another important change is that now the Batch Generator will map labels by default to 0,1,2,3. This should fix issue !152 Later this will allow us to even select which classes we want to train a DNN with without having to create a new dataset for every class combination. (This has not been implemented yet)
- Added more tests.
All changes are backwards compatible except that selection_table.create_label_dict is now an internal method