From e3b54f1207c25255b1be1513fd78eb568ec4b689 Mon Sep 17 00:00:00 2001
From: Stephane Chavin <stephane.chavin@lis-lab.fr>
Date: Tue, 15 Oct 2024 10:59:48 +0200
Subject: [PATCH] correction get_train_annot

---
 get_train_annot.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/get_train_annot.py b/get_train_annot.py
index 571362f..da729ff 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
-- 
GitLab