From 4603aa554e2a5b7c6a1a6c0ddbaef9a765de1796 Mon Sep 17 00:00:00 2001
From: Low <jl02958@ssh04.eps.surrey.ac.uk>
Date: Fri, 8 Nov 2024 21:31:20 +0000
Subject: [PATCH] trying to fix for condor

---
 Extract_HaMeR_Jsons.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Extract_HaMeR_Jsons.py b/Extract_HaMeR_Jsons.py
index db12011..b5471be 100644
--- a/Extract_HaMeR_Jsons.py
+++ b/Extract_HaMeR_Jsons.py
@@ -314,14 +314,15 @@ if __name__ == '__main__':
     cpm = ViTPoseModel(device)
 
     # args.in_folder = '/vol/research/SignMotion/2024.02.20_Capture_1/glosses'
-    Folder_List = [os.path.join(args.in_folder, f) for f in os.listdir(args.in_folder)]
-    Rachel_Path = '/vol/research/SignFeaturePool/Rachel_Gloss_Features/HaMeR_Features'
+    Folder_List = os.listdir(args.in_folder)
+    Folder_Dirname = os.path.dirname(args.in_folder)
+    Rachel_Path = '//vol//research//SignFeaturePool//Rachel_Gloss_Features//HaMeR_Features'
     
     args.out_folder = os.path.join(Rachel_Path, os.path.basename(args.in_folder.removesuffix('/glosses')))
     
     if Folder_List[0].endswith('.mp4'):
         for vid_file in Folder_List:
-            args.vid = vid_file
+            args.vid = f'{Folder_Dirname}//{vid_file}'
             try:
                 main(args, model, renderer, device, cpm)
             except Exception as e:
-- 
GitLab