Skip to content
Snippets Groups Projects
Commit 3f9be34a authored by mhz1g21's avatar mhz1g21
Browse files

Merge branch 'Hiding-Terminals' into 'master'

Refactor depth estimation to support debug and production modes; add minified...

See merge request !12
parents c61149fd ce10e9f6
No related branches found
No related tags found
1 merge request!12Refactor depth estimation to support debug and production modes; add minified...
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
......@@ -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)
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment