diff --git a/get_train_annot.py b/get_train_annot.py index 571362f45015f44f7f15d928a15fd0bfc84cd859..da729ffbf428ffefcc8ad031ceb1ee01ee24a88b 100755 --- a/get_train_annot.py +++ b/get_train_annot.py @@ -68,7 +68,7 @@ def process(entry, arguments, species_list): fig = utils.create_spectrogram( sig, arguments.directory, names=None, window_size=arguments.window, - overlap=arguments.hop, cmap=arguments.cmap) + overlap=arguments.hop, cmap=arguments.cmap, minimum=arguments.minimum) for _, row in table.iterrows(): specie = row.species @@ -183,6 +183,8 @@ if __name__ == '__main__': parser.add_argument('--test', action='store_const', const=1, help='Split into train/test/val. 1 - Ratio / 2 for test and' ' same for validation', default=None) + parser.add_argument('--minimum', type=int, + help='If True, vmin will be stft.mean(), else stft.min()', default=True) args = parser.parse_args() # Load the data and put it into a DataFrame