diff --git a/scripts/360monodepthexecution/masterscript-min.ps1 b/scripts/360monodepthexecution/masterscript-min.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..4fa3e86855804f0b593a5efcdaa2a5f034e4b90e --- /dev/null +++ b/scripts/360monodepthexecution/masterscript-min.ps1 @@ -0,0 +1,6 @@ +invoke-expression 'cmd /c start powershell -WindowStyle Minimized -Command { .\triggerinteractive.ps1}' +sleep 10 +Start-Process powershell "-File .\dockercopy.ps1" -WindowStyle Minimized -Wait +Start-Process powershell "-File .\executemonodepth.ps1" -WindowStyle Minimized -Wait +Start-Process powershell "-File .\extractDepthMap.ps1" -WindowStyle Minimized -Wait +Start-Process powershell "-File .\stopDockerContainer.ps1" -WindowStyle Minimized -Wait \ No newline at end of file diff --git a/scripts/debug_tool/tabs/depth_tab.py b/scripts/debug_tool/tabs/depth_tab.py index 30da9e51ae17ff8b1b2e3a9cddced0aa26365fb0..caca369486d7ca1c9ee9cc4b2f32cda2cabf2f1a 100644 --- a/scripts/debug_tool/tabs/depth_tab.py +++ b/scripts/debug_tool/tabs/depth_tab.py @@ -60,7 +60,7 @@ class DepthTab(QWidget): ("Clean Data/Input Dir", self.clean_input_dir, 'left'), ("Remove rgb.png from dest path", self.remove_rgb, 'left'), ("Copy File", self.copy_file, 'left'), - ("Run Depth Est.", self.run_depth_estimation, 'left'), + ("Run Depth Est.", lambda: self.run_depth_estimation(), 'left'), ("Clear Status", lambda: self.status_text.clear(), 'right') ] layout.addLayout(create_button_layout(*buttons)) @@ -124,19 +124,28 @@ class DepthTab(QWidget): if not copy_file(self.depth_input_path, edge_rgb_path, self.update_status): QMessageBox.critical(self, "Error", "Failed to copy file to edgenet directory") - def run_depth_estimation(self): + def run_depth_estimation(self, debug=True): try: self.update_status("Running depth estimation...") # Change to mono depth directory and run script original_dir = os.getcwd() os.chdir(self.config_reader.directories['monoDepthDir']) - - success, output = run_command( - self, - "powershell.exe -File masterscript.ps1", - self.update_status - ) + if debug: + # Run script in debug mode + success, output = run_command( + self, + "powershell.exe -File masterscript.ps1", + self.update_status + ) + else: + # Run minified script for production + self.update_status("Running minified script...") + success, output = run_command( + self, + "powershell.exe -File masterscript-min.ps1 -WindowStyle Minimized", + self.update_status + ) # Change back to original directory os.chdir(original_dir) diff --git a/scripts/simple_tab.py b/scripts/simple_tab.py index 3f66b8d5e73ba4cd7d6df14d9a562d1ed2b8129c..867c06ab3385c05cd959f7f19be0288d913229b2 100644 --- a/scripts/simple_tab.py +++ b/scripts/simple_tab.py @@ -84,7 +84,7 @@ class PipelineWorker(QThread): def run_depth_estimation(self): print("Starting depth_estimation") # Debug print self.progress.emit("Running depth estimation...") - self.tab.depth.run_depth_estimation() + self.tab.depth.run_depth_estimation(False) print("Completed depth_estimation") # Debug print def run_material_recognition(self): @@ -145,6 +145,7 @@ class PipelineWorker(QThread): self.tab.edge_net._run_blender_flip_process() self.progress.emit("Completed blender flip (blenderFlip.py)") self.progress.emit("Post-processing completed!") + self.progress.emit("File saved in edgenet-360\Output") def run_pipeline(self): self.clean_temp_files()