From 42957cc61b9ee3659a4f1152960431ff8587fcee Mon Sep 17 00:00:00 2001
From: Stephane Chavin <stephane.chavin@lis-lab.fr>
Date: Thu, 30 Jan 2025 11:49:49 +0100
Subject: [PATCH] Update file get_train_val.py

---
 get_train_val.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/get_train_val.py b/get_train_val.py
index 3393dc1..b4b706b 100755
--- a/get_train_val.py
+++ b/get_train_val.py
@@ -72,7 +72,7 @@ def prepare_data(arguments):
     """
     annotations = [] 
     background = []  
-    for f in tqdm(glob.glob(os.path.join(arguments.path_to_data)), desc="Processing", 
+    for f in tqdm(glob.glob(os.path.join(arguments.path_to_data, '*.txt')), desc="Processing", 
                                                             ascii='░▒▓█'):
         file_annotation = pd.read_csv(f, sep=' ', names=['species', 'x', 'y', 'w', 'h'])
         if len(file_annotation) == 0:
-- 
GitLab