From e9ee46c975412cc587689597043bef64a70a15eb Mon Sep 17 00:00:00 2001 From: Reza Asakereh Date: Thu, 15 Feb 2024 10:33:35 -0500 Subject: [PATCH] Windows testing for fine-tuned models done --- MedSAM/MedSAMLite/MedSAMLite.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MedSAM/MedSAMLite/MedSAMLite.py b/MedSAM/MedSAMLite/MedSAMLite.py index 24b6f65..832d201 100644 --- a/MedSAM/MedSAMLite/MedSAMLite.py +++ b/MedSAM/MedSAMLite/MedSAMLite.py @@ -36,7 +36,7 @@ except: pass # no installation anymore, shorter plugin load -MEDSAMLITE_VERSION = 'v0.03' +MEDSAMLITE_VERSION = 'v0.04' # # MedSAMLite @@ -232,6 +232,9 @@ def setup(self) -> None: self.ui.clbtnOperation.layout().addWidget(path_instruction, 0, 0) self.ui.clbtnOperation.layout().addWidget(self.model_path_widget, 0, 1) + + self.ui.clbtnOperation.layout().addWidget(self.ui.pbSendImage, 1, 0) + self.ui.clbtnOperation.layout().addWidget(self.ui.pbSegment, 1, 1) self.model_path_widget.currentPath = os.path.join(self.logic.server_dir, 'medsam_lite.pth') self.logic.new_model_loaded = True @@ -647,7 +650,7 @@ def run_server(self, serverUrl, numpyServerAddress): # Terminate whole server server_port = int(serverUrl.split(':')[-1]) try: - server_process = list(filter(lambda proc: proc.laddr.port == server_port and psutil.Process(proc.pid).name() == 'python-real', psutil.net_connections()))[0] + server_process = list(filter(lambda proc: proc.laddr.port == server_port and 'python-real' in psutil.Process(proc.pid).name(), psutil.net_connections()))[0] psutil.Process(server_process.pid).terminate() except: pass