From 7a1d691b607acfd829401a4aca13762b26b966c9 Mon Sep 17 00:00:00 2001 From: las1g21 <las1g21@soton.ac.uk> Date: Tue, 3 Dec 2024 19:02:28 +0000 Subject: [PATCH] Downloads Prediction File --- scripts/scene_completion.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/scene_completion.py b/scripts/scene_completion.py index 9457d47..bda2ac0 100644 --- a/scripts/scene_completion.py +++ b/scripts/scene_completion.py @@ -87,7 +87,7 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path): print("Finish Enhancing") stdin, stdout, stderr = client.exec_command( - "cd mona/MDBNet360_GDP/ && ls" + + "cd mona/MDBNet360_GDP/" + " && module load conda" + " && source activate" + " && conda activate ssc_env" + @@ -109,7 +109,12 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path): output = stdout.read().decode() print(output) - print("CLOSING") + remote_file_path = "/mainfs/ECShome/kproject/mona/MDBNet360_GDP/output/scene_completed_prediction.obj" + local_file_path = "edgenet-360/Data/Input/scene_completed_prediction.obj" + with SCPClient(client.get_transport()) as scp: + scp.get(remote_file_path, local_file_path) # Download file + + print("OUTPUT DOWNLOADED") # Close the SSH connection client.close() return True @@ -118,5 +123,5 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path): return False -out = get_completed_scene("C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Courtyard\\shifted-disparity.png", "C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Courtyard\\shifted_t.png") -print(out) \ No newline at end of file +# out = get_completed_scene("C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Courtyard\\shifted-disparity.png", "C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Courtyard\\shifted_t.png") +# print(out) \ No newline at end of file -- GitLab